Do not rebind when when deviceProfile has not changed am: c8502c1df5
am: 1d48c43626
Change-Id: I707cb2fd3a711a8d5ca45b66179e390657d4deac
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 2c9a37a..4e905c7 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -461,6 +461,7 @@
private void onIdpChanged(InvariantDeviceProfile idp) {
mUserEventDispatcher = null;
+ DeviceProfile oldWallpaperProfile = getWallpaperDeviceProfile();
initDeviceProfile(idp);
dispatchDeviceProfileChanged();
reapplyUi();
@@ -469,8 +470,9 @@
// 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) {