summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/dragndrop
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-06-22 17:53:23 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-06-22 17:53:24 +0000
commitce080e8fc03940ec5b4a47082ecc20d112a64e87 (patch)
tree5283ff9f226d4074a6d53c565f554f284d8c0a08 /src/com/android/launcher3/dragndrop
parentb9465eec45433f2e4f5e9c278484053f1805dbef (diff)
parent80fa41f00f0c468b4ca5bfed801164ec654459cd (diff)
downloadandroid_packages_apps_Trebuchet-ce080e8fc03940ec5b4a47082ecc20d112a64e87.tar.gz
android_packages_apps_Trebuchet-ce080e8fc03940ec5b4a47082ecc20d112a64e87.tar.bz2
android_packages_apps_Trebuchet-ce080e8fc03940ec5b4a47082ecc20d112a64e87.zip
Merge "Fixing PinItemActivity not getting dismissed when starting drag-and-drop in multi-window mode" into ub-launcher3-dorval-polish
Diffstat (limited to 'src/com/android/launcher3/dragndrop')
-rw-r--r--src/com/android/launcher3/dragndrop/AddItemActivity.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/launcher3/dragndrop/AddItemActivity.java b/src/com/android/launcher3/dragndrop/AddItemActivity.java
index 29789c82c..01893bdaf 100644
--- a/src/com/android/launcher3/dragndrop/AddItemActivity.java
+++ b/src/com/android/launcher3/dragndrop/AddItemActivity.java
@@ -84,6 +84,8 @@ public class AddItemActivity extends BaseActivity implements OnLongClickListener
private int mPendingBindWidgetId;
private Bundle mWidgetOptions;
+ private boolean mFinishOnPause = false;
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -163,6 +165,7 @@ public class AddItemActivity extends BaseActivity implements OnLongClickListener
startActivity(homeIntent,
ActivityOptions.makeCustomAnimation(this, 0, android.R.anim.fade_out).toBundle());
+ mFinishOnPause = true;
// Start a system drag and drop. We use a transparent bitmap as preview for system drag
// as the preview is handled internally by launcher.
@@ -182,6 +185,14 @@ public class AddItemActivity extends BaseActivity implements OnLongClickListener
return false;
}
+ @Override
+ protected void onPause() {
+ super.onPause();
+ if (mFinishOnPause) {
+ finish();
+ }
+ }
+
private void setupShortcut() {
PinShortcutRequestActivityInfo shortcutInfo =
new PinShortcutRequestActivityInfo(mRequest, this);