diff options
author | Clark Scheff <clark@cyngn.com> | 2014-07-22 09:53:40 -0700 |
---|---|---|
committer | Clark Scheff <clark@cyngn.com> | 2014-07-23 22:14:26 +0000 |
commit | 698d99ea5cbd68a56f768d8cc04bda8abd5417f2 (patch) | |
tree | 9b5bbdd0b90de9482a7e77316d54c32754effb37 /src/org | |
parent | ef2e08aab31c13f44245335924cb410c68a03f28 (diff) | |
download | packages_apps_ThemeChooser-698d99ea5cbd68a56f768d8cc04bda8abd5417f2.zip packages_apps_ThemeChooser-698d99ea5cbd68a56f768d8cc04bda8abd5417f2.tar.gz packages_apps_ThemeChooser-698d99ea5cbd68a56f768d8cc04bda8abd5417f2.tar.bz2 |
Strip off all the paint before applying theme.
The "My theme" card is the only exception, all other themes will
be applied on top of the default components such that any components
that are not in the theme being applied will return to their default.
Change-Id: I91205e08fa714448b25fce440f8ebeafc4f2c9b9
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/cyanogenmod/theme/chooserv2/ThemeFragment.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/org/cyanogenmod/theme/chooserv2/ThemeFragment.java b/src/org/cyanogenmod/theme/chooserv2/ThemeFragment.java index d952e10..95f2c9c 100644 --- a/src/org/cyanogenmod/theme/chooserv2/ThemeFragment.java +++ b/src/org/cyanogenmod/theme/chooserv2/ThemeFragment.java @@ -1359,6 +1359,10 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb final Context context = getActivity(); if (context != null) { if (mSelectedComponentsMap != null && mSelectedComponentsMap.size() > 0) { + if (!CURRENTLY_APPLIED_THEME.equals(mPkgName)) { + ThemeUtils.completeComponentMap(getActivity(), + mSelectedComponentsMap); + } // Post this on mHandler so the client is added and removed from the same // thread mHandler.post(new Runnable() { @@ -1366,6 +1370,8 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb public void run() { ThemeManager tm = getThemeManager(); if (tm != null) { + // if this is not the "my theme" card, add missing components + // from defaults tm.addClient(ThemeFragment.this); tm.requestThemeChange(mSelectedComponentsMap); } |