Merge "Resources: fix race with creating theme" into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5f70bc89be
@@ -1760,7 +1760,9 @@ public class Resources {
|
||||
public final Theme newTheme() {
|
||||
Theme theme = new Theme();
|
||||
theme.setImpl(mResourcesImpl.newThemeImpl());
|
||||
mThemeRefs.add(new WeakReference<>(theme));
|
||||
synchronized (mThemeRefs) {
|
||||
mThemeRefs.add(new WeakReference<>(theme));
|
||||
}
|
||||
return theme;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user