summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2012-10-07 17:56:13 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-07 17:56:14 -0700
commit914d55501146cf2c3abdf52c021b40fa789d211a (patch)
treefbe81fb4f8fa3b4d68d237993aa3200b7681cf0a /src/com
parentb7fbb8219b85c9e553a954cb07aa9f9cfa577fc3 (diff)
parent2ebcf509f038f435ca8819dc098a7cb480bed0d9 (diff)
downloadpackages_apps_trebuchet-914d55501146cf2c3abdf52c021b40fa789d211a.zip
packages_apps_trebuchet-914d55501146cf2c3abdf52c021b40fa789d211a.tar.gz
packages_apps_trebuchet-914d55501146cf2c3abdf52c021b40fa789d211a.tar.bz2
Merge "Revert "Add support for custom manta cling"" into jb-mr1-dev
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/launcher2/Launcher.java12
-rw-r--r--src/com/android/launcher2/LauncherProvider.java11
2 files changed, 2 insertions, 21 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index f94194b..e31df56 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -3732,18 +3732,6 @@ public final class Launcher extends Activity
if (isClingsEnabled() &&
!mSharedPrefs.getBoolean(Cling.WORKSPACE_CLING_DISMISSED_KEY, false) &&
!skipCustomClingIfNoAccounts() ) {
- // If we're not using the default workspace layout, replace workspace cling
- // with a custom workspace cling (usually specified in an overlay)
- if (mSharedPrefs.getInt(LauncherProvider.DEFAULT_WORKSPACE_RESOURCE_ID, 0) != 0) {
- // Use a custom cling
- View cling = findViewById(R.id.workspace_cling);
- ViewGroup clingParent = (ViewGroup) cling.getParent();
- int clingIndex = clingParent.indexOfChild(cling);
- clingParent.removeViewAt(clingIndex);
- View customCling = mInflater.inflate(R.layout.custom_workspace_cling, clingParent, false);
- clingParent.addView(customCling, clingIndex);
- customCling.setId(R.id.workspace_cling);
- }
initCling(R.id.workspace_cling, null, false, 0);
} else {
removeCling(R.id.workspace_cling);
diff --git a/src/com/android/launcher2/LauncherProvider.java b/src/com/android/launcher2/LauncherProvider.java
index 8097ac9..74cf7a4 100644
--- a/src/com/android/launcher2/LauncherProvider.java
+++ b/src/com/android/launcher2/LauncherProvider.java
@@ -74,8 +74,6 @@ public class LauncherProvider extends ContentProvider {
static final String PARAMETER_NOTIFY = "notify";
static final String DB_CREATED_BUT_DEFAULT_WORKSPACE_NOT_LOADED =
"DB_CREATED_BUT_DEFAULT_WORKSPACE_NOT_LOADED";
- static final String DEFAULT_WORKSPACE_RESOURCE_ID =
- "DEFAULT_WORKSPACE_RESOURCE_ID";
private static final String ACTION_APPWIDGET_DEFAULT_WORKSPACE_CONFIGURE =
"com.android.launcher.action.APPWIDGET_DEFAULT_WORKSPACE_CONFIGURE";
@@ -208,23 +206,18 @@ public class LauncherProvider extends ContentProvider {
/**
* @param workspaceResId that can be 0 to use default or non-zero for specific resource
*/
- synchronized public void loadDefaultFavoritesIfNecessary(int origWorkspaceResId) {
+ synchronized public void loadDefaultFavoritesIfNecessary(int workspaceResId) {
String spKey = LauncherApplication.getSharedPreferencesKey();
SharedPreferences sp = getContext().getSharedPreferences(spKey, Context.MODE_PRIVATE);
if (sp.getBoolean(DB_CREATED_BUT_DEFAULT_WORKSPACE_NOT_LOADED, false)) {
- int workspaceResId = origWorkspaceResId;
-
// Use default workspace resource if none provided
if (workspaceResId == 0) {
- workspaceResId = sp.getInt(DEFAULT_WORKSPACE_RESOURCE_ID, R.xml.default_workspace);
+ workspaceResId = R.xml.default_workspace;
}
// Populate favorites table with initial favorites
SharedPreferences.Editor editor = sp.edit();
editor.remove(DB_CREATED_BUT_DEFAULT_WORKSPACE_NOT_LOADED);
- if (origWorkspaceResId != 0) {
- editor.putInt(DEFAULT_WORKSPACE_RESOURCE_ID, origWorkspaceResId);
- }
mOpenHelper.loadFavorites(mOpenHelper.getWritableDatabase(), workspaceResId);
editor.commit();
}