Allow 5 hotseat icons in DISABLE_ALL_APPS mode.
Change-Id: I71510cf079e211bd53e411e6e43f1bc6475f6d35
diff --git a/src/com/android/launcher3/LauncherProvider.java b/src/com/android/launcher3/LauncherProvider.java
index 27b7dae..28efd01 100644
--- a/src/com/android/launcher3/LauncherProvider.java
+++ b/src/com/android/launcher3/LauncherProvider.java
@@ -270,7 +270,8 @@
// Use default workspace resource if none provided
if (workspaceResId == 0) {
- workspaceResId = sp.getInt(DEFAULT_WORKSPACE_RESOURCE_ID, R.xml.default_workspace);
+ workspaceResId =
+ sp.getInt(DEFAULT_WORKSPACE_RESOURCE_ID, getDefaultWorkspaceResourceId());
}
// Populate favorites table with initial favorites
@@ -286,6 +287,14 @@
}
}
+ private static int getDefaultWorkspaceResourceId() {
+ if (AppsCustomizePagedView.DISABLE_ALL_APPS) {
+ return R.xml.default_workspace_no_all_apps;
+ } else {
+ return R.xml.default_workspace;
+ }
+ }
+
private static interface ContentValuesCallback {
public void onRow(ContentValues values);
}