summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 7cf92a8bc..737cb0d30 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();