summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaj Yengisetty <rajesh@cyngn.com>2014-11-26 00:04:52 (GMT)
committerRaj Yengisetty <rajesh@cyngn.com>2014-11-26 00:04:52 (GMT)
commit3e6500ca2393b2bdfb94b8b02b9ad6ab5e24c32d (patch)
tree9248ad72728bcde51c0d8ac29b1a218d039ec211
parentca7fbbb1374959adf32aacc00d27d11e72def03a (diff)
downloadandroid_packages_apps_Trebuchet-3e6500ca2393b2bdfb94b8b02b9ad6ab5e24c32d.zip
android_packages_apps_Trebuchet-3e6500ca2393b2bdfb94b8b02b9ad6ab5e24c32d.tar.gz
android_packages_apps_Trebuchet-3e6500ca2393b2bdfb94b8b02b9ad6ab5e24c32d.tar.bz2
Delay reloading Dynamic grid after size change till onResume or settings panel collapses
Change-Id: I1077921d8c59172d63a8fc5fb287ff26a38e3e93
-rw-r--r--src/com/android/launcher3/Launcher.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 7cf92a8..737cb0d 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1166,8 +1166,6 @@ public class Launcher extends Activity
}
super.onResume();
- updateGridIfNeeded();
-
// Restore the previous launcher state
if (mOnResumeState == State.WORKSPACE) {
showWorkspace(false);
@@ -1281,6 +1279,8 @@ public class Launcher extends Activity
} else {
mHiddenFolderAuth = false;
}
+
+ updateGridIfNeeded();
}
@Override
@@ -1405,10 +1405,14 @@ public class Launcher extends Activity
}
public void setDynamicGridSize(DeviceProfile.GridSize size) {
- SettingsProvider.putInt(this,
- SettingsProvider.SETTINGS_UI_DYNAMIC_GRID_SIZE, size.getValue());
+ int gridSize = SettingsProvider.getIntCustomDefault(this,
+ SettingsProvider.SETTINGS_UI_DYNAMIC_GRID_SIZE, 0);
+ if (gridSize != size.getValue()) {
+ SettingsProvider.putInt(this,
+ SettingsProvider.SETTINGS_UI_DYNAMIC_GRID_SIZE, size.getValue());
- updateDynamicGrid();
+ setUpdateDynamicGrid();
+ }
mOverviewSettingsPanel.notifyDataSetInvalidated();