diff options
author | Pinyao Ting <pinyaoting@google.com> | 2019-07-17 23:26:06 -0700 |
---|---|---|
committer | Pinyao Ting <pinyaoting@google.com> | 2019-07-17 23:26:06 -0700 |
commit | a74b63aa07b32319b700e0adaeb874530ef3f003 (patch) | |
tree | 7fd3ea91a17712a9be212c2269c296c185da4b24 /src/com/android/launcher3/Launcher.java | |
parent | 2254bcae3fda8bec18abced2d00e5ed0f539db9e (diff) | |
download | android_packages_apps_Trebuchet-a74b63aa07b32319b700e0adaeb874530ef3f003.tar.gz android_packages_apps_Trebuchet-a74b63aa07b32319b700e0adaeb874530ef3f003.tar.bz2 android_packages_apps_Trebuchet-a74b63aa07b32319b700e0adaeb874530ef3f003.zip |
do not close widgets that are safe for rebind upon orientation change
bug: 135608744
Change-Id: I58e9e44eb61f3b22df6ec656ac864f6da3fb479f
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 03fdc971d..b86411157 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -20,6 +20,8 @@ import static android.content.pm.ActivityInfo.CONFIG_LOCALE; import static android.content.pm.ActivityInfo.CONFIG_ORIENTATION; import static android.content.pm.ActivityInfo.CONFIG_SCREEN_SIZE; +import static com.android.launcher3.AbstractFloatingView.TYPE_ALL; +import static com.android.launcher3.AbstractFloatingView.TYPE_REBIND_SAFE; import static com.android.launcher3.AbstractFloatingView.TYPE_SNACKBAR; import static com.android.launcher3.LauncherAnimUtils.SPRING_LOADED_EXIT_DELAY; import static com.android.launcher3.LauncherState.ALL_APPS; @@ -1426,9 +1428,10 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, outState.remove(RUNTIME_STATE_WIDGET_PANEL); } - // We close any open folders and shortcut containers since they will not be re-opened, + // We close any open folders and shortcut containers that are not safe for rebind, // and we need to make sure this state is reflected. - AbstractFloatingView.closeAllOpenViews(this, false); + AbstractFloatingView.closeOpenViews(this, false, TYPE_ALL & ~TYPE_REBIND_SAFE); + finishAutoCancelActionMode(); if (mPendingRequestArgs != null) { outState.putParcelable(RUNTIME_STATE_PENDING_REQUEST_ARGS, mPendingRequestArgs); @@ -1909,8 +1912,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, // Floating panels (except the full widget sheet) are associated with individual icons. If // we are starting a fresh bind, close all such panels as all the icons are about // to go away. - AbstractFloatingView.closeOpenViews(this, true, - AbstractFloatingView.TYPE_ALL & ~AbstractFloatingView.TYPE_REBIND_SAFE); + AbstractFloatingView.closeOpenViews(this, true, TYPE_ALL & ~TYPE_REBIND_SAFE); setWorkspaceLoading(true); |