From ad1f88081190ad3c5569b2774c03e644786770d2 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Mon, 25 Aug 2014 15:08:27 +0900 Subject: [PATCH] Fix NPE when pressing ALT key Bug: 17203708 Change-Id: I4f203603496e9401dacba4db21372e3353916418 --- .../src/com/android/inputmethod/keyboard/KeyboardSwitcher.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index 140e76879..77cdf49fb 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -261,6 +261,9 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { } public void onToggleEmojiKeyboard() { + if (mKeyboardLayoutSet == null) { + return; + } if (isShowingEmojiPalettes()) { setAlphabetKeyboard(); } else {