diff options
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)); + } } |