From 698d99ea5cbd68a56f768d8cc04bda8abd5417f2 Mon Sep 17 00:00:00 2001 From: Clark Scheff Date: Tue, 22 Jul 2014 09:53:40 -0700 Subject: 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 --- src/org/cyanogenmod/theme/chooserv2/ThemeFragment.java | 6 ++++++ 1 file changed, 6 insertions(+) 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); } -- cgit v1.1