summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2019-06-10 12:14:47 -0700
committerSunny Goyal <sunnygoyal@google.com>2019-06-12 11:25:26 -0700
commitc8502c1df5c236fa2ab58b5618bfc2c18cb84d37 (patch)
treeaee1352186269edcbde6744760ebfcf98ffbd8ab /src
parenta273eafec47580b3eb0f296dd10a3efb9b2adc8a (diff)
downloadandroid_packages_apps_Trebuchet-c8502c1df5c236fa2ab58b5618bfc2c18cb84d37.tar.gz
android_packages_apps_Trebuchet-c8502c1df5c236fa2ab58b5618bfc2c18cb84d37.tar.bz2
android_packages_apps_Trebuchet-c8502c1df5c236fa2ab58b5618bfc2c18cb84d37.zip
Do not rebind when when deviceProfile has not changed
This avoids UI flicker when using fakeLandscape UI during swipe-up animation Bug: 131360075 Change-Id: I651e0acb79b54be66b93c746eed6e9b099f2f767
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/Launcher.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 2c9a37a65..4e905c726 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -461,6 +461,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
private void onIdpChanged(InvariantDeviceProfile idp) {
mUserEventDispatcher = null;
+ DeviceProfile oldWallpaperProfile = getWallpaperDeviceProfile();
initDeviceProfile(idp);
dispatchDeviceProfileChanged();
reapplyUi();
@@ -469,8 +470,9 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
// 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();
+ if (oldWallpaperProfile != getWallpaperDeviceProfile()) {
+ rebindModel();
+ }
}
public void onAssistantVisibilityChanged(float visibility) {