From e6ef68b15ae2ed4033501ceb5bd89e581c7a57fb Mon Sep 17 00:00:00 2001 From: Hyejin Kim Date: Mon, 27 Oct 2014 17:17:06 +0900 Subject: [PATCH] Fix not to show a log with empty default ime It'll make reboot to show a log with empty defualt ime. Bug: 18165757 Change-Id: Ieec2532cbe003cb6307a70748a2f6c8987708eae --- .../java/com/android/server/InputMethodManagerService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java index a996dbda5cf5a..20133be6757a0 100644 --- a/services/java/com/android/server/InputMethodManagerService.java +++ b/services/java/com/android/server/InputMethodManagerService.java @@ -733,7 +733,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub if (defIm == null && mMethodList.size() > 0) { defIm = InputMethodUtils.getMostApplicableDefaultIME( mSettings.getEnabledInputMethodListLocked()); - Slog.i(TAG, "No default found, using " + defIm.getId()); + if (defIm != null) { + Slog.i(TAG, "Default found, using " + defIm.getId()); + } else { + Slog.i(TAG, "No default found"); + } } if (defIm != null) { setSelectedInputMethodAndSubtypeLocked(defIm, NOT_A_SUBTYPE_ID, false);