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

* commit 'e70c6607e0316fe390d52a544f6832c60223881f':
  NPE in in AppGlobals#getIntCoreSetting
This commit is contained in:
Svetoslav Ganov
2011-03-03 17:37:20 -08:00
committed by Android Git Automerger

View File

@@ -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;
}
}
}