summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/launcher3/Launcher.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index bcff560..8161d38 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1215,7 +1215,7 @@ public class Launcher extends Activity
Fragment gridFragment = getFragmentManager().findFragmentByTag(
DynamicGridSizeFragment.DYNAMIC_GRID_SIZE_FRAGMENT);
if (gridFragment != null) {
- mDynamicGridSizeFragment.setSize();
+ ((DynamicGridSizeFragment) gridFragment).setSize();
unlockScreenOrientation(true);
}
}
@@ -1928,6 +1928,8 @@ public class Launcher extends Activity
* @param size The new grid size to set the workspace to.
*/
public void setDynamicGridSize(InvariantDeviceProfile.GridSize size) {
+ if (size == null) return;
+
int gridSize = SettingsProvider.getIntCustomDefault(this,
SettingsProvider.SETTINGS_UI_DYNAMIC_GRID_SIZE, 0);
boolean customValuesChanged = false;
@@ -2815,7 +2817,7 @@ public class Launcher extends Activity
Fragment gridFragment = getFragmentManager().findFragmentByTag(
DynamicGridSizeFragment.DYNAMIC_GRID_SIZE_FRAGMENT);
if (gridFragment != null) {
- mDynamicGridSizeFragment.setSize();
+ ((DynamicGridSizeFragment) gridFragment).setSize();
unlockScreenOrientation(true);
}
else {