summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2014-10-16 09:49:52 -0700
committerDanesh M <daneshm90@gmail.com>2015-09-27 17:21:49 -0700
commita4a62d4f095b5acbbd95524f98d7c267ea1a2cf4 (patch)
treeba27a211ea4d06ca426528aa1df566701c024ab2
parent869da3eababb833eb62c804ee2f78c639b67be4b (diff)
downloadandroid_packages_apps_Trebuchet-a4a62d4f095b5acbbd95524f98d7c267ea1a2cf4.tar.gz
android_packages_apps_Trebuchet-a4a62d4f095b5acbbd95524f98d7c267ea1a2cf4.tar.bz2
android_packages_apps_Trebuchet-a4a62d4f095b5acbbd95524f98d7c267ea1a2cf4.zip
Adding ability to list folder items in separate file
-> remove all apps default layouts Bug 17569015 Change-Id: I39b899b61d5b1cff2d7801d281dacfc804c403c5
-rw-r--r--res/values/attrs.xml2
-rw-r--r--res/xml/default_workspace_4x4_no_all_apps.xml216
-rw-r--r--res/xml/default_workspace_5x5_no_all_apps.xml218
-rw-r--r--res/xml/default_workspace_5x6_no_all_apps.xml215
-rw-r--r--src/com/android/launcher3/DeviceProfile.java7
-rw-r--r--src/com/android/launcher3/DynamicGrid.java29
-rw-r--r--src/com/android/launcher3/LauncherProvider.java13
7 files changed, 21 insertions, 679 deletions
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index b32c5a2bc..fddb1bcaf 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -130,12 +130,14 @@
<attr name="title" format="reference" />
<attr name="uri" format="string" />
</declare-styleable>
+
<declare-styleable name="Extra">
<attr name="key" format="string" />
<attr name="value" format="string" />
</declare-styleable>
<declare-styleable name="Include">
<attr name="workspace" format="reference" />
+ <attr name="folderItems" format="reference" />
</declare-styleable>
<declare-styleable name="PreloadIconDrawable">
diff --git a/res/xml/default_workspace_4x4_no_all_apps.xml b/res/xml/default_workspace_4x4_no_all_apps.xml
deleted file mode 100644
index aa1c873a9..000000000
--- a/res/xml/default_workspace_4x4_no_all_apps.xml
+++ /dev/null
@@ -1,216 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The CyanogenMod 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">
- <!-- Far-left screen [0] -->
-
- <!-- Left screen [1] -->
-
- <!-- Clock Widget -->
- <appwidget
- launcher:packageName="com.cyanogenmod.lockclock"
- launcher:className="com.cyanogenmod.lockclock.ClockWidgetProvider"
- launcher:screen="1"
- launcher:x="0"
- launcher:y="0"
- launcher:spanX="4"
- launcher:spanY="2" />
-
- <!-- Google Folder -->
- <folder launcher:screen="1" launcher:x="0" launcher:y="3" launcher:title="@string/google_title">
- <favorite
- launcher:className="com.google.android.googlequicksearchbox.SearchActivity"
- launcher:packageName="com.google.android.googlequicksearchbox" />
- <favorite
- launcher:packageName="com.android.chrome"
- launcher:className="com.google.android.apps.chrome.Main" />
- <favorite
- launcher:className="com.google.android.gm.ConversationListActivityGmail"
- launcher:packageName="com.google.android.gm" />
- <favorite
- launcher:className="com.google.android.maps.MapsActivity"
- launcher:packageName="com.google.android.apps.maps" />
- <favorite
- launcher:className="com.google.android.youtube.app.honeycomb.Shell$HomeActivity"
- launcher:packageName="com.google.android.youtube" />
- <favorite
- launcher:className="com.google.android.apps.docs.app.NewMainProxyActivity"
- launcher:packageName="com.google.android.apps.docs" />
- <favorite
- launcher:className="com.google.android.talk.SigningInActivity"
- launcher:packageName="com.google.android.talk" />
- <favorite
- launcher:className="com.google.android.apps.photos.home.HomeActivity"
- launcher:packageName="com.google.android.apps.photos" />
- <favorite
- launcher:className="com.android.calendar.AllInOneActivity"
- launcher:packageName="com.google.android.calendar" />
- <favorite
- launcher:className="com.google.android.apps.plus.phone.HomeActivity"
- launcher:packageName="com.google.android.apps.plus" />
- <favorite
- launcher:className="com.google.android.apps.wallet.entrypoint.WalletRootActivity"
- launcher:packageName="com.google.android.apps.walletnfcrel" />
- <favorite
- launcher:className="com.google.android.apps.genie.geniewidget.activities.NewsActivity"
- launcher:packageName="com.google.android.apps.genie.geniewidget" />
- </folder>
-
- <!-- Play Folder -->
- <folder launcher:screen="1" launcher:x="1" launcher:y="3" launcher:title="@string/play_folder_title">
- <favorite
- launcher:className="com.android.music.activitymanagement.TopLevelActivity"
- launcher:packageName="com.google.android.music" />
- <favorite
- launcher:className="com.google.android.youtube.videos.EntryPoint"
- launcher:packageName="com.google.android.videos" />
- <favorite
- launcher:className="com.google.android.gms.games.ui.destination.main.MainActivity"
- launcher:packageName="com.google.android.play.games" />
- <favorite
- launcher:className="com.google.android.apps.books.app.BooksActivity"
- launcher:packageName="com.google.android.apps.books" />
- <favorite
- launcher:className="com.google.apps.dots.android.app.activity.CurrentsStartActivity"
- launcher:packageName="com.google.android.apps.magazines" />
- </folder>
-
- <favorite
- launcher:packageName="com.cyngn.themestore"
- launcher:className="com.cyngn.themestore.ui.StoreActivity"
- launcher:screen="1"
- launcher:x="2"
- launcher:y="3" />
-
- <resolve
- launcher:screen="1"
- launcher:x="3"
- launcher:y="3" >
- <favorite
- launcher:packageName="com.android.vending"
- launcher:className="com.android.vending.AssetBrowserActivity" />
- <favorite
- launcher:packageName="org.cyanogenmod.theme.chooser"
- launcher:className="org.cyanogenmod.theme.chooser.ChooserActivity" />
- </resolve>
-
- <!-- Screen [2] -->
-
- <appwidget
- launcher:packageName="com.cyanogenmod.eleven"
- launcher:className="com.cyanogenmod.eleven.appwidgets.AppWidgetLarge"
- launcher:screen="2"
- launcher:x="0"
- launcher:y="0"
- launcher:spanX="4"
- launcher:spanY="2" />
-
- <favorite
- launcher:packageName="com.android.email"
- launcher:className="com.android.email.activity.Welcome"
- launcher:screen="2"
- launcher:x="0"
- launcher:y="3" />
-
- <resolve
- launcher:screen="2"
- launcher:x="1"
- launcher:y="3" >
- <favorite
- launcher:packageName="com.cyngn.gallerynext"
- launcher:className="com.cyngn.gallerynext.app.GalleryActivity" />
- <favorite
- launcher:packageName="com.android.gallery3d"
- launcher:className="com.android.gallery3d.app.GalleryActivity" />
- </resolve>
-
- <favorite
- launcher:packageName="com.cyanogenmod.eleven"
- launcher:className="com.cyanogenmod.eleven.ui.activities.HomeActivity"
- launcher:screen="2"
- launcher:x="2"
- launcher:y="3" />
-
- <favorite
- launcher:packageName="com.android.settings"
- launcher:className="com.android.settings.Settings"
- launcher:screen="2"
- launcher:x="3"
- launcher:y="3" />
-
- <!-- Hotseat (We use the screen as the position of the item in the hotseat) -->
- <!-- Dialer, Messaging, [All Apps], Browser, Camera -->
- <resolve
- launcher:container="-101"
- launcher:screen="0"
- launcher:x="0"
- launcher:y="0" >
- <favorite launcher:uri="#Intent;action=android.intent.action.DIAL;end" />
- <favorite launcher:uri="tel:123" />
- <favorite launcher:uri="#Intent;action=android.intent.action.CALL_BUTTON;end" />
-
- <favorite
- launcher:packageName="com.android.dialer"
- launcher:className="com.android.dialer.DialtactsActivity" />
- <favorite
- launcher:packageName="com.android.contacts"
- launcher:className="com.android.contacts.activities.PeopleActivity" />
- </resolve>
-
- <resolve
- launcher:container="-101"
- launcher:screen="1"
- launcher:x="1"
- launcher:y="0" >
- <favorite
- launcher:packageName="com.android.mms"
- launcher:className="com.android.mms.ui.ConversationList" />
- <favorite
- launcher:packageName="com.android.email"
- launcher:className="com.android.email.activity.Welcome" />
- </resolve>
-
- <resolve
- launcher:container="-101"
- launcher:screen="3"
- launcher:x="2"
- launcher:y="0" >
- <favorite
- launcher:packageName="com.android.browser"
- launcher:className="com.android.browser.BrowserActivity" />
- <favorite
- launcher:packageName="com.cyngn.browser"
- launcher:className="com.android.browser.BrowserLauncher" />
- <favorite
- launcher:packageName="com.android.chrome"
- launcher:className="com.google.android.apps.chrome.Main" />
- </resolve>
-
- <resolve
- launcher:container="-101"
- launcher:screen="4"
- launcher:x="3"
- launcher:y="0" >
- <favorite
- launcher:packageName="com.cyngn.cameranext"
- launcher:className="com.android.camera.CameraLauncher" />
- <favorite
- launcher:packageName="com.android.camera2"
- launcher:className="com.android.camera.CameraLauncher" />
- </resolve>
-
-</favorites>
-
diff --git a/res/xml/default_workspace_5x5_no_all_apps.xml b/res/xml/default_workspace_5x5_no_all_apps.xml
deleted file mode 100644
index 421b4bc99..000000000
--- a/res/xml/default_workspace_5x5_no_all_apps.xml
+++ /dev/null
@@ -1,218 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The CyanogenMod 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">
- <!-- Far-left screen [0] -->
-
- <!-- Left screen [1] -->
-
- <!-- Clock Widget -->
- <appwidget
- launcher:packageName="com.cyanogenmod.lockclock"
- launcher:className="com.cyanogenmod.lockclock.ClockWidgetProvider"
- launcher:screen="1"
- launcher:x="0"
- launcher:y="0"
- launcher:spanX="5"
- launcher:spanY="2" />
-
- <!-- Google Folder -->
- <folder launcher:screen="1" launcher:x="0" launcher:y="4" launcher:title="@string/google_title">
- <favorite
- launcher:className="com.google.android.googlequicksearchbox.SearchActivity"
- launcher:packageName="com.google.android.googlequicksearchbox" />
- <favorite
- launcher:packageName="com.android.chrome"
- launcher:className="com.google.android.apps.chrome.Main" />
- <favorite
- launcher:className="com.google.android.gm.ConversationListActivityGmail"
- launcher:packageName="com.google.android.gm" />
- <favorite
- launcher:className="com.google.android.maps.MapsActivity"
- launcher:packageName="com.google.android.apps.maps" />
- <favorite
- launcher:className="com.google.android.youtube.app.honeycomb.Shell$HomeActivity"
- launcher:packageName="com.google.android.youtube" />
- <favorite
- launcher:className="com.google.android.apps.docs.app.NewMainProxyActivity"
- launcher:packageName="com.google.android.apps.docs" />
- <favorite
- launcher:className="com.google.android.talk.SigningInActivity"
- launcher:packageName="com.google.android.talk" />
- <favorite
- launcher:className="com.google.android.apps.photos.home.HomeActivity"
- launcher:packageName="com.google.android.apps.photos" />
- <favorite
- launcher:className="com.android.calendar.AllInOneActivity"
- launcher:packageName="com.google.android.calendar" />
- <favorite
- launcher:className="com.google.android.apps.plus.phone.HomeActivity"
- launcher:packageName="com.google.android.apps.plus" />
- <favorite
- launcher:className="com.google.android.apps.wallet.entrypoint.WalletRootActivity"
- launcher:packageName="com.google.android.apps.walletnfcrel" />
- <favorite
- launcher:className="com.google.android.apps.genie.geniewidget.activities.NewsActivity"
- launcher:packageName="com.google.android.apps.genie.geniewidget" />
- </folder>
-
- <!-- Play Folder -->
- <folder launcher:screen="1" launcher:x="1" launcher:y="4" launcher:title="@string/play_folder_title">
- <favorite
- launcher:className="com.android.music.activitymanagement.TopLevelActivity"
- launcher:packageName="com.google.android.music" />
- <favorite
- launcher:className="com.google.android.youtube.videos.EntryPoint"
- launcher:packageName="com.google.android.videos" />
- <favorite
- launcher:className="com.google.android.gms.games.ui.destination.main.MainActivity"
- launcher:packageName="com.google.android.play.games" />
- <favorite
- launcher:className="com.google.android.apps.books.app.BooksActivity"
- launcher:packageName="com.google.android.apps.books" />
- <favorite
- launcher:className="com.google.apps.dots.android.app.activity.CurrentsStartActivity"
- launcher:packageName="com.google.android.apps.magazines" />
- </folder>
-
- <favorite
- launcher:packageName="com.cyngn.themestore"
- launcher:className="com.cyngn.themestore.ui.StoreActivity"
- launcher:screen="1"
- launcher:x="3"
- launcher:y="4" />
-
- <resolve
- launcher:screen="1"
- launcher:x="4"
- launcher:y="4" >
- <favorite
- launcher:packageName="com.android.vending"
- launcher:className="com.android.vending.AssetBrowserActivity" />
- <favorite
- launcher:packageName="org.cyanogenmod.theme.chooser"
- launcher:className="org.cyanogenmod.theme.chooser.ChooserActivity" />
- <favorite
- launcher:packageName="com.android.vending"
- launcher:className="com.android.vending.AssetBrowserActivity" />
- </resolve>
-
- <!-- Screen [2] -->
-
- <appwidget
- launcher:packageName="com.cyanogenmod.eleven"
- launcher:className="com.cyanogenmod.eleven.appwidgets.AppWidgetLarge"
- launcher:screen="2"
- launcher:x="0"
- launcher:y="0"
- launcher:spanX="5"
- launcher:spanY="2" />
-
- <favorite
- launcher:packageName="com.android.email"
- launcher:className="com.android.email.activity.Welcome"
- launcher:screen="2"
- launcher:x="0"
- launcher:y="4" />
-
- <resolve
- launcher:screen="2"
- launcher:x="1"
- launcher:y="4" >
- <favorite
- launcher:packageName="com.cyngn.gallerynext"
- launcher:className="com.cyngn.gallerynext.app.GalleryActivity" />
- <favorite
- launcher:packageName="com.android.gallery3d"
- launcher:className="com.android.gallery3d.app.GalleryActivity" />
- </resolve>
-
- <favorite
- launcher:packageName="com.cyanogenmod.eleven"
- launcher:className="com.cyanogenmod.eleven.ui.activities.HomeActivity"
- launcher:screen="2"
- launcher:x="0"
- launcher:y="4" />
-
- <favorite
- launcher:packageName="com.android.settings"
- launcher:className="com.android.settings.Settings"
- launcher:screen="2"
- launcher:x="4"
- launcher:y="4" />
-
- <!-- Hotseat (We use the screen as the position of the item in the hotseat) -->
- <!-- Dialer, Messaging, [All Apps], Browser, Camera -->
- <resolve
- launcher:container="-101"
- launcher:screen="0"
- launcher:x="0"
- launcher:y="0" >
- <favorite launcher:uri="#Intent;action=android.intent.action.DIAL;end" />
- <favorite launcher:uri="tel:123" />
- <favorite launcher:uri="#Intent;action=android.intent.action.CALL_BUTTON;end" />
-
- <favorite
- launcher:packageName="com.android.dialer"
- launcher:className="com.android.dialer.DialtactsActivity" />
- <favorite
- launcher:packageName="com.android.contacts"
- launcher:className="com.android.contacts.activities.PeopleActivity" />
- </resolve>
-
- <resolve
- launcher:container="-101"
- launcher:screen="1"
- launcher:x="1"
- launcher:y="0" >
- <favorite
- launcher:packageName="com.android.mms"
- launcher:className="com.android.mms.ui.ConversationList" />
- <favorite
- launcher:packageName="com.android.email"
- launcher:className="com.android.email.activity.Welcome" />
- </resolve>
-
- <resolve
- launcher:container="-101"
- launcher:screen="3"
- launcher:x="2"
- launcher:y="0" >
- <favorite
- launcher:packageName="com.android.browser"
- launcher:className="com.android.browser.BrowserActivity" />
- <favorite
- launcher:packageName="com.cyngn.browser"
- launcher:className="com.android.browser.BrowserLauncher" />
- <favorite
- launcher:packageName="com.android.chrome"
- launcher:className="com.google.android.apps.chrome.Main" />
- </resolve>
-
- <resolve
- launcher:container="-101"
- launcher:screen="4"
- launcher:x="3"
- launcher:y="0" >
- <favorite
- launcher:packageName="com.cyngn.cameranext"
- launcher:className="com.android.camera.CameraLauncher" />
- <favorite
- launcher:packageName="com.android.camera2"
- launcher:className="com.android.camera.CameraLauncher" />
- </resolve>
-
-</favorites> \ No newline at end of file
diff --git a/res/xml/default_workspace_5x6_no_all_apps.xml b/res/xml/default_workspace_5x6_no_all_apps.xml
deleted file mode 100644
index 130c4858d..000000000
--- a/res/xml/default_workspace_5x6_no_all_apps.xml
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The CyanogenMod 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">
- <!-- Far-left screen [0] -->
-
- <!-- Left screen [1] -->
-
- <!-- Clock Widget -->
- <appwidget
- launcher:packageName="com.cyanogenmod.lockclock"
- launcher:className="com.cyanogenmod.lockclock.ClockWidgetProvider"
- launcher:screen="1"
- launcher:x="0"
- launcher:y="0"
- launcher:spanX="6"
- launcher:spanY="2" />
-
- <!-- Google Folder -->
- <folder launcher:screen="1" launcher:x="0" launcher:y="4" launcher:title="@string/google_title">
- <favorite
- launcher:className="com.google.android.googlequicksearchbox.SearchActivity"
- launcher:packageName="com.google.android.googlequicksearchbox" />
- <favorite
- launcher:packageName="com.android.chrome"
- launcher:className="com.google.android.apps.chrome.Main" />
- <favorite
- launcher:className="com.google.android.gm.ConversationListActivityGmail"
- launcher:packageName="com.google.android.gm" />
- <favorite
- launcher:className="com.google.android.maps.MapsActivity"
- launcher:packageName="com.google.android.apps.maps" />
- <favorite
- launcher:className="com.google.android.youtube.app.honeycomb.Shell$HomeActivity"
- launcher:packageName="com.google.android.youtube" />
- <favorite
- launcher:className="com.google.android.apps.docs.app.NewMainProxyActivity"
- launcher:packageName="com.google.android.apps.docs" />
- <favorite
- launcher:className="com.google.android.talk.SigningInActivity"
- launcher:packageName="com.google.android.talk" />
- <favorite
- launcher:className="com.google.android.apps.photos.home.HomeActivity"
- launcher:packageName="com.google.android.apps.photos" />
- <favorite
- launcher:className="com.android.calendar.AllInOneActivity"
- launcher:packageName="com.google.android.calendar" />
- <favorite
- launcher:className="com.google.android.apps.plus.phone.HomeActivity"
- launcher:packageName="com.google.android.apps.plus" />
- <favorite
- launcher:className="com.google.android.apps.wallet.entrypoint.WalletRootActivity"
- launcher:packageName="com.google.android.apps.walletnfcrel" />
- <favorite
- launcher:className="com.google.android.apps.genie.geniewidget.activities.NewsActivity"
- launcher:packageName="com.google.android.apps.genie.geniewidget" />
- </folder>
-
- <!-- Play Folder -->
- <folder launcher:screen="1" launcher:x="1" launcher:y="4" launcher:title="@string/play_folder_title">
- <favorite
- launcher:className="com.android.music.activitymanagement.TopLevelActivity"
- launcher:packageName="com.google.android.music" />
- <favorite
- launcher:className="com.google.android.youtube.videos.EntryPoint"
- launcher:packageName="com.google.android.videos" />
- <favorite
- launcher:className="com.google.android.gms.games.ui.destination.main.MainActivity"
- launcher:packageName="com.google.android.play.games" />
- <favorite
- launcher:className="com.google.android.apps.books.app.BooksActivity"
- launcher:packageName="com.google.android.apps.books" />
- <favorite
- launcher:className="com.google.apps.dots.android.app.activity.CurrentsStartActivity"
- launcher:packageName="com.google.android.apps.magazines" />
- </folder>
-
- <favorite
- launcher:packageName="com.cyngn.themestore"
- launcher:className="com.cyngn.themestore.ui.StoreActivity"
- launcher:screen="1"
- launcher:x="2"
- launcher:y="3" />
-
- <resolve
- launcher:screen="1"
- launcher:x="5"
- launcher:y="4" >
- <favorite
- launcher:packageName="com.android.vending"
- launcher:className="com.android.vending.AssetBrowserActivity" />
- <favorite
- launcher:packageName="org.cyanogenmod.theme.chooser"
- launcher:className="org.cyanogenmod.theme.chooser.ChooserActivity" />
- </resolve>
-
- <!-- Screen [2] -->
-
- <appwidget
- launcher:packageName="com.cyanogenmod.eleven"
- launcher:className="com.cyanogenmod.eleven.appwidgets.AppWidgetLarge"
- launcher:screen="2"
- launcher:x="0"
- launcher:y="0"
- launcher:spanX="6"
- launcher:spanY="2" />
-
- <favorite
- launcher:packageName="com.android.email"
- launcher:className="com.android.email.activity.Welcome"
- launcher:screen="2"
- launcher:x="0"
- launcher:y="4" />
-
- <resolve
- launcher:screen="2"
- launcher:x="1"
- launcher:y="4" >
- <favorite
- launcher:packageName="com.cyngn.gallerynext"
- launcher:className="com.cyngn.gallerynext.app.GalleryActivity" />
- <favorite
- launcher:packageName="com.android.gallery3d"
- launcher:className="com.android.gallery3d.app.GalleryActivity" />
- </resolve>
-
- <favorite
- launcher:packageName="com.cyanogenmod.eleven"
- launcher:className="com.cyanogenmod.eleven.ui.activities.HomeActivity"
- launcher:screen="2"
- launcher:x="2"
- launcher:y="4" />
-
- <favorite
- launcher:packageName="com.android.settings"
- launcher:className="com.android.settings.Settings"
- launcher:screen="2"
- launcher:x="5"
- launcher:y="4" />
-
- <!-- Hotseat (We use the screen as the position of the item in the hotseat) -->
- <!-- Dialer, Messaging, [All Apps], Browser, Camera -->
- <resolve
- launcher:container="-101"
- launcher:screen="1"
- launcher:x="1"
- launcher:y="0" >
- <favorite launcher:uri="#Intent;action=android.intent.action.DIAL;end" />
- <favorite launcher:uri="tel:123" />
- <favorite launcher:uri="#Intent;action=android.intent.action.CALL_BUTTON;end" />
-
- <favorite
- launcher:packageName="com.android.dialer"
- launcher:className="com.android.dialer.DialtactsActivity" />
- <favorite
- launcher:packageName="com.android.contacts"
- launcher:className="com.android.contacts.activities.PeopleActivity" />
- </resolve>
-
- <resolve
- launcher:container="-101"
- launcher:screen="2"
- launcher:x="2"
- launcher:y="0" >
- <favorite
- launcher:packageName="com.android.mms"
- launcher:className="com.android.mms.ui.ConversationList" />
- <favorite
- launcher:packageName="com.android.email"
- launcher:className="com.android.email.activity.Welcome" />
- </resolve>
-
- <resolve
- launcher:container="-101"
- launcher:screen="4"
- launcher:x="5"
- launcher:y="0" >
- <favorite
- launcher:packageName="com.android.browser"
- launcher:className="com.android.browser.BrowserActivity" />
- <favorite
- launcher:packageName="com.cyngn.browser"
- launcher:className="com.android.browser.BrowserLauncher" />
- <favorite
- launcher:packageName="com.android.chrome"
- launcher:className="com.google.android.apps.chrome.Main" />
- </resolve>
-
- <resolve
- launcher:container="-101"
- launcher:screen="5"
- launcher:x="6"
- launcher:y="0" >
- <favorite
- launcher:packageName="com.cyngn.cameranext"
- launcher:className="com.android.camera.CameraLauncher" />
- <favorite
- launcher:packageName="com.android.camera2"
- launcher:className="com.android.camera.CameraLauncher" />
- </resolve>
-
-</favorites> \ No newline at end of file
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index bbd4932f3..1db7953d8 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -110,7 +110,6 @@ public class DeviceProfile {
private float hotseatIconSize;
int defaultLayoutId;
- int defaultNoAllAppsLayoutId;
boolean isLandscape;
boolean isTablet;
@@ -173,7 +172,7 @@ public class DeviceProfile {
private ArrayList<DeviceProfileCallbacks> mCallbacks = new ArrayList<DeviceProfileCallbacks>();
DeviceProfile(String n, float w, float h, float r, float c,
- float is, float its, float hs, float his, int dlId, int dnalId) {
+ float is, float its, float hs, float his, int dlId) {
// Ensure that we have an odd number of hotseat items (since we need to place all apps)
if (!LauncherAppState.isDisableAllApps() && hs % 2 == 0) {
throw new RuntimeException("All Device Profiles must have an odd number of hotseat spaces");
@@ -189,7 +188,6 @@ public class DeviceProfile {
numHotseatIcons = hs;
hotseatIconSize = his;
defaultLayoutId = dlId;
- defaultNoAllAppsLayoutId = dnalId;
}
DeviceProfile() {
@@ -275,9 +273,6 @@ public class DeviceProfile {
// Snap to the closest default layout id
defaultLayoutId = closestProfile.defaultLayoutId;
- // Snap to the closest default no all-apps layout id
- defaultNoAllAppsLayoutId = closestProfile.defaultNoAllAppsLayoutId;
-
// Interpolate the icon size
points.clear();
for (DeviceProfile p : profiles) {
diff --git a/src/com/android/launcher3/DynamicGrid.java b/src/com/android/launcher3/DynamicGrid.java
index 779a5a6d8..6e889de82 100644
--- a/src/com/android/launcher3/DynamicGrid.java
+++ b/src/com/android/launcher3/DynamicGrid.java
@@ -68,47 +68,40 @@ public class DynamicGrid {
// Our phone profiles include the bar sizes in each orientation
deviceProfiles.add(new DeviceProfile("Super Short Stubby",
255, 300, 2, 3, (useLargeIcons ? 58 : 46), 13, (hasAA ? 3 : 5),
- (useLargeIcons ? 58 : 46), fourByFourDefaultLayout,
- R.xml.default_workspace_4x4_no_all_apps));
+ (useLargeIcons ? 58 : 46), fourByFourDefaultLayout));
deviceProfiles.add(new DeviceProfile("Shorter Stubby",
255, 400, 3, 3, (useLargeIcons ? 58 : 46), 13, (hasAA ? 3 : 5),
- (useLargeIcons ? 58 : 46), fourByFourDefaultLayout,
- R.xml.default_workspace_4x4_no_all_apps));
+ (useLargeIcons ? 58 : 46), fourByFourDefaultLayout));
deviceProfiles.add(new DeviceProfile("Short Stubby",
275, 420, 3, 4, (useLargeIcons ? 58 : 46), 13, (hasAA ? 5 : 5),
- (useLargeIcons ? 58 : 46), fourByFourDefaultLayout,
- R.xml.default_workspace_4x4_no_all_apps));
+ (useLargeIcons ? 58 : 46), fourByFourDefaultLayout));
deviceProfiles.add(new DeviceProfile("Stubby",
255, 450, 3, 4, (useLargeIcons ? 58 : 46), 13, (hasAA ? 5 : 5),
- (useLargeIcons ? 58 : 46), fourByFourDefaultLayout,
- R.xml.default_workspace_4x4_no_all_apps));
+ (useLargeIcons ? 58 : 46), fourByFourDefaultLayout));
deviceProfiles.add(new DeviceProfile("Nexus S",
296, 491.33f, 4, 4, (useLargeIcons ? 58 : 46), 13, (hasAA ? 5 : 5),
- (useLargeIcons ? 58 : 46), fourByFourDefaultLayout,
- R.xml.default_workspace_4x4_no_all_apps));
+ (useLargeIcons ? 58 : 46), fourByFourDefaultLayout));
deviceProfiles.add(new DeviceProfile("Nexus 4",
335, 567, 4, 4, (useLargeIcons ? DEFAULT_ICON_SIZE_DP : 56), 13, (hasAA ? 5 : 5),
- (useLargeIcons ? 60 : 48), fourByFourDefaultLayout,
- R.xml.default_workspace_4x4_no_all_apps));
+ (useLargeIcons ? 60 : 48), fourByFourDefaultLayout));
deviceProfiles.add(new DeviceProfile("Nexus 5",
359, 567, 4, 4, (useLargeIcons ? DEFAULT_ICON_SIZE_DP : 56), 13, (hasAA ? 5 : 5),
- (useLargeIcons ? 60 : 48), fourByFourDefaultLayout,
- R.xml.default_workspace_4x4_no_all_apps));
+ (useLargeIcons ? 60 : 48), fourByFourDefaultLayout));
deviceProfiles.add(new DeviceProfile("Large Phone",
406, 694, 5, 5, (useLargeIcons ? 68 : 56), 14.4f, 5, (useLargeIcons ? 60 : 48),
- R.xml.default_workspace_5x5, R.xml.default_workspace_5x5_no_all_apps));
+ R.xml.default_workspace_5x5));
// The tablet profile is odd in that the landscape orientation
// also includes the nav bar on the side
deviceProfiles.add(new DeviceProfile("Nexus 7",
575, 904, 5, 6, (useLargeIcons ? 76 : 60), 14.4f, 7, (useLargeIcons ? 64 : 52),
- R.xml.default_workspace_5x6, R.xml.default_workspace_5x6_no_all_apps));
+ R.xml.default_workspace_5x6));
// Larger tablet profiles always have system bars on the top & bottom
deviceProfiles.add(new DeviceProfile("Nexus 10",
727, 1207, 5, 6, (useLargeIcons ? 80 : 64), 14.4f, 7, (useLargeIcons ? 68 : 56),
- R.xml.default_workspace_5x6, R.xml.default_workspace_5x6_no_all_apps));
+ R.xml.default_workspace_5x6));
deviceProfiles.add(new DeviceProfile("20-inch Tablet",
1527, 2527, 7, 7, (useLargeIcons ? 104 : 80), 20, 7, (useLargeIcons ? 76 : 64),
- fourByFourDefaultLayout, R.xml.default_workspace_4x4_no_all_apps));
+ fourByFourDefaultLayout));
mMinWidth = dpiFromPx(minWidthPx, dm);
mMinHeight = dpiFromPx(minHeightPx, dm);
mProfile = new DeviceProfile(context, deviceProfiles,
diff --git a/src/com/android/launcher3/LauncherProvider.java b/src/com/android/launcher3/LauncherProvider.java
index b0098662a..d7de2c733 100644
--- a/src/com/android/launcher3/LauncherProvider.java
+++ b/src/com/android/launcher3/LauncherProvider.java
@@ -360,11 +360,7 @@ public class LauncherProvider extends ContentProvider {
private static int getDefaultWorkspaceResourceId() {
LauncherAppState app = LauncherAppState.getInstance();
DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
- if (LauncherAppState.isDisableAllApps()) {
- return grid.defaultNoAllAppsLayoutId;
- } else {
- return grid.defaultLayoutId;
- }
+ return grid.defaultLayoutId;
}
private static interface ContentValuesCallback {
@@ -399,6 +395,7 @@ public class LauncherProvider extends ContentProvider {
private static final String TAG_PARTNER_FOLDER = "partner-folder";
private static final String TAG_EXTRA = "extra";
private static final String TAG_INCLUDE = "include";
+ private static final String TAG_FOLDER_ITEMS = "folderitems";
// Style attrs -- "Favorite"
private static final String ATTR_CLASS_NAME = "className";
@@ -415,6 +412,7 @@ public class LauncherProvider extends ContentProvider {
// Style attrs -- "Include"
private static final String ATTR_WORKSPACE = "workspace";
+ private static final String ATTR_FOLDER_ITEMS = "folderItems";
// Style attrs -- "Extra"
private static final String ATTR_KEY = "key";
@@ -1668,7 +1666,10 @@ public class LauncherProvider extends ContentProvider {
folderItems.add(id);
}
} else if (TAG_INCLUDE.equals(tag) && folderId >= 0) {
- addToFolder(db, res, parser, folderItems, folderId);
+ final int resId = getAttributeResourceValue(parser, ATTR_FOLDER_ITEMS, 0);
+ XmlResourceParser itemsParser = res.getXml(resId);
+ beginDocument(itemsParser, TAG_FOLDER_ITEMS);
+ addToFolder(db, res, itemsParser, folderItems, folderId);
} else {
throw new RuntimeException("Folders can contain only shortcuts");
}