diff options
author | Nilesh Agrawal <nileshagrawal@google.com> | 2013-12-09 14:17:49 -0800 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2014-06-06 22:54:21 -0700 |
commit | 33832e262378ca9e6da33f43efd406ba692bb530 (patch) | |
tree | 7a3880d7c01ff79cd6d8d9cef7c8f5d0988f280c /src | |
parent | 3ca339fe99358b4a8acf6f332b932e00b8e3c292 (diff) | |
download | android_packages_apps_Trebuchet-33832e262378ca9e6da33f43efd406ba692bb530.tar.gz android_packages_apps_Trebuchet-33832e262378ca9e6da33f43efd406ba692bb530.tar.bz2 android_packages_apps_Trebuchet-33832e262378ca9e6da33f43efd406ba692bb530.zip |
Allow 5 hotseat icons in DISABLE_ALL_APPS mode.
Added the xml resource in Launcher3 package as well.
This is a dummy resource with just hotseat icons.
Previously reviewed on: http://ag/396580
Change-Id: I31b0d7d4796d028f44f746260c381f2d8226605a
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/DynamicGrid.java | 12 | ||||
-rw-r--r-- | src/com/android/launcher3/LauncherProvider.java | 10 |
2 files changed, 15 insertions, 7 deletions
diff --git a/src/com/android/launcher3/DynamicGrid.java b/src/com/android/launcher3/DynamicGrid.java index bec6690e1..6b7eee83b 100644 --- a/src/com/android/launcher3/DynamicGrid.java +++ b/src/com/android/launcher3/DynamicGrid.java @@ -63,17 +63,17 @@ public class DynamicGrid { DEFAULT_ICON_SIZE_PX = pxFromDp(DEFAULT_ICON_SIZE_DP, dm); // Our phone profiles include the bar sizes in each orientation deviceProfiles.add(new DeviceProfile("Super Short Stubby", - 255, 300, 2, 3, (useLargeIcons ? 54 : 48), 13, (hasAA ? 5 : 4), (useLargeIcons ? 54 : 48))); + 255, 300, 2, 3, (useLargeIcons ? 54 : 48), 13, (hasAA ? 5 : 5), (useLargeIcons ? 54 : 48))); deviceProfiles.add(new DeviceProfile("Shorter Stubby", - 255, 400, 3, 3, (useLargeIcons ? 54 : 48), 13, (hasAA ? 5 : 4), (useLargeIcons ? 54 : 48))); + 255, 400, 3, 3, (useLargeIcons ? 54 : 48), 13, (hasAA ? 5 : 5), (useLargeIcons ? 54 : 48))); deviceProfiles.add(new DeviceProfile("Short Stubby", - 275, 420, 3, 4, (useLargeIcons ? 54 : 48), 13, (hasAA ? 5 : 4), (useLargeIcons ? 54 : 48))); + 275, 420, 3, 4, (useLargeIcons ? 54 : 48), 13, (hasAA ? 5 : 5), (useLargeIcons ? 54 : 48))); deviceProfiles.add(new DeviceProfile("Stubby", - 255, 450, 3, 4, (useLargeIcons ? 54 : 48), 13, (hasAA ? 5 : 4), (useLargeIcons ? 54 : 48))); + 255, 450, 3, 4, (useLargeIcons ? 54 : 48), 13, (hasAA ? 5 : 5), (useLargeIcons ? 54 : 48))); deviceProfiles.add(new DeviceProfile("Nexus S", - 296, 491.33f, 4, 4, (useLargeIcons ? 56 : 48), 13, (hasAA ? 5 : 4), (useLargeIcons ? 56 : 48))); + 296, 491.33f, 4, 4, (useLargeIcons ? 56 : 48), 13, (hasAA ? 5 : 5), (useLargeIcons ? 56 : 48))); deviceProfiles.add(new DeviceProfile("Nexus 4", - 359, 518, 4, 4, (useLargeIcons ? DEFAULT_ICON_SIZE_DP : 52), 13, (hasAA ? 5 : 4), (useLargeIcons ? 56 : 48))); + 359, 518, 4, 4, (useLargeIcons ? DEFAULT_ICON_SIZE_DP : 52), 13, (hasAA ? 5 : 5), (useLargeIcons ? 56 : 48))); // The tablet profile is odd in that the landscape orientation // also includes the nav bar on the side deviceProfiles.add(new DeviceProfile("Nexus 7", diff --git a/src/com/android/launcher3/LauncherProvider.java b/src/com/android/launcher3/LauncherProvider.java index 3cffa3465..fe7e279a3 100644 --- a/src/com/android/launcher3/LauncherProvider.java +++ b/src/com/android/launcher3/LauncherProvider.java @@ -277,7 +277,7 @@ public class LauncherProvider extends ContentProvider { if (tm.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE) { workspaceResId = sp.getInt(DEFAULT_WORKSPACE_RESOURCE_ID, R.xml.default_workspace_no_telephony); } else { - workspaceResId = sp.getInt(DEFAULT_WORKSPACE_RESOURCE_ID, R.xml.default_workspace); + workspaceResId = sp.getInt(DEFAULT_WORKSPACE_RESOURCE_ID, getDefaultWorkspaceResourceId()); } } @@ -294,6 +294,14 @@ public class LauncherProvider extends ContentProvider { } } + 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); } |