diff options
author | 2013-12-20 18:13:05 +0900 | |
---|---|---|
committer | 2013-12-20 18:13:23 +0900 | |
commit | 92392b21f2003e76a309d81b12ace2839d4783f9 (patch) | |
tree | 96d6aa16eeb4e5d0b6bcdf6949cb2d63ac3f132f /java | |
parent | 1252333efdb45cfc67801d31ab1eef24315f2f27 (diff) | |
download | latinime-92392b21f2003e76a309d81b12ace2839d4783f9.tar.gz latinime-92392b21f2003e76a309d81b12ace2839d4783f9.tar.xz latinime-92392b21f2003e76a309d81b12ace2839d4783f9.zip |
Fix an NPE
Change-Id: I6307c1545d9d48cdea66d08f8efc1b7fbb08ee42
Diffstat (limited to 'java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/settings/SettingsValues.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java index f97e9e1fc..c0e8a0301 100644 --- a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java +++ b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java @@ -307,11 +307,15 @@ public final class SettingsValues { } 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() { - 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. |