Avoid use-after-free race condition when rebasing theme

... by never rebasing the theme. We don't need to do this unless the
system theme is configuration-dependent, which it is not currently.

Bug: 22943781
Change-Id: I96e695441543379e4d5fdf3cc6f18d9e6cf953b4
This commit is contained in:
Alan Viverette
2015-08-11 10:26:08 -04:00
parent 1fbc1b3b4b
commit c12ec70def
2 changed files with 0 additions and 11 deletions

View File

@ -4235,11 +4235,6 @@ public final class ActivityThread {
configDiff = mConfiguration.updateFrom(config);
config = applyCompatConfiguration(mCurDefaultDisplayDpi);
final Theme systemTheme = getSystemContext().getTheme();
if ((systemTheme.getChangingConfigurations() & configDiff) != 0) {
systemTheme.rebase();
}
}
ArrayList<ComponentCallbacks2> callbacks = collectComponentCallbacks(false, config);

View File

@ -1024,12 +1024,6 @@ public final class SystemServer {
w.getDefaultDisplay().getMetrics(metrics);
context.getResources().updateConfiguration(config, metrics);
// The system context's theme may be configuration-dependent.
final Theme systemTheme = context.getTheme();
if (systemTheme.getChangingConfigurations() != 0) {
systemTheme.rebase();
}
try {
// TODO: use boot phase
mPowerManagerService.systemReady(mActivityManagerService.getAppOpsService());