summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Wei Sheng Shih <wilsonshih@google.com> 2019-01-02 00:56:32 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-01-02 00:56:32 +0000
commit9f7fdc0dabfd1f55b4d346872125e9247b0c3c9f (patch)
treee5f43f1e283ea6f6f84a3563942132fc012a2aa9
parent474dffd225aeb629c4dc511792dec8413a46540f (diff)
parent767d1e5a9082c9fabe93ca0696a5f5d6089dbd96 (diff)
Merge "Fix IME crash when leave VR mode."
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodManagerService.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index 8d6cb097a47f..5a7739c49b42 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -390,12 +390,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
};
private void restoreNonVrImeFromSettingsNoCheck() {
- mIsVrImeStarted = false;
// switch back to non-VR InputMethod from settings.
synchronized (mMethodMap) {
- final String lastInputId = mSettings.getSelectedInputMethod();
- setInputMethodLocked(lastInputId,
- mSettings.getSelectedInputMethodSubtypeId(lastInputId));
+ if (!mIsVrImeStarted) return;
+ mIsVrImeStarted = false;
+ updateFromSettingsLocked(false);
}
}