From 3e405f3afd9bf5c5978d05c07dc186e862885f78 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Tue, 29 Nov 2011 14:12:49 +0900 Subject: [PATCH] DO NOT MERGE. Save keyboard layout only when it is shown This is a cherrypick of I150b4a05 from master to ics-mr1. Bug: 5130446 Bug: 5787394 Change-Id: Ie0d58283042166537ff161344564c3c51b0d1296 --- java/src/com/android/inputmethod/latin/LatinIME.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 7ba7f7d27..9c321bcb9 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -405,7 +405,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar resetPendingImsCallback(); mIsOrientationChanging = true; final LatinIME latinIme = getOuterInstance(); - latinIme.mKeyboardSwitcher.saveKeyboardState(); + if (latinIme.isInputViewShown()) { + latinIme.mKeyboardSwitcher.saveKeyboardState(); + } } private void resetPendingImsCallback() {