diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2019-06-10 11:56:11 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2019-06-10 12:00:10 -0700 |
commit | 76ba0a328da7229cb123a9aa983a0b180c2c110e (patch) | |
tree | cd862ce6be2215dba84c93e72c2b5ac12147abc3 /src | |
parent | 34b2f03b308a7e3afcebe6e57d929d2950461b3c (diff) | |
download | android_packages_apps_Trebuchet-76ba0a328da7229cb123a9aa983a0b180c2c110e.tar.gz android_packages_apps_Trebuchet-76ba0a328da7229cb123a9aa983a0b180c2c110e.tar.bz2 android_packages_apps_Trebuchet-76ba0a328da7229cb123a9aa983a0b180c2c110e.zip |
Saving instance state so that widget cache is updated properly before rebind
List widgets use a static cache which is initialized as part of saveInstanceState.
Calling this ensures that no extra binder calls are made on rotation
Bug: 134707989
Change-Id: I8d4450134168bd412ba2911c57354a603868bc47
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 57a9b161f..9db2ec047 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -465,6 +465,9 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, reapplyUi(); mDragLayer.recreateControllers(); + // Calling onSaveInstanceState ensures that static cache used by listWidgets is + // initialized properly. + onSaveInstanceState(new Bundle()); // TODO: We can probably avoid rebind when only screen size changed. rebindModel(); } |