summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/launcher3/Launcher.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 737cb0d..551430a 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1407,7 +1407,18 @@ public class Launcher extends Activity
public void setDynamicGridSize(DeviceProfile.GridSize size) {
int gridSize = SettingsProvider.getIntCustomDefault(this,
SettingsProvider.SETTINGS_UI_DYNAMIC_GRID_SIZE, 0);
- if (gridSize != size.getValue()) {
+ boolean customValuesChanged = false;
+ if (gridSize == size.getValue() && size == DeviceProfile.GridSize.Custom) {
+ int tempRows = SettingsProvider.getIntCustomDefault(this,
+ SettingsProvider.SETTINGS_UI_HOMESCREEN_ROWS, (int)mGrid.numRows);
+ int tempColumns = SettingsProvider.getIntCustomDefault(this,
+ SettingsProvider.SETTINGS_UI_HOMESCREEN_COLUMNS, (int)mGrid.numColumns);
+ if (tempColumns != (int) mGrid.numColumns || tempRows != (int) mGrid.numRows) {
+ customValuesChanged = true;
+ }
+ }
+
+ if (gridSize != size.getValue() || customValuesChanged) {
SettingsProvider.putInt(this,
SettingsProvider.SETTINGS_UI_DYNAMIC_GRID_SIZE, size.getValue());