summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/am
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2009-06-30 13:27:30 -0700
committerDianne Hackborn <hackbod@google.com>2009-06-30 13:27:30 -0700
commitde7faf658cd40d34c08a98b39477055da8e19172 (patch)
tree8450b4d75fbe22a3fed25867c1d53a059c10d664 /services/java/com/android/server/am
parentbd9aa793b19f7aa529ca4123492f8940b96486b8 (diff)
downloadframeworks_base-de7faf658cd40d34c08a98b39477055da8e19172.zip
frameworks_base-de7faf658cd40d34c08a98b39477055da8e19172.tar.gz
frameworks_base-de7faf658cd40d34c08a98b39477055da8e19172.tar.bz2
Fix issue #1673793: Theme styles don't apply.
It turns out this was not a problem in the resource code at all. Rather, the system process has a cache of pre-loaded attributes it uses to avoid continually reloading things as it needs them. Well it turns out this cache wasn't flushed after a package was uninstalled or a configuration changed, so you could re-install an app where you change its style resources so its theme now points to one that is inconsistent in the cache. This is mostly a problem for developers, where they continually install new versions of an app where resources have changed. This could possibly show up when updating an app on a normal phone, although the problem would eventually correct itself since this cache uses weak references. Anyway, the cache is now reworked to be flushed appropriately. This change also includes an update to aapt to be able to dump the contents of bags in resources.
Diffstat (limited to 'services/java/com/android/server/am')
-rw-r--r--services/java/com/android/server/am/ActivityManagerService.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 6d04b6b..f716571 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -17,6 +17,7 @@
package com.android.server.am;
import com.android.internal.os.BatteryStatsImpl;
+import com.android.server.AttributeCache;
import com.android.server.IntentResolver;
import com.android.server.ProcessMap;
import com.android.server.ProcessStats;
@@ -61,7 +62,6 @@ import android.content.pm.ServiceInfo;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.net.Uri;
-import android.os.BatteryStats;
import android.os.Binder;
import android.os.Bundle;
import android.os.Environment;
@@ -10715,6 +10715,10 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
if (!intent.getBooleanExtra(Intent.EXTRA_DONT_KILL_APP, false)) {
uninstallPackageLocked(ssp,
intent.getIntExtra(Intent.EXTRA_UID, -1), false);
+ AttributeCache ac = AttributeCache.instance();
+ if (ac != null) {
+ ac.removePackage(ssp);
+ }
}
}
}
@@ -11765,6 +11769,11 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
Intent intent = new Intent(Intent.ACTION_CONFIGURATION_CHANGED);
broadcastIntentLocked(null, null, intent, null, null, 0, null, null,
null, false, false, MY_PID, Process.SYSTEM_UID);
+
+ AttributeCache ac = AttributeCache.instance();
+ if (ac != null) {
+ ac.updateConfiguration(mConfiguration);
+ }
}
}