diff options
-rw-r--r-- | core/java/android/app/AppGlobals.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/java/android/app/AppGlobals.java b/core/java/android/app/AppGlobals.java index 55515b8..2b6db8b 100644 --- a/core/java/android/app/AppGlobals.java +++ b/core/java/android/app/AppGlobals.java @@ -55,6 +55,11 @@ public class AppGlobals { * @return The core settings. */ public static int getIntCoreSetting(String key, int defaultValue) { - return ActivityThread.currentActivityThread().getIntCoreSetting(key, defaultValue); + ActivityThread currentActivityThread = ActivityThread.currentActivityThread(); + if (currentActivityThread != null) { + return currentActivityThread.getIntCoreSetting(key, defaultValue); + } else { + return defaultValue; + } } } |