diff options
-rw-r--r-- | res/xml-sw600dp/default_workspace.xml | 10 | ||||
-rw-r--r-- | res/xml-sw600dp/default_workspace_no_telephony.xml | 96 | ||||
-rw-r--r-- | res/xml-sw600dp/update_workspace.xml | 53 | ||||
-rw-r--r-- | res/xml-sw600dp/update_workspace_no_telephony.xml | 53 | ||||
-rw-r--r-- | res/xml-sw720dp/default_workspace.xml | 10 | ||||
-rw-r--r-- | res/xml-sw720dp/default_workspace_no_telephony.xml | 96 | ||||
-rw-r--r-- | res/xml-sw720dp/update_workspace.xml | 53 | ||||
-rw-r--r-- | res/xml-sw720dp/update_workspace_no_telephony.xml | 53 | ||||
-rw-r--r-- | res/xml/default_workspace.xml | 8 | ||||
-rw-r--r-- | res/xml/default_workspace_no_telephony.xml | 96 | ||||
-rw-r--r-- | res/xml/update_workspace_no_telephony.xml | 53 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/LauncherProvider.java | 15 |
12 files changed, 580 insertions, 16 deletions
diff --git a/res/xml-sw600dp/default_workspace.xml b/res/xml-sw600dp/default_workspace.xml index 58bf210..96cd861 100644 --- a/res/xml-sw600dp/default_workspace.xml +++ b/res/xml-sw600dp/default_workspace.xml @@ -29,13 +29,13 @@ <!-- Middle screen [2] --> <appwidget - launcher:packageName="com.android.deskclock" - launcher:className="com.android.alarmclock.AnalogAppWidgetProvider" + launcher:packageName="com.cyanogenmod.lockclock" + launcher:className="com.cyanogenmod.lockclock.ClockWidgetProvider" launcher:screen="2" - launcher:x="1" + launcher:x="0" launcher:y="0" - launcher:spanX="2" - launcher:spanY="2" /> + launcher:spanX="3" + launcher:spanY="3" /> <favorite launcher:packageName="com.android.camera" launcher:className="com.android.camera.Camera" diff --git a/res/xml-sw600dp/default_workspace_no_telephony.xml b/res/xml-sw600dp/default_workspace_no_telephony.xml new file mode 100644 index 0000000..233bb18 --- /dev/null +++ b/res/xml-sw600dp/default_workspace_no_telephony.xml @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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/com.cyanogenmod.trebuchet"> + <!-- Far-left screen [0] --> + + <!-- Left screen [1] --> + <appwidget + launcher:packageName="com.android.settings" + launcher:className="com.android.settings.widget.SettingsAppWidgetProvider" + launcher:screen="1" + launcher:x="0" + launcher:y="3" + launcher:spanX="4" + launcher:spanY="1" /> + + <!-- Middle screen [2] --> + <appwidget + launcher:packageName="com.cyanogenmod.lockclock" + launcher:className="com.cyanogenmod.lockclock.ClockWidgetProvider" + launcher:screen="2" + launcher:x="0" + launcher:y="0" + launcher:spanX="3" + launcher:spanY="3" /> + <favorite + launcher:packageName="com.android.camera" + launcher:className="com.android.camera.Camera" + launcher:screen="2" + launcher:x="0" + launcher:y="3" /> + + <!-- Right screen [3] --> + <favorite + launcher:packageName="com.android.gallery3d" + launcher:className="com.android.gallery3d.app.Gallery" + launcher:screen="3" + launcher:x="1" + launcher:y="3" /> + <favorite + launcher:packageName="com.android.settings" + launcher:className="com.android.settings.Settings" + launcher:screen="3" + launcher:x="2" + launcher:y="3" /> + + <!-- Far-right screen [4] --> + + <!-- Hotseat (We use the screen as the position of the item in the hotseat) --> + <favorite + launcher:packageName="com.android.email" + launcher:className="com.android.email.activity.Welcome" + launcher:container="-101" + launcher:screen="0" + launcher:x="1" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.calendar" + launcher:className="com.android.calendar.AllInOneActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="2" + launcher:y="0" /> + <allapps + launcher:container="-101" + launcher:screen="0" + launcher:x="3" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.contacts" + launcher:className="com.android.contacts.activities.PeopleActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="4" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.browser" + launcher:className="com.android.browser.BrowserActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="5" + launcher:y="0" /> +</favorites> diff --git a/res/xml-sw600dp/update_workspace.xml b/res/xml-sw600dp/update_workspace.xml new file mode 100644 index 0000000..d705653 --- /dev/null +++ b/res/xml-sw600dp/update_workspace.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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/com.cyanogenmod.trebuchet"> + <!-- Update the db with new hotseat all apps button. --> + <!-- Hotseat (We use the screen as the position of the item in the hotseat) --> + <favorite + launcher:packageName="com.android.contacts" + launcher:className="com.android.contacts.activities.DialtactsActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="1" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.contacts" + launcher:className="com.android.contacts.activities.PeopleActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="2" + launcher:y="0" /> + <allapps + launcher:container="-101" + launcher:screen="0" + launcher:x="3" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.mms" + launcher:className="com.android.mms.ui.ConversationList" + launcher:container="-101" + launcher:screen="0" + launcher:x="4" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.browser" + launcher:className="com.android.browser.BrowserActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="5" + launcher:y="0" /> +</favorites> diff --git a/res/xml-sw600dp/update_workspace_no_telephony.xml b/res/xml-sw600dp/update_workspace_no_telephony.xml new file mode 100644 index 0000000..cfa0058 --- /dev/null +++ b/res/xml-sw600dp/update_workspace_no_telephony.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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/com.cyanogenmod.trebuchet"> + <!-- Update the db with new hotseat all apps button. --> + <!-- Hotseat (We use the screen as the position of the item in the hotseat) --> + <favorite + launcher:packageName="com.android.email" + launcher:className="com.android.email.activity.Welcome" + launcher:container="-101" + launcher:screen="0" + launcher:x="1" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.calendar" + launcher:className="com.android.calendar.AllInOneActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="2" + launcher:y="0" /> + <allapps + launcher:container="-101" + launcher:screen="0" + launcher:x="3" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.contacts" + launcher:className="com.android.contacts.activities.PeopleActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="4" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.browser" + launcher:className="com.android.browser.BrowserActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="5" + launcher:y="0" /> +</favorites> diff --git a/res/xml-sw720dp/default_workspace.xml b/res/xml-sw720dp/default_workspace.xml index ed4b572..95a8b31 100644 --- a/res/xml-sw720dp/default_workspace.xml +++ b/res/xml-sw720dp/default_workspace.xml @@ -29,13 +29,13 @@ <!-- Middle screen [2] --> <appwidget - launcher:packageName="com.android.deskclock" - launcher:className="com.android.alarmclock.AnalogAppWidgetProvider" + launcher:packageName="com.cyanogenmod.lockclock" + launcher:className="com.cyanogenmod.lockclock.ClockWidgetProvider" launcher:screen="2" - launcher:x="1" + launcher:x="0" launcher:y="0" - launcher:spanX="2" - launcher:spanY="2" /> + launcher:spanX="3" + launcher:spanY="4" /> <favorite launcher:packageName="com.android.camera" launcher:className="com.android.camera.Camera" diff --git a/res/xml-sw720dp/default_workspace_no_telephony.xml b/res/xml-sw720dp/default_workspace_no_telephony.xml new file mode 100644 index 0000000..34f8af4 --- /dev/null +++ b/res/xml-sw720dp/default_workspace_no_telephony.xml @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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/com.cyanogenmod.trebuchet"> + <!-- Far-left screen [0] --> + + <!-- Left screen [1] --> + <appwidget + launcher:packageName="com.android.settings" + launcher:className="com.android.settings.widget.SettingsAppWidgetProvider" + launcher:screen="1" + launcher:x="0" + launcher:y="3" + launcher:spanX="4" + launcher:spanY="1" /> + + <!-- Middle screen [2] --> + <appwidget + launcher:packageName="com.cyanogenmod.lockclock" + launcher:className="com.cyanogenmod.lockclock.ClockWidgetProvider" + launcher:screen="2" + launcher:x="0" + launcher:y="0" + launcher:spanX="3" + launcher:spanY="4" /> + <favorite + launcher:packageName="com.android.camera" + launcher:className="com.android.camera.Camera" + launcher:screen="2" + launcher:x="0" + launcher:y="3" /> + + <!-- Right screen [3] --> + <favorite + launcher:packageName="com.android.gallery3d" + launcher:className="com.android.gallery3d.app.Gallery" + launcher:screen="3" + launcher:x="1" + launcher:y="3" /> + <favorite + launcher:packageName="com.android.settings" + launcher:className="com.android.settings.Settings" + launcher:screen="3" + launcher:x="2" + launcher:y="3" /> + + <!-- Far-right screen [4] --> + + <!-- Hotseat (We use the screen as the position of the item in the hotseat) --> + <favorite + launcher:packageName="com.android.email" + launcher:className="com.android.email.activity.Welcome" + launcher:container="-101" + launcher:screen="0" + launcher:x="2" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.calendar" + launcher:className="com.android.calendar.AllInOneActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="3" + launcher:y="0" /> + <allapps + launcher:container="-101" + launcher:screen="0" + launcher:x="4" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.contacts" + launcher:className="com.android.contacts.activities.PeopleActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="5" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.browser" + launcher:className="com.android.browser.BrowserActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="6" + launcher:y="0" /> +</favorites> diff --git a/res/xml-sw720dp/update_workspace.xml b/res/xml-sw720dp/update_workspace.xml new file mode 100644 index 0000000..1962389 --- /dev/null +++ b/res/xml-sw720dp/update_workspace.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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/com.cyanogenmod.trebuchet"> + <!-- Update the db with new hotseat all apps button. --> + <!-- Hotseat (We use the screen as the position of the item in the hotseat) --> + <favorite + launcher:packageName="com.android.contacts" + launcher:className="com.android.contacts.activities.DialtactsActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="2" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.contacts" + launcher:className="com.android.contacts.activities.PeopleActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="3" + launcher:y="0" /> + <allapps + launcher:container="-101" + launcher:screen="0" + launcher:x="4" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.mms" + launcher:className="com.android.mms.ui.ConversationList" + launcher:container="-101" + launcher:screen="0" + launcher:x="5" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.browser" + launcher:className="com.android.browser.BrowserActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="6" + launcher:y="0" /> +</favorites> diff --git a/res/xml-sw720dp/update_workspace_no_telephony.xml b/res/xml-sw720dp/update_workspace_no_telephony.xml new file mode 100644 index 0000000..d01697e --- /dev/null +++ b/res/xml-sw720dp/update_workspace_no_telephony.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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/com.cyanogenmod.trebuchet"> + <!-- Update the db with new hotseat all apps button. --> + <!-- Hotseat (We use the screen as the position of the item in the hotseat) --> + <favorite + launcher:packageName="com.android.email" + launcher:className="com.android.email.activity.Welcome" + launcher:container="-101" + launcher:screen="0" + launcher:x="2" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.calendar" + launcher:className="com.android.calendar.AllInOneActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="3" + launcher:y="0" /> + <allapps + launcher:container="-101" + launcher:screen="0" + launcher:x="4" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.contacts" + launcher:className="com.android.contacts.activities.PeopleActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="5" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.browser" + launcher:className="com.android.browser.BrowserActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="6" + launcher:y="0" /> +</favorites> diff --git a/res/xml/default_workspace.xml b/res/xml/default_workspace.xml index 80a0e88..c3aa089 100644 --- a/res/xml/default_workspace.xml +++ b/res/xml/default_workspace.xml @@ -29,12 +29,12 @@ <!-- Middle screen [2] --> <appwidget - launcher:packageName="com.android.deskclock" - launcher:className="com.android.alarmclock.AnalogAppWidgetProvider" + launcher:packageName="com.cyanogenmod.lockclock" + launcher:className="com.cyanogenmod.lockclock.ClockWidgetProvider" launcher:screen="2" - launcher:x="1" + launcher:x="0" launcher:y="0" - launcher:spanX="2" + launcher:spanX="3" launcher:spanY="2" /> <favorite launcher:packageName="com.android.camera" diff --git a/res/xml/default_workspace_no_telephony.xml b/res/xml/default_workspace_no_telephony.xml new file mode 100644 index 0000000..0e376cf --- /dev/null +++ b/res/xml/default_workspace_no_telephony.xml @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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/com.cyanogenmod.trebuchet"> + <!-- Far-left screen [0] --> + + <!-- Left screen [1] --> + <appwidget + launcher:packageName="com.android.settings" + launcher:className="com.android.settings.widget.SettingsAppWidgetProvider" + launcher:screen="1" + launcher:x="0" + launcher:y="3" + launcher:spanX="4" + launcher:spanY="1" /> + + <!-- Middle screen [2] --> + <appwidget + launcher:packageName="com.cyanogenmod.lockclock" + launcher:className="com.cyanogenmod.lockclock.ClockWidgetProvider" + launcher:screen="2" + launcher:x="0" + launcher:y="0" + launcher:spanX="3" + launcher:spanY="2" /> + <favorite + launcher:packageName="com.android.camera" + launcher:className="com.android.camera.Camera" + launcher:screen="2" + launcher:x="0" + launcher:y="3" /> + + <!-- Right screen [3] --> + <favorite + launcher:packageName="com.android.gallery3d" + launcher:className="com.android.gallery3d.app.Gallery" + launcher:screen="3" + launcher:x="1" + launcher:y="3" /> + <favorite + launcher:packageName="com.android.settings" + launcher:className="com.android.settings.Settings" + launcher:screen="3" + launcher:x="2" + launcher:y="3" /> + + <!-- Far-right screen [4] --> + + <!-- Hotseat (We use the screen as the position of the item in the hotseat) --> + <favorite + launcher:packageName="com.android.email" + launcher:className="com.android.email.activity.Welcome" + launcher:container="-101" + launcher:screen="0" + launcher:x="0" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.calendar" + launcher:className="com.android.calendar.AllInOneActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="1" + launcher:y="0" /> + <allapps + launcher:container="-101" + launcher:screen="0" + launcher:x="2" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.contacts" + launcher:className="com.android.contacts.activities.PeopleActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="3" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.browser" + launcher:className="com.android.browser.BrowserActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="4" + launcher:y="0" /> +</favorites> diff --git a/res/xml/update_workspace_no_telephony.xml b/res/xml/update_workspace_no_telephony.xml new file mode 100644 index 0000000..84c014a --- /dev/null +++ b/res/xml/update_workspace_no_telephony.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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/com.cyanogenmod.trebuchet"> + <!-- Update the db with new hotseat all apps button. --> + <!-- Hotseat (We use the screen as the position of the item in the hotseat) --> + <favorite + launcher:packageName="com.android.email" + launcher:className="com.android.email.activity.Welcome" + launcher:container="-101" + launcher:screen="0" + launcher:x="0" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.calendar" + launcher:className="com.android.calendar.AllInOneActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="1" + launcher:y="0" /> + <allapps + launcher:container="-101" + launcher:screen="0" + launcher:x="2" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.contacts" + launcher:className="com.android.contacts.activities.PeopleActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="3" + launcher:y="0" /> + <favorite + launcher:packageName="com.android.browser" + launcher:className="com.android.browser.BrowserActivity" + launcher:container="-101" + launcher:screen="0" + launcher:x="4" + launcher:y="0" /> +</favorites> diff --git a/src/com/cyanogenmod/trebuchet/LauncherProvider.java b/src/com/cyanogenmod/trebuchet/LauncherProvider.java index b16002a..af3ad8b 100644 --- a/src/com/cyanogenmod/trebuchet/LauncherProvider.java +++ b/src/com/cyanogenmod/trebuchet/LauncherProvider.java @@ -40,6 +40,7 @@ import android.database.sqlite.SQLiteQueryBuilder; import android.net.Uri; import android.os.Bundle; import android.provider.Settings; +import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.AttributeSet; import android.util.Log; @@ -209,7 +210,12 @@ public class LauncherProvider extends ContentProvider { // Use default workspace resource if none provided if (workspaceResId == 0) { - workspaceResId = sp.getInt(DEFAULT_WORKSPACE_RESOURCE_ID, R.xml.default_workspace); + TelephonyManager tm = (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE); + 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); + } } // Populate favorites table with initial favorites @@ -418,7 +424,12 @@ public class LauncherProvider extends ContentProvider { } // Add default hotseat icons - loadFavorites(db, R.xml.update_workspace); + TelephonyManager tm = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); + if (tm.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE) { + loadFavorites(db, R.xml.update_workspace_no_telephony); + } else { + loadFavorites(db, R.xml.update_workspace); + } version = 14; } |