summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherBackupHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/LauncherBackupHelper.java')
-rw-r--r--src/com/android/launcher3/LauncherBackupHelper.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/com/android/launcher3/LauncherBackupHelper.java b/src/com/android/launcher3/LauncherBackupHelper.java
index c260fbc33..437434748 100644
--- a/src/com/android/launcher3/LauncherBackupHelper.java
+++ b/src/com/android/launcher3/LauncherBackupHelper.java
@@ -371,16 +371,9 @@ public class LauncherBackupHelper implements BackupHelper {
if (mCurrentProfile != null) {
return mCurrentProfile;
}
- LauncherAppState.setApplicationContext(mContext.getApplicationContext());
- LauncherAppState app = LauncherAppState.getInstance();
-
- DeviceProfile profile;
- if (app.getDynamicGrid() == null) {
- // Initialize the grid
- profile = app.initDynamicGrid(mContext);
- } else {
- profile = app.getDynamicGrid().getDeviceProfile();
- }
+ final Context applicationContext = mContext.getApplicationContext();
+ DeviceProfile profile = LauncherAppState.createDynamicGrid(applicationContext, null)
+ .getDeviceProfile();
mCurrentProfile = new DeviceProfieData();
mCurrentProfile.desktopRows = profile.numRows;