Merge "NPE in in AppGlobals#getIntCoreSetting" into honeycomb-mr1
This commit is contained in:
committed by
Android (Google) Code Review
commit
e70c6607e0
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user