summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/java/android/app/ContextImpl.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 3667914..a9d2ea1 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -273,9 +273,11 @@ class ContextImpl extends Context {
@Override
public void recreateTheme() {
- Resources.Theme newTheme = mResources.newTheme();
- newTheme.applyStyle(mThemeResource, true);
- mTheme.setTo(newTheme);
+ if (mTheme != null) {
+ Resources.Theme newTheme = mResources.newTheme();
+ newTheme.applyStyle(mThemeResource, true);
+ mTheme.setTo(newTheme);
+ }
}
@Override