diff options
author | Clark Scheff <clark@cyngn.com> | 2015-02-18 16:15:29 -0800 |
---|---|---|
committer | Clark Scheff <clark@cyngn.com> | 2015-10-27 10:40:35 -0700 |
commit | d23b0fcb5f2be06951676d85aa5cae50c6abd9a0 (patch) | |
tree | 5a2ddd80bb4ce6e66bdde62878f6964e3571f6d6 /core/java/android/content/pm | |
parent | d12db22f546d6d55f9c6d1ec729875282c6f4097 (diff) | |
download | frameworks_base-d23b0fcb5f2be06951676d85aa5cae50c6abd9a0.zip frameworks_base-d23b0fcb5f2be06951676d85aa5cae50c6abd9a0.tar.gz frameworks_base-d23b0fcb5f2be06951676d85aa5cae50c6abd9a0.tar.bz2 |
Themes: Enhanced theming capabilities [1/3]
This patch includes a new class, ThemeChangeRequest, which will be
used to facilitate theme changes. This class includes a builder
that will be used to create a ThemeChangeRequest.
Change-Id: I60144f8a6505aefcc570feb15ccc50e77bcb1114
Diffstat (limited to 'core/java/android/content/pm')
-rw-r--r-- | core/java/android/content/pm/ThemeUtils.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/core/java/android/content/pm/ThemeUtils.java b/core/java/android/content/pm/ThemeUtils.java index 38391d4..a5a523c 100644 --- a/core/java/android/content/pm/ThemeUtils.java +++ b/core/java/android/content/pm/ThemeUtils.java @@ -107,6 +107,9 @@ public class ThemeUtils { public static final int SYSTEM_TARGET_API = 0; + // Package name for any app which does not have a specific theme applied + private static final String DEFAULT_PKG = "default"; + private static final String SETTINGS_DB = "/data/data/com.android.providers.settings/databases/settings.db"; private static final String SETTINGS_SECURE_TABLE = "secure"; @@ -715,4 +718,16 @@ public class ThemeUtils { return config; } + + /** + * Convenience method to determine if a theme component is a per app theme and not a standard + * component. + * @param component + * @return + */ + public static boolean isPerAppThemeComponent(String component) { + return !(DEFAULT_PKG.equals(component) + || ThemeConfig.SYSTEMUI_STATUS_BAR_PKG.equals(component) + || ThemeConfig.SYSTEMUI_NAVBAR_PKG.equals(component)); + } } |