Revert "Add support for custom manta cling"
This reverts commit 68255cbabe.
This commit is contained in:
1 parent
8b4d91455a
commit
2ebcf509f0
5 files changed
+2
-56
No files matched your search
@@ -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();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user