From 6f0cd9ba6df3f254d4f5bfc5ac11e354e858b713 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Thu, 31 May 2012 19:33:39 +0900 Subject: [PATCH] Fix a possible NPE. This NPE's at least in unit tests. Change-Id: I255ac5fec9502e4e5bd18cba1211cdf46c6cafc8 --- .../com/android/inputmethod/latin/TargetApplicationGetter.java | 1 + 1 file changed, 1 insertion(+) diff --git a/java/src/com/android/inputmethod/latin/TargetApplicationGetter.java b/java/src/com/android/inputmethod/latin/TargetApplicationGetter.java index 4fb2e9704..4265309e5 100644 --- a/java/src/com/android/inputmethod/latin/TargetApplicationGetter.java +++ b/java/src/com/android/inputmethod/latin/TargetApplicationGetter.java @@ -29,6 +29,7 @@ public class TargetApplicationGetter extends AsyncTask(MAX_CACHE_ENTRIES); public static ApplicationInfo getCachedApplicationInfo(final String packageName) { + if (null == packageName) return null; return sCache.get(packageName); } public static void removeApplicationInfoCache(final String packageName) {