summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/org/cyanogenmod/themes/provider/ThemePackageHelper.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/org/cyanogenmod/themes/provider/ThemePackageHelper.java b/src/org/cyanogenmod/themes/provider/ThemePackageHelper.java
index 3c4ddaf..83e8e19 100644
--- a/src/org/cyanogenmod/themes/provider/ThemePackageHelper.java
+++ b/src/org/cyanogenmod/themes/provider/ThemePackageHelper.java
@@ -224,9 +224,14 @@ public class ThemePackageHelper {
String[] args = { pi.packageName };
context.getContentResolver().update(ThemesColumns.CONTENT_URI, values, where, args);
- if (!isProcessing) {
- // We should reapply any components that are currently applied for this theme.
- reapplyInstalledComponentsForTheme(context, pi.packageName);
+ final int oldInstallState =
+ ProviderUtils.getInstallStateForTheme(context, pi.packageName);
+ final int newState = isProcessing ? InstallState.UPDATING : InstallState.INSTALLED;
+ if (newState == ThemesColumns.InstallState.INSTALLED) {
+ if (oldInstallState == ThemesColumns.InstallState.UPDATING) {
+ // We should reapply any components that are currently applied for this theme.
+ reapplyInstalledComponentsForTheme(context, pi.packageName);
+ }
}
}