diff options
author | Chris Wren <cwren@android.com> | 2013-10-09 10:36:55 -0400 |
---|---|---|
committer | Chris Wren <cwren@android.com> | 2013-10-09 12:41:09 -0400 |
commit | e523e70f75ff90ca5d613fb8398d37208e6cd32d (patch) | |
tree | 849f515794cd8efa34ad3382d756d50b7cecf1a1 /src/com/android/launcher3 | |
parent | d706e0a8133a3a570013b7512c593845850a0f1f (diff) | |
download | android_packages_apps_Trebuchet-e523e70f75ff90ca5d613fb8398d37208e6cd32d.tar.gz android_packages_apps_Trebuchet-e523e70f75ff90ca5d613fb8398d37208e6cd32d.tar.bz2 android_packages_apps_Trebuchet-e523e70f75ff90ca5d613fb8398d37208e6cd32d.zip |
move the provider authority to a config class
Bug: 10816034
Change-Id: I68364081f039f94205b805a1510eb04e6f0f40a2
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r-- | src/com/android/launcher3/LauncherModel.java | 1 | ||||
-rw-r--r-- | src/com/android/launcher3/LauncherProvider.java | 4 | ||||
-rw-r--r-- | src/com/android/launcher3/config/ProviderConfig.java | 22 |
3 files changed, 25 insertions, 2 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java index d1819e14d..7e1442dce 100644 --- a/src/com/android/launcher3/LauncherModel.java +++ b/src/com/android/launcher3/LauncherModel.java @@ -1623,6 +1623,7 @@ public class LauncherModel extends BroadcastReceiver { final ArrayList<Long> itemsToRemove = new ArrayList<Long>(); final Uri contentUri = LauncherSettings.Favorites.CONTENT_URI; + if (DEBUG_LOADERS) Log.d(TAG, "loading model from " + contentUri); final Cursor c = contentResolver.query(contentUri, null, null, null, null); // +1 for the hotseat (it can be larger than the workspace) diff --git a/src/com/android/launcher3/LauncherProvider.java b/src/com/android/launcher3/LauncherProvider.java index 39afe1042..d0f6770d3 100644 --- a/src/com/android/launcher3/LauncherProvider.java +++ b/src/com/android/launcher3/LauncherProvider.java @@ -49,8 +49,8 @@ import android.util.AttributeSet; import android.util.Log; import android.util.Xml; -import com.android.launcher3.LauncherSettings.BaseLauncherColumns; import com.android.launcher3.LauncherSettings.Favorites; +import com.android.launcher3.config.ProviderConfig; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; @@ -69,7 +69,7 @@ public class LauncherProvider extends ContentProvider { private static final int DATABASE_VERSION = 15; static final String OLD_AUTHORITY = "com.android.launcher2.settings"; - static final String AUTHORITY = "com.android.launcher3.settings"; + static final String AUTHORITY = ProviderConfig.AUTHORITY; static final String TABLE_FAVORITES = "favorites"; static final String TABLE_WORKSPACE_SCREENS = "workspaceScreens"; diff --git a/src/com/android/launcher3/config/ProviderConfig.java b/src/com/android/launcher3/config/ProviderConfig.java new file mode 100644 index 000000000..db25076ea --- /dev/null +++ b/src/com/android/launcher3/config/ProviderConfig.java @@ -0,0 +1,22 @@ +/* + * 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. + */ + +package com.android.launcher3.config; + +public class ProviderConfig { + + public static final String AUTHORITY = "com.android.launcher3.settings"; +} |