Loading core/java/android/inputmethodservice/InputMethodService.java +4 −2 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import android.text.method.MovementMethod; import android.util.Log; import android.util.PrintWriterPrinter; import android.util.Printer; import android.util.Slog; import android.view.KeyCharacterMap; import android.view.KeyEvent; import android.view.LayoutInflater; Loading Loading @@ -351,6 +352,7 @@ public class InputMethodService extends AbstractInputMethodService { * Take care of attaching the given window token provided by the system. */ public void attachToken(IBinder token) { Slog.i(TAG, "attachToken: Existing token=" + mToken + " new token=" + token); if (mToken == null) { mToken = token; mWindow.setToken(token); Loading Loading @@ -417,7 +419,7 @@ public class InputMethodService extends AbstractInputMethodService { * Handle a request by the system to show the soft input area. */ public void showSoftInput(int flags, ResultReceiver resultReceiver) { if (DEBUG) Log.v(TAG, "showSoftInput()"); if (true || DEBUG) Slog.v(TAG, "showSoftInput()"); boolean wasVis = isInputViewShown(); mShowInputFlags = 0; if (onShowInputRequested(flags, false)) { Loading Loading @@ -1388,7 +1390,7 @@ public class InputMethodService extends AbstractInputMethodService { } public void showWindow(boolean showInput) { if (DEBUG) Log.v(TAG, "Showing window: showInput=" + showInput if (true || DEBUG) Slog.v(TAG, "Showing window: showInput=" + showInput + " mShowInputRequested=" + mShowInputRequested + " mWindowAdded=" + mWindowAdded + " mWindowCreated=" + mWindowCreated Loading services/java/com/android/server/InputMethodManagerService.java +11 −5 Original line number Diff line number Diff line Loading @@ -1247,7 +1247,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub // will reject the command because the token attached to these messages is invalid. mCaller.removeMessages(MSG_SHOW_SOFT_INPUT); mCaller.removeMessages(MSG_HIDE_SOFT_INPUT); if (DEBUG) Slog.v(TAG, "Initiating attach with token: " + mCurToken); if (true || DEBUG) Slog.v(TAG, "Initiating attach with token: " + mCurToken); executeOrSendMessage(mCurMethod, mCaller.obtainMessageOO( MSG_ATTACH_TOKEN, mCurMethod, mCurToken)); if (mCurClient != null) { Loading Loading @@ -1693,7 +1693,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } } if (DEBUG) Slog.v(TAG, "Client requesting input be shown"); if (true || DEBUG) Slog.v(TAG, "Client requesting input be shown"); return showCurrentInputLocked(flags, resultReceiver); } } finally { Loading @@ -1717,6 +1717,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub boolean res = false; if (mCurMethod != null) { if (true ||DEBUG) Slog.d(TAG, "showCurrentInputLocked: mCurToken=" + mCurToken, new RuntimeException("here").fillInStackTrace()); executeOrSendMessage(mCurMethod, mCaller.obtainMessageIOO( MSG_SHOW_SOFT_INPUT, getImeShowFlags(), mCurMethod, resultReceiver)); Loading Loading @@ -1788,12 +1790,12 @@ public class InputMethodManagerService extends IInputMethodManager.Stub boolean hideCurrentInputLocked(int flags, ResultReceiver resultReceiver) { if ((flags&InputMethodManager.HIDE_IMPLICIT_ONLY) != 0 && (mShowExplicitlyRequested || mShowForced)) { if (DEBUG) Slog.v(TAG, if (true ||DEBUG) Slog.v(TAG, "Not hiding: explicit show not cancelled by non-explicit hide"); return false; } if (mShowForced && (flags&InputMethodManager.HIDE_NOT_ALWAYS) != 0) { if (DEBUG) Slog.v(TAG, if (true ||DEBUG) Slog.v(TAG, "Not hiding: forced show not cancelled by not-always hide"); return false; } Loading Loading @@ -2305,6 +2307,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub case MSG_SHOW_SOFT_INPUT: args = (SomeArgs)msg.obj; try { if (true || DEBUG) Slog.v(TAG, "Calling " + args.arg1 + ".showSoftInput(" + msg.arg1 + ", " + args.arg2 + ")"); ((IInputMethod)args.arg1).showSoftInput(msg.arg1, (ResultReceiver)args.arg2); } catch (RemoteException e) { Loading @@ -2314,6 +2318,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub case MSG_HIDE_SOFT_INPUT: args = (SomeArgs)msg.obj; try { if (true || DEBUG) Slog.v(TAG, "Calling " + args.arg1 + ".hideSoftInput(0, " + args.arg2 + ")"); ((IInputMethod)args.arg1).hideSoftInput(0, (ResultReceiver)args.arg2); } catch (RemoteException e) { Loading @@ -2323,7 +2329,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub case MSG_ATTACH_TOKEN: args = (SomeArgs)msg.obj; try { if (DEBUG) Slog.v(TAG, "Sending attach of token: " + args.arg2); if (true || DEBUG) Slog.v(TAG, "Sending attach of token: " + args.arg2); ((IInputMethod)args.arg1).attachToken((IBinder)args.arg2); } catch (RemoteException e) { } Loading Loading
core/java/android/inputmethodservice/InputMethodService.java +4 −2 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import android.text.method.MovementMethod; import android.util.Log; import android.util.PrintWriterPrinter; import android.util.Printer; import android.util.Slog; import android.view.KeyCharacterMap; import android.view.KeyEvent; import android.view.LayoutInflater; Loading Loading @@ -351,6 +352,7 @@ public class InputMethodService extends AbstractInputMethodService { * Take care of attaching the given window token provided by the system. */ public void attachToken(IBinder token) { Slog.i(TAG, "attachToken: Existing token=" + mToken + " new token=" + token); if (mToken == null) { mToken = token; mWindow.setToken(token); Loading Loading @@ -417,7 +419,7 @@ public class InputMethodService extends AbstractInputMethodService { * Handle a request by the system to show the soft input area. */ public void showSoftInput(int flags, ResultReceiver resultReceiver) { if (DEBUG) Log.v(TAG, "showSoftInput()"); if (true || DEBUG) Slog.v(TAG, "showSoftInput()"); boolean wasVis = isInputViewShown(); mShowInputFlags = 0; if (onShowInputRequested(flags, false)) { Loading Loading @@ -1388,7 +1390,7 @@ public class InputMethodService extends AbstractInputMethodService { } public void showWindow(boolean showInput) { if (DEBUG) Log.v(TAG, "Showing window: showInput=" + showInput if (true || DEBUG) Slog.v(TAG, "Showing window: showInput=" + showInput + " mShowInputRequested=" + mShowInputRequested + " mWindowAdded=" + mWindowAdded + " mWindowCreated=" + mWindowCreated Loading
services/java/com/android/server/InputMethodManagerService.java +11 −5 Original line number Diff line number Diff line Loading @@ -1247,7 +1247,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub // will reject the command because the token attached to these messages is invalid. mCaller.removeMessages(MSG_SHOW_SOFT_INPUT); mCaller.removeMessages(MSG_HIDE_SOFT_INPUT); if (DEBUG) Slog.v(TAG, "Initiating attach with token: " + mCurToken); if (true || DEBUG) Slog.v(TAG, "Initiating attach with token: " + mCurToken); executeOrSendMessage(mCurMethod, mCaller.obtainMessageOO( MSG_ATTACH_TOKEN, mCurMethod, mCurToken)); if (mCurClient != null) { Loading Loading @@ -1693,7 +1693,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } } if (DEBUG) Slog.v(TAG, "Client requesting input be shown"); if (true || DEBUG) Slog.v(TAG, "Client requesting input be shown"); return showCurrentInputLocked(flags, resultReceiver); } } finally { Loading @@ -1717,6 +1717,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub boolean res = false; if (mCurMethod != null) { if (true ||DEBUG) Slog.d(TAG, "showCurrentInputLocked: mCurToken=" + mCurToken, new RuntimeException("here").fillInStackTrace()); executeOrSendMessage(mCurMethod, mCaller.obtainMessageIOO( MSG_SHOW_SOFT_INPUT, getImeShowFlags(), mCurMethod, resultReceiver)); Loading Loading @@ -1788,12 +1790,12 @@ public class InputMethodManagerService extends IInputMethodManager.Stub boolean hideCurrentInputLocked(int flags, ResultReceiver resultReceiver) { if ((flags&InputMethodManager.HIDE_IMPLICIT_ONLY) != 0 && (mShowExplicitlyRequested || mShowForced)) { if (DEBUG) Slog.v(TAG, if (true ||DEBUG) Slog.v(TAG, "Not hiding: explicit show not cancelled by non-explicit hide"); return false; } if (mShowForced && (flags&InputMethodManager.HIDE_NOT_ALWAYS) != 0) { if (DEBUG) Slog.v(TAG, if (true ||DEBUG) Slog.v(TAG, "Not hiding: forced show not cancelled by not-always hide"); return false; } Loading Loading @@ -2305,6 +2307,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub case MSG_SHOW_SOFT_INPUT: args = (SomeArgs)msg.obj; try { if (true || DEBUG) Slog.v(TAG, "Calling " + args.arg1 + ".showSoftInput(" + msg.arg1 + ", " + args.arg2 + ")"); ((IInputMethod)args.arg1).showSoftInput(msg.arg1, (ResultReceiver)args.arg2); } catch (RemoteException e) { Loading @@ -2314,6 +2318,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub case MSG_HIDE_SOFT_INPUT: args = (SomeArgs)msg.obj; try { if (true || DEBUG) Slog.v(TAG, "Calling " + args.arg1 + ".hideSoftInput(0, " + args.arg2 + ")"); ((IInputMethod)args.arg1).hideSoftInput(0, (ResultReceiver)args.arg2); } catch (RemoteException e) { Loading @@ -2323,7 +2329,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub case MSG_ATTACH_TOKEN: args = (SomeArgs)msg.obj; try { if (DEBUG) Slog.v(TAG, "Sending attach of token: " + args.arg2); if (true || DEBUG) Slog.v(TAG, "Sending attach of token: " + args.arg2); ((IInputMethod)args.arg1).attachToken((IBinder)args.arg2); } catch (RemoteException e) { } Loading