Loading core/java/android/inputmethodservice/IInputMethodWrapper.java +5 −6 Original line number Diff line number Diff line Loading @@ -170,8 +170,8 @@ class IInputMethodWrapper extends IInputMethod.Stub case DO_INITIALIZE_INTERNAL: { SomeArgs args = (SomeArgs) msg.obj; try { inputMethod.initializeInternal((IBinder) args.arg1, msg.arg1, (IInputMethodPrivilegedOperations) args.arg2, (int) args.arg3); inputMethod.initializeInternal((IBinder) args.arg1, (IInputMethodPrivilegedOperations) args.arg2, msg.arg1); } finally { args.recycle(); } Loading Loading @@ -279,11 +279,10 @@ class IInputMethodWrapper extends IInputMethod.Stub @BinderThread @Override public void initializeInternal(IBinder token, int displayId, IInputMethodPrivilegedOperations privOps, int configChanges) { public void initializeInternal(IBinder token, IInputMethodPrivilegedOperations privOps, int configChanges) { mCaller.executeOrSendMessage( mCaller.obtainMessageIOOO(DO_INITIALIZE_INTERNAL, displayId, token, privOps, configChanges)); mCaller.obtainMessageIOO(DO_INITIALIZE_INTERNAL, configChanges, token, privOps)); } @BinderThread Loading core/java/android/inputmethodservice/InputMethodService.java +1 −21 Original line number Diff line number Diff line Loading @@ -589,7 +589,7 @@ public class InputMethodService extends AbstractInputMethodService { */ @MainThread @Override public final void initializeInternal(@NonNull IBinder token, int displayId, public final void initializeInternal(@NonNull IBinder token, IInputMethodPrivilegedOperations privilegedOperations, int configChanges) { if (InputMethodPrivilegedOperationsRegistry.isRegistered(token)) { Log.w(TAG, "The token has already registered, ignore this initialization."); Loading @@ -599,7 +599,6 @@ public class InputMethodService extends AbstractInputMethodService { mConfigTracker.onInitialize(configChanges); mPrivOps.set(privilegedOperations); InputMethodPrivilegedOperationsRegistry.put(token, mPrivOps); updateInputMethodDisplay(displayId); attachToken(token); Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); } Loading Loading @@ -634,25 +633,6 @@ public class InputMethodService extends AbstractInputMethodService { mWindow.setToken(token); } // TODO(b/149463653): remove updateInputMethodDisplay(int displayId) since we'll get the // right display by attachToWindowToken /** * {@inheritDoc} * @hide */ @MainThread @Override public void updateInputMethodDisplay(int displayId) { if (getDisplayId() == displayId) { return; } // Update display for adding IME window to the right display. // TODO(b/111364446) Need to address context lifecycle issue if need to re-create // for update resources & configuration correctly when show soft input // in non-default display. updateDisplay(displayId); } /** * {@inheritDoc} * Loading core/java/android/view/inputmethod/InputMethod.java +1 −14 Original line number Diff line number Diff line Loading @@ -96,8 +96,6 @@ public interface InputMethod { * * @param token special token for the system to identify * {@link InputMethodService} * @param displayId The id of the display that current IME shown. * Used for {{@link #updateInputMethodDisplay(int)}} * @param privilegedOperations IPC endpoint to do some privileged * operations that are allowed only to the * current IME. Loading @@ -105,9 +103,8 @@ public interface InputMethod { * @hide */ @MainThread default void initializeInternal(IBinder token, int displayId, default void initializeInternal(IBinder token, IInputMethodPrivilegedOperations privilegedOperations, int configChanges) { updateInputMethodDisplay(displayId); attachToken(token); } Loading Loading @@ -142,16 +139,6 @@ public interface InputMethod { @MainThread public void attachToken(IBinder token); /** * Update context display according to given displayId. * * @param displayId The id of the display that need to update for context. * @hide */ @MainThread default void updateInputMethodDisplay(int displayId) { } /** * Bind a new application environment in to the input method, so that it * can later start and stop input processing. Loading core/java/com/android/internal/view/IInputMethod.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ import com.android.internal.view.InlineSuggestionsRequestInfo; * {@hide} */ oneway interface IInputMethod { void initializeInternal(IBinder token, int displayId, IInputMethodPrivilegedOperations privOps, void initializeInternal(IBinder token, IInputMethodPrivilegedOperations privOps, int configChanges); void onCreateInlineSuggestionsRequest(in InlineSuggestionsRequestInfo requestInfo, Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +5 −7 Original line number Diff line number Diff line Loading @@ -2544,9 +2544,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } if (DEBUG) Slog.v(TAG, "Initiating attach with token: " + mCurToken); // Dispatch display id for InputMethodService to update context display. executeOrSendMessage(mCurMethod, mCaller.obtainMessageIOOO( MSG_INITIALIZE_IME, mCurTokenDisplayId, mCurMethod, mCurToken, mMethodMap.get(mCurMethodId).getConfigChanges())); executeOrSendMessage(mCurMethod, mCaller.obtainMessageIOO(MSG_INITIALIZE_IME, mMethodMap.get(mCurMethodId).getConfigChanges(), mCurMethod, mCurToken)); scheduleNotifyImeUidToAudioService(mCurMethodUid); if (mCurClient != null) { clearClientSessionLocked(mCurClient); Loading Loading @@ -4364,12 +4363,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub try { if (DEBUG) { Slog.v(TAG, "Sending attach of token: " + args.arg2 + " for display: " + msg.arg1); + mCurTokenDisplayId); } final IBinder token = (IBinder) args.arg2; ((IInputMethod) args.arg1).initializeInternal(token, msg.arg1, new InputMethodPrivilegedOperationsImpl(this, token), (int) args.arg3); ((IInputMethod) args.arg1).initializeInternal(token, new InputMethodPrivilegedOperationsImpl(this, token), msg.arg1); } catch (RemoteException e) { } args.recycle(); Loading Loading
core/java/android/inputmethodservice/IInputMethodWrapper.java +5 −6 Original line number Diff line number Diff line Loading @@ -170,8 +170,8 @@ class IInputMethodWrapper extends IInputMethod.Stub case DO_INITIALIZE_INTERNAL: { SomeArgs args = (SomeArgs) msg.obj; try { inputMethod.initializeInternal((IBinder) args.arg1, msg.arg1, (IInputMethodPrivilegedOperations) args.arg2, (int) args.arg3); inputMethod.initializeInternal((IBinder) args.arg1, (IInputMethodPrivilegedOperations) args.arg2, msg.arg1); } finally { args.recycle(); } Loading Loading @@ -279,11 +279,10 @@ class IInputMethodWrapper extends IInputMethod.Stub @BinderThread @Override public void initializeInternal(IBinder token, int displayId, IInputMethodPrivilegedOperations privOps, int configChanges) { public void initializeInternal(IBinder token, IInputMethodPrivilegedOperations privOps, int configChanges) { mCaller.executeOrSendMessage( mCaller.obtainMessageIOOO(DO_INITIALIZE_INTERNAL, displayId, token, privOps, configChanges)); mCaller.obtainMessageIOO(DO_INITIALIZE_INTERNAL, configChanges, token, privOps)); } @BinderThread Loading
core/java/android/inputmethodservice/InputMethodService.java +1 −21 Original line number Diff line number Diff line Loading @@ -589,7 +589,7 @@ public class InputMethodService extends AbstractInputMethodService { */ @MainThread @Override public final void initializeInternal(@NonNull IBinder token, int displayId, public final void initializeInternal(@NonNull IBinder token, IInputMethodPrivilegedOperations privilegedOperations, int configChanges) { if (InputMethodPrivilegedOperationsRegistry.isRegistered(token)) { Log.w(TAG, "The token has already registered, ignore this initialization."); Loading @@ -599,7 +599,6 @@ public class InputMethodService extends AbstractInputMethodService { mConfigTracker.onInitialize(configChanges); mPrivOps.set(privilegedOperations); InputMethodPrivilegedOperationsRegistry.put(token, mPrivOps); updateInputMethodDisplay(displayId); attachToken(token); Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); } Loading Loading @@ -634,25 +633,6 @@ public class InputMethodService extends AbstractInputMethodService { mWindow.setToken(token); } // TODO(b/149463653): remove updateInputMethodDisplay(int displayId) since we'll get the // right display by attachToWindowToken /** * {@inheritDoc} * @hide */ @MainThread @Override public void updateInputMethodDisplay(int displayId) { if (getDisplayId() == displayId) { return; } // Update display for adding IME window to the right display. // TODO(b/111364446) Need to address context lifecycle issue if need to re-create // for update resources & configuration correctly when show soft input // in non-default display. updateDisplay(displayId); } /** * {@inheritDoc} * Loading
core/java/android/view/inputmethod/InputMethod.java +1 −14 Original line number Diff line number Diff line Loading @@ -96,8 +96,6 @@ public interface InputMethod { * * @param token special token for the system to identify * {@link InputMethodService} * @param displayId The id of the display that current IME shown. * Used for {{@link #updateInputMethodDisplay(int)}} * @param privilegedOperations IPC endpoint to do some privileged * operations that are allowed only to the * current IME. Loading @@ -105,9 +103,8 @@ public interface InputMethod { * @hide */ @MainThread default void initializeInternal(IBinder token, int displayId, default void initializeInternal(IBinder token, IInputMethodPrivilegedOperations privilegedOperations, int configChanges) { updateInputMethodDisplay(displayId); attachToken(token); } Loading Loading @@ -142,16 +139,6 @@ public interface InputMethod { @MainThread public void attachToken(IBinder token); /** * Update context display according to given displayId. * * @param displayId The id of the display that need to update for context. * @hide */ @MainThread default void updateInputMethodDisplay(int displayId) { } /** * Bind a new application environment in to the input method, so that it * can later start and stop input processing. Loading
core/java/com/android/internal/view/IInputMethod.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ import com.android.internal.view.InlineSuggestionsRequestInfo; * {@hide} */ oneway interface IInputMethod { void initializeInternal(IBinder token, int displayId, IInputMethodPrivilegedOperations privOps, void initializeInternal(IBinder token, IInputMethodPrivilegedOperations privOps, int configChanges); void onCreateInlineSuggestionsRequest(in InlineSuggestionsRequestInfo requestInfo, Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +5 −7 Original line number Diff line number Diff line Loading @@ -2544,9 +2544,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } if (DEBUG) Slog.v(TAG, "Initiating attach with token: " + mCurToken); // Dispatch display id for InputMethodService to update context display. executeOrSendMessage(mCurMethod, mCaller.obtainMessageIOOO( MSG_INITIALIZE_IME, mCurTokenDisplayId, mCurMethod, mCurToken, mMethodMap.get(mCurMethodId).getConfigChanges())); executeOrSendMessage(mCurMethod, mCaller.obtainMessageIOO(MSG_INITIALIZE_IME, mMethodMap.get(mCurMethodId).getConfigChanges(), mCurMethod, mCurToken)); scheduleNotifyImeUidToAudioService(mCurMethodUid); if (mCurClient != null) { clearClientSessionLocked(mCurClient); Loading Loading @@ -4364,12 +4363,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub try { if (DEBUG) { Slog.v(TAG, "Sending attach of token: " + args.arg2 + " for display: " + msg.arg1); + mCurTokenDisplayId); } final IBinder token = (IBinder) args.arg2; ((IInputMethod) args.arg1).initializeInternal(token, msg.arg1, new InputMethodPrivilegedOperationsImpl(this, token), (int) args.arg3); ((IInputMethod) args.arg1).initializeInternal(token, new InputMethodPrivilegedOperationsImpl(this, token), msg.arg1); } catch (RemoteException e) { } args.recycle(); Loading