summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/xml/default_workspace_no_all_apps.xml56
-rw-r--r--src/com/android/launcher3/DynamicGrid.java12
-rw-r--r--src/com/android/launcher3/LauncherProvider.java10
3 files changed, 71 insertions, 7 deletions
diff --git a/res/xml/default_workspace_no_all_apps.xml b/res/xml/default_workspace_no_all_apps.xml
new file mode 100644
index 000000000..7e1301cef
--- /dev/null
+++ b/res/xml/default_workspace_no_all_apps.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<favorites xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3">
+ <!-- Hotseat (We use the screen as the position of the item in the hotseat) -->
+ <!-- Dialer Hangouts Maps Chrome Camera -->
+ <favorite
+ launcher:packageName="com.google.android.dialer"
+ launcher:className="com.google.android.dialer.extensions.GoogleDialtactsActivity"
+ launcher:container="-101"
+ launcher:screen="0"
+ launcher:x="0"
+ launcher:y="0" />
+ <favorite
+ launcher:packageName="com.google.android.talk"
+ launcher:className="com.google.android.talk.SigningInActivity"
+ launcher:container="-101"
+ launcher:screen="1"
+ launcher:x="1"
+ launcher:y="0" />
+ <favorite
+ launcher:packageName="com.google.android.apps.maps"
+ launcher:className="com.google.android.maps.MapsActivity"
+ launcher:container="-101"
+ launcher:screen="2"
+ launcher:x="2"
+ launcher:y="0"/>
+ <favorite
+ launcher:packageName="com.android.chrome"
+ launcher:className="com.google.android.apps.chrome.Main"
+ launcher:container="-101"
+ launcher:screen="3"
+ launcher:x="3"
+ launcher:y="0" />
+ <favorite
+ launcher:packageName="com.google.android.GoogleCamera"
+ launcher:className="com.android.camera.CameraLauncher"
+ launcher:container="-101"
+ launcher:screen="4"
+ launcher:x="4"
+ launcher:y="0" />
+</favorites>
+
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);
}