Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +9 −12 Original line number Diff line number Diff line Loading @@ -2436,13 +2436,11 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub return InputBindResult.NOT_IME_TARGET_WINDOW; } final int csDisplayId = cs.mSelfReportedDisplayId; final int oldDisplayIdToShowIme = mDisplayIdToShowIme; mDisplayIdToShowIme = mVisibilityStateComputer.computeImeDisplayId(winState, csDisplayId); // Potentially override the selected input method if the new display belongs to a virtual // device with a custom IME. String selectedMethodId = getSelectedMethodIdLocked(); if (oldDisplayIdToShowIme != mDisplayIdToShowIme) { final String deviceMethodId = computeCurrentDeviceMethodIdLocked(selectedMethodId); if (deviceMethodId == null) { mVisibilityStateComputer.getImePolicy().setImeHiddenByDisplayPolicy(true); Loading @@ -2450,7 +2448,6 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub setInputMethodLocked(deviceMethodId, NOT_A_SUBTYPE_ID, mDeviceIdToShowIme); selectedMethodId = deviceMethodId; } } if (mVisibilityStateComputer.getImePolicy().isImeHiddenByDisplayPolicy()) { hideCurrentInputLocked(mCurFocusedWindow, null /* statsToken */, 0 /* flags */, Loading Loading @@ -2549,10 +2546,10 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub final int oldDeviceId = mDeviceIdToShowIme; mDeviceIdToShowIme = mVdmInternal.getDeviceIdForDisplayId(mDisplayIdToShowIme); if (mDeviceIdToShowIme == oldDeviceId) { if (mDeviceIdToShowIme == DEVICE_ID_DEFAULT) { if (oldDeviceId == DEVICE_ID_DEFAULT) { return currentMethodId; } if (mDeviceIdToShowIme == DEVICE_ID_DEFAULT) { final String defaultDeviceMethodId = mSettings.getSelectedDefaultDeviceInputMethod(); if (DEBUG) { Slog.v(TAG, "Restoring default device input method: " + defaultDeviceMethodId); Loading Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +9 −12 Original line number Diff line number Diff line Loading @@ -2436,13 +2436,11 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub return InputBindResult.NOT_IME_TARGET_WINDOW; } final int csDisplayId = cs.mSelfReportedDisplayId; final int oldDisplayIdToShowIme = mDisplayIdToShowIme; mDisplayIdToShowIme = mVisibilityStateComputer.computeImeDisplayId(winState, csDisplayId); // Potentially override the selected input method if the new display belongs to a virtual // device with a custom IME. String selectedMethodId = getSelectedMethodIdLocked(); if (oldDisplayIdToShowIme != mDisplayIdToShowIme) { final String deviceMethodId = computeCurrentDeviceMethodIdLocked(selectedMethodId); if (deviceMethodId == null) { mVisibilityStateComputer.getImePolicy().setImeHiddenByDisplayPolicy(true); Loading @@ -2450,7 +2448,6 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub setInputMethodLocked(deviceMethodId, NOT_A_SUBTYPE_ID, mDeviceIdToShowIme); selectedMethodId = deviceMethodId; } } if (mVisibilityStateComputer.getImePolicy().isImeHiddenByDisplayPolicy()) { hideCurrentInputLocked(mCurFocusedWindow, null /* statsToken */, 0 /* flags */, Loading Loading @@ -2549,10 +2546,10 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub final int oldDeviceId = mDeviceIdToShowIme; mDeviceIdToShowIme = mVdmInternal.getDeviceIdForDisplayId(mDisplayIdToShowIme); if (mDeviceIdToShowIme == oldDeviceId) { if (mDeviceIdToShowIme == DEVICE_ID_DEFAULT) { if (oldDeviceId == DEVICE_ID_DEFAULT) { return currentMethodId; } if (mDeviceIdToShowIme == DEVICE_ID_DEFAULT) { final String defaultDeviceMethodId = mSettings.getSelectedDefaultDeviceInputMethod(); if (DEBUG) { Slog.v(TAG, "Restoring default device input method: " + defaultDeviceMethodId); Loading