From adbb979b5687c1eaffc9388e270e744a5abc075a Mon Sep 17 00:00:00 2001 From: Satoshi Kataoka Date: Sat, 28 Sep 2013 01:19:18 +0900 Subject: [PATCH] Fix possible NPE in KeyboardSwitcher Bug: 10964306 Change-Id: Ibcea76da746f6cac92c8d91425d25d04ade62af0 --- java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index cc1ffd183..74edd87cf 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -315,7 +315,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { } public boolean isShowingEmojiKeyboard() { - return mEmojiKeyboardView.getVisibility() == View.VISIBLE; + return mEmojiKeyboardView != null && mEmojiKeyboardView.getVisibility() == View.VISIBLE; } public boolean isShowingMoreKeysPanel() {