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:
@ -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);
|
||||
|
@ -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());
|
||||
|
Reference in New Issue
Block a user