diff options
author | d34d <clark@cyngn.com> | 2015-10-28 10:49:41 -0700 |
---|---|---|
committer | d34d <clark@cyngn.com> | 2015-10-28 10:49:41 -0700 |
commit | 1e9ab0ae7c2fad208c80fcffa8101c2b9d2f7adf (patch) | |
tree | fac7014a80c456d0c428d4c764c7a9aa163620ff | |
parent | f3d9fdc0e027e69af2855f58c01758a18b2f6d1e (diff) | |
download | frameworks_base-1e9ab0ae7c2fad208c80fcffa8101c2b9d2f7adf.zip frameworks_base-1e9ab0ae7c2fad208c80fcffa8101c2b9d2f7adf.tar.gz frameworks_base-1e9ab0ae7c2fad208c80fcffa8101c2b9d2f7adf.tar.bz2 |
Themes: Stop using ThemeUtils.getBootThemeDirty()
Settings are no longer stored in a SQLite DB so this method is no
longer applicable
Change-Id: If46d5d854fe8b4c97f91fdfb4f663f2256d5fbf6
-rw-r--r-- | core/java/android/content/pm/ThemeUtils.java | 45 | ||||
-rw-r--r-- | services/core/java/com/android/server/pm/PackageManagerService.java | 2 |
2 files changed, 1 insertions, 46 deletions
diff --git a/core/java/android/content/pm/ThemeUtils.java b/core/java/android/content/pm/ThemeUtils.java index ef9fca0..aaa4577 100644 --- a/core/java/android/content/pm/ThemeUtils.java +++ b/core/java/android/content/pm/ThemeUtils.java @@ -710,51 +710,6 @@ public class ThemeUtils { } /** - * Get the boot theme by accessing the settings.db directly instead of using a content resolver. - * Only use this when the system is starting up and the settings content provider is not ready. - * - * Note: This method will only succeed if the system is calling this since normal apps will not - * be able to access the settings db path. - * - * @return The boot theme or null if unable to read the database or get the entry for theme - * config - */ - public static ThemeConfig getBootThemeDirty() { - ThemeConfig config = null; - SQLiteDatabase db = null; - try { - db = SQLiteDatabase.openDatabase(SETTINGS_DB, null, - SQLiteDatabase.OPEN_READONLY); - if (db != null) { - String selection = "name=?"; - String[] selectionArgs = - { Configuration.THEME_PKG_CONFIGURATION_PERSISTENCE_PROPERTY }; - String[] columns = {"value"}; - Cursor c = db.query(SETTINGS_SECURE_TABLE, columns, selection, selectionArgs, - null, null, null); - if (c != null) { - if (c.getCount() > 0) { - c.moveToFirst(); - String json = c.getString(0); - if (json != null) { - config = ThemeConfig.fromJson(json); - } - } - c.close(); - } - } - } catch (Exception e) { - Log.w(TAG, "Unable to open " + SETTINGS_DB, e); - } finally { - if (db != null) { - db.close(); - } - } - - return config; - } - - /** * Convenience method to determine if a theme component is a per app theme and not a standard * component. * @param component diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index e78084b..8f15aa9 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -2125,7 +2125,7 @@ public class PackageManagerService extends IPackageManager.Stub { } } - mBootThemeConfig = ThemeUtils.getBootThemeDirty(); + mBootThemeConfig = ThemeConfig.getSystemTheme(); // Collect vendor overlay packages. // (Do this before scanning any apps.) |