diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-04-17 09:24:01 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-04-17 09:30:32 -0700 |
commit | 18b640c3710723df8a8528a667c373474e0a06ee (patch) | |
tree | 18fcb9aeff506acf8150a055d5772a800483c8e9 /src/com/android/launcher3/LauncherSettings.java | |
parent | fb9ca2392894a3dea83570267f9597ac0750b9fd (diff) | |
download | android_packages_apps_Trebuchet-18b640c3710723df8a8528a667c373474e0a06ee.tar.gz android_packages_apps_Trebuchet-18b640c3710723df8a8528a667c373474e0a06ee.tar.bz2 android_packages_apps_Trebuchet-18b640c3710723df8a8528a667c373474e0a06ee.zip |
Removing LauncherProvider dependency from LauncherSettings
> This ensures that the classLoader does not need to load
LauncherProvider to access LauncherSettings
> Making a few fields public.
Change-Id: I2e8ee6e169552739f09e500d3b6acbcee7cd0718
Diffstat (limited to 'src/com/android/launcher3/LauncherSettings.java')
-rw-r--r-- | src/com/android/launcher3/LauncherSettings.java | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/com/android/launcher3/LauncherSettings.java b/src/com/android/launcher3/LauncherSettings.java index 111de409e..90e60e450 100644 --- a/src/com/android/launcher3/LauncherSettings.java +++ b/src/com/android/launcher3/LauncherSettings.java @@ -19,6 +19,8 @@ package com.android.launcher3; import android.net.Uri; import android.provider.BaseColumns; +import com.android.launcher3.config.ProviderConfig; + /** * Settings related utilities. */ @@ -45,7 +47,7 @@ public class LauncherSettings { * an Intent that can be launched. * <P>Type: TEXT</P> */ - static final String INTENT = "intent"; + public static final String INTENT = "intent"; /** * The type of the gesture @@ -104,29 +106,35 @@ public class LauncherSettings { * * Tracks the order of workspace screens. */ - static final class WorkspaceScreens implements ChangeLogColumns { + public static final class WorkspaceScreens implements ChangeLogColumns { + + public static final String TABLE_NAME = "workspaceScreens"; + /** * The content:// style URL for this table */ static final Uri CONTENT_URI = Uri.parse("content://" + - LauncherProvider.AUTHORITY + "/" + LauncherProvider.TABLE_WORKSPACE_SCREENS); + ProviderConfig.AUTHORITY + "/" + TABLE_NAME); /** * The rank of this screen -- ie. how it is ordered relative to the other screens. * <P>Type: INTEGER</P> */ - static final String SCREEN_RANK = "screenRank"; + public static final String SCREEN_RANK = "screenRank"; } /** * Favorites. */ public static final class Favorites implements BaseLauncherColumns { + + public static final String TABLE_NAME = "favorites"; + /** * The content:// style URL for this table */ - static final Uri CONTENT_URI = Uri.parse("content://" + - LauncherProvider.AUTHORITY + "/" + LauncherProvider.TABLE_FAVORITES); + public static final Uri CONTENT_URI = Uri.parse("content://" + + ProviderConfig.AUTHORITY + "/" + TABLE_NAME); /** * The content:// style URL for a given row, identified by its id. @@ -136,21 +144,21 @@ public class LauncherSettings { * @return The unique content URL for the specified row. */ static Uri getContentUri(long id) { - return Uri.parse("content://" + LauncherProvider.AUTHORITY + - "/" + LauncherProvider.TABLE_FAVORITES + "/" + id); + return Uri.parse("content://" + ProviderConfig.AUTHORITY + + "/" + TABLE_NAME + "/" + id); } /** * The container holding the favorite * <P>Type: INTEGER</P> */ - static final String CONTAINER = "container"; + public static final String CONTAINER = "container"; /** * The icon is a resource identified by a package name and an integer id. */ - static final int CONTAINER_DESKTOP = -100; - static final int CONTAINER_HOTSEAT = -101; + public static final int CONTAINER_DESKTOP = -100; + public static final int CONTAINER_HOTSEAT = -101; static final String containerToString(int container) { switch (container) { @@ -164,7 +172,7 @@ public class LauncherSettings { * The screen holding the favorite (if container is CONTAINER_DESKTOP) * <P>Type: INTEGER</P> */ - static final String SCREEN = "screen"; + public static final String SCREEN = "screen"; /** * The X coordinate of the cell holding the favorite |