Loading core/java/android/view/ImeFocusController.java +0 −20 Original line number Diff line number Diff line Loading @@ -207,26 +207,6 @@ public final class ImeFocusController { mHasImeFocus = false; } /** * Called by {@link ViewRootImpl} to feedback the state of the screen for this view. * @param newScreenState The new state of the screen. Can be either * {@link View#SCREEN_STATE_ON} or {@link View#SCREEN_STATE_OFF} */ @UiThread void onScreenStateChanged(int newScreenState) { if (!getImmDelegate().isCurrentRootView(mViewRootImpl)) { return; } // Close input connection and IME when the screen is turn off for security concern. if (newScreenState == View.SCREEN_STATE_OFF && mServedView != null) { if (DEBUG) { Log.d(TAG, "onScreenStateChanged, disconnect input when screen turned off"); } mNextServedView = null; mViewRootImpl.dispatchCheckFocus(); } } /** * @param windowAttribute {@link WindowManager.LayoutParams} to be checked. * @return Whether the window is in local focus mode or not. Loading core/java/android/view/ViewRootImpl.java +0 −1 Original line number Diff line number Diff line Loading @@ -1496,7 +1496,6 @@ public final class ViewRootImpl implements ViewParent, final int newScreenState = toViewScreenState(newDisplayState); if (oldScreenState != newScreenState) { mView.dispatchScreenStateChanged(newScreenState); mImeFocusController.onScreenStateChanged(newScreenState); } if (oldDisplayState == Display.STATE_OFF) { // Draw was suppressed so we need to for it to happen here. Loading services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java +10 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,12 @@ public abstract class InputMethodManagerInternal { void onInputMethodListUpdated(List<InputMethodInfo> info, @UserIdInt int userId); } /** * Called by the power manager to tell the input method manager whether it * should start watching for wake events. */ public abstract void setInteractive(boolean interactive); /** * Hides the current input method, if visible. */ Loading Loading @@ -107,6 +113,10 @@ public abstract class InputMethodManagerInternal { */ private static final InputMethodManagerInternal NOP = new InputMethodManagerInternal() { @Override public void setInteractive(boolean interactive) { } @Override public void hideCurrentInputMethod(@SoftInputShowHideReason int reason) { } Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +24 −0 Original line number Diff line number Diff line Loading @@ -4202,6 +4202,9 @@ public class InputMethodManagerService extends IInputMethodManager.Stub + ((ClientState)msg.obj).uid); } return true; case MSG_SET_INTERACTIVE: handleSetInteractive(msg.arg1 != 0); return true; case MSG_REPORT_FULLSCREEN_MODE: { final boolean fullscreen = msg.arg1 != 0; final ClientState clientState = (ClientState)msg.obj; Loading Loading @@ -4276,6 +4279,20 @@ public class InputMethodManagerService extends IInputMethodManager.Stub return false; } private void handleSetInteractive(final boolean interactive) { synchronized (mMethodMap) { mIsInteractive = interactive; updateSystemUiLocked(interactive ? mImeWindowVis : 0, mBackDisposition); // Inform the current client of the change in active status if (mCurClient != null && mCurClient.client != null) { executeOrSendMessage(mCurClient.client, mCaller.obtainMessageIIO( MSG_SET_ACTIVE, mIsInteractive ? 1 : 0, mInFullscreenMode ? 1 : 0, mCurClient)); } } } private boolean chooseNewDefaultIMELocked() { final InputMethodInfo imi = InputMethodUtils.getMostApplicableDefaultIME( mSettings.getEnabledInputMethodListLocked()); Loading Loading @@ -4884,6 +4901,13 @@ public class InputMethodManagerService extends IInputMethodManager.Stub mService = service; } @Override public void setInteractive(boolean interactive) { // Do everything in handler so as not to block the caller. mService.mHandler.obtainMessage(MSG_SET_INTERACTIVE, interactive ? 1 : 0, 0) .sendToTarget(); } @Override public void hideCurrentInputMethod(@SoftInputShowHideReason int reason) { mService.mHandler.removeMessages(MSG_HIDE_CURRENT_INPUT_METHOD); Loading services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java +5 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,11 @@ public final class MultiClientInputMethodManagerService { LocalServices.addService(InputMethodManagerInternal.class, new InputMethodManagerInternal() { @Override public void setInteractive(boolean interactive) { reportNotSupported(); } @Override public void hideCurrentInputMethod(@SoftInputShowHideReason int reason) { reportNotSupported(); Loading Loading
core/java/android/view/ImeFocusController.java +0 −20 Original line number Diff line number Diff line Loading @@ -207,26 +207,6 @@ public final class ImeFocusController { mHasImeFocus = false; } /** * Called by {@link ViewRootImpl} to feedback the state of the screen for this view. * @param newScreenState The new state of the screen. Can be either * {@link View#SCREEN_STATE_ON} or {@link View#SCREEN_STATE_OFF} */ @UiThread void onScreenStateChanged(int newScreenState) { if (!getImmDelegate().isCurrentRootView(mViewRootImpl)) { return; } // Close input connection and IME when the screen is turn off for security concern. if (newScreenState == View.SCREEN_STATE_OFF && mServedView != null) { if (DEBUG) { Log.d(TAG, "onScreenStateChanged, disconnect input when screen turned off"); } mNextServedView = null; mViewRootImpl.dispatchCheckFocus(); } } /** * @param windowAttribute {@link WindowManager.LayoutParams} to be checked. * @return Whether the window is in local focus mode or not. Loading
core/java/android/view/ViewRootImpl.java +0 −1 Original line number Diff line number Diff line Loading @@ -1496,7 +1496,6 @@ public final class ViewRootImpl implements ViewParent, final int newScreenState = toViewScreenState(newDisplayState); if (oldScreenState != newScreenState) { mView.dispatchScreenStateChanged(newScreenState); mImeFocusController.onScreenStateChanged(newScreenState); } if (oldDisplayState == Display.STATE_OFF) { // Draw was suppressed so we need to for it to happen here. Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java +10 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,12 @@ public abstract class InputMethodManagerInternal { void onInputMethodListUpdated(List<InputMethodInfo> info, @UserIdInt int userId); } /** * Called by the power manager to tell the input method manager whether it * should start watching for wake events. */ public abstract void setInteractive(boolean interactive); /** * Hides the current input method, if visible. */ Loading Loading @@ -107,6 +113,10 @@ public abstract class InputMethodManagerInternal { */ private static final InputMethodManagerInternal NOP = new InputMethodManagerInternal() { @Override public void setInteractive(boolean interactive) { } @Override public void hideCurrentInputMethod(@SoftInputShowHideReason int reason) { } Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +24 −0 Original line number Diff line number Diff line Loading @@ -4202,6 +4202,9 @@ public class InputMethodManagerService extends IInputMethodManager.Stub + ((ClientState)msg.obj).uid); } return true; case MSG_SET_INTERACTIVE: handleSetInteractive(msg.arg1 != 0); return true; case MSG_REPORT_FULLSCREEN_MODE: { final boolean fullscreen = msg.arg1 != 0; final ClientState clientState = (ClientState)msg.obj; Loading Loading @@ -4276,6 +4279,20 @@ public class InputMethodManagerService extends IInputMethodManager.Stub return false; } private void handleSetInteractive(final boolean interactive) { synchronized (mMethodMap) { mIsInteractive = interactive; updateSystemUiLocked(interactive ? mImeWindowVis : 0, mBackDisposition); // Inform the current client of the change in active status if (mCurClient != null && mCurClient.client != null) { executeOrSendMessage(mCurClient.client, mCaller.obtainMessageIIO( MSG_SET_ACTIVE, mIsInteractive ? 1 : 0, mInFullscreenMode ? 1 : 0, mCurClient)); } } } private boolean chooseNewDefaultIMELocked() { final InputMethodInfo imi = InputMethodUtils.getMostApplicableDefaultIME( mSettings.getEnabledInputMethodListLocked()); Loading Loading @@ -4884,6 +4901,13 @@ public class InputMethodManagerService extends IInputMethodManager.Stub mService = service; } @Override public void setInteractive(boolean interactive) { // Do everything in handler so as not to block the caller. mService.mHandler.obtainMessage(MSG_SET_INTERACTIVE, interactive ? 1 : 0, 0) .sendToTarget(); } @Override public void hideCurrentInputMethod(@SoftInputShowHideReason int reason) { mService.mHandler.removeMessages(MSG_HIDE_CURRENT_INPUT_METHOD); Loading
services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java +5 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,11 @@ public final class MultiClientInputMethodManagerService { LocalServices.addService(InputMethodManagerInternal.class, new InputMethodManagerInternal() { @Override public void setInteractive(boolean interactive) { reportNotSupported(); } @Override public void hideCurrentInputMethod(@SoftInputShowHideReason int reason) { reportNotSupported(); Loading