From 008e9b3e1a8c037e0275b19f284a7d2e76c9e140 Mon Sep 17 00:00:00 2001 From: satok Date: Tue, 28 Sep 2010 11:27:44 +0900 Subject: Fix Null pointer exception on closing and update assets Change-Id: I30fdac74685beae06b5c61140452b26b29ae4c39 --- java/src/com/android/inputmethod/latin/LatinIME.java | 7 ++++++- java/src/com/android/inputmethod/latin/LatinImeLogger.java | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'java/src/com/android/inputmethod') diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 01f3ba66c..26f8a328b 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1487,7 +1487,12 @@ public class LatinIME extends InputMethodService mVoiceInput.cancel(); } requestHideSelf(0); - mKeyboardSwitcher.getInputView().closing(); + if (mKeyboardSwitcher != null) { + LatinKeyboardView inputView = mKeyboardSwitcher.getInputView(); + if (inputView != null) { + inputView.closing(); + } + } TextEntryState.endSession(); } diff --git a/java/src/com/android/inputmethod/latin/LatinImeLogger.java b/java/src/com/android/inputmethod/latin/LatinImeLogger.java index 6d15d216c..a8ab9cc98 100644 --- a/java/src/com/android/inputmethod/latin/LatinImeLogger.java +++ b/java/src/com/android/inputmethod/latin/LatinImeLogger.java @@ -37,8 +37,8 @@ public class LatinImeLogger implements SharedPreferences.OnSharedPreferenceChang public static void onDestroy() { } - public static void logOnManualSuggestion(String before, String after, int position - , List suggestions) { + public static void logOnManualSuggestion( + String before, String after, int position, List suggestions) { } public static void logOnAutoSuggestion(String before, String after) { -- cgit v1.2.3-83-g751a