summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaj Yengisetty <rajesh@cyngn.com>2014-11-26 00:04:52 (GMT)
committerGerrit Code Review <gerrit@cyanogenmod.org>2014-12-16 22:31:52 (GMT)
commit6d6e0a35e44c3a0da999f93290d0d28107f4d9cc (patch)
tree50db23ebb28729d9ccfd0d739ac93faba052da7c
parentc321997e01a26712ca4e708c12a05cbec3b43d3e (diff)
downloadandroid_packages_apps_Trebuchet-6d6e0a35e44c3a0da999f93290d0d28107f4d9cc.zip
android_packages_apps_Trebuchet-6d6e0a35e44c3a0da999f93290d0d28107f4d9cc.tar.gz
android_packages_apps_Trebuchet-6d6e0a35e44c3a0da999f93290d0d28107f4d9cc.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.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 714c589..3ce4a57 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1066,9 +1066,6 @@ public class Launcher extends Activity
}
super.onResume();
-
- updateGridIfNeeded();
-
// Restore the previous launcher state
if (mOnResumeState == State.WORKSPACE) {
showWorkspace(false);
@@ -1178,6 +1175,8 @@ public class Launcher extends Activity
} else {
mHiddenFolderAuth = false;
}
+
+ updateGridIfNeeded();
}
@Override
@@ -1286,10 +1285,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();