summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Launcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-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 58e936587..c892f4be5 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1193,7 +1193,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);
}
}
@@ -1902,6 +1902,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;
@@ -2771,7 +2773,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 {