Merge "Fix an NPE"

This commit is contained in:
Jean Chalard 2013-12-20 09:14:55 +00:00 committed by Android (Google) Code Review
commit a22a63f3b1

View file

@ -307,11 +307,15 @@ public final class SettingsValues {
} }
public boolean isBeforeJellyBean() { public boolean isBeforeJellyBean() {
return mAppWorkarounds.get(null, TIMEOUT_TO_GET_TARGET_PACKAGE).isBeforeJellyBean(); final AppWorkaroundsUtils appWorkaroundUtils
= mAppWorkarounds.get(null, TIMEOUT_TO_GET_TARGET_PACKAGE);
return null == appWorkaroundUtils ? false : appWorkaroundUtils.isBeforeJellyBean();
} }
public boolean isBrokenByRecorrection() { public boolean isBrokenByRecorrection() {
return mAppWorkarounds.get(null, TIMEOUT_TO_GET_TARGET_PACKAGE).isBrokenByRecorrection(); final AppWorkaroundsUtils appWorkaroundUtils
= mAppWorkarounds.get(null, TIMEOUT_TO_GET_TARGET_PACKAGE);
return null == appWorkaroundUtils ? null : appWorkaroundUtils.isBrokenByRecorrection();
} }
// Helper functions to create member values. // Helper functions to create member values.