am 5a2c6fbf: am e70c6607: Merge "NPE in in AppGlobals#getIntCoreSetting" into honeycomb-mr1

* commit '5a2c6fbf847af971457f014ce7073812c9dd31e7':
  NPE in in AppGlobals#getIntCoreSetting
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 @@
      * @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;
+        }
     }
 }