Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +24 −3 Original line number Diff line number Diff line Loading @@ -820,10 +820,15 @@ public class InputMethodManagerService extends IInputMethodManager.Stub final EditorInfo mEditorInfo; @NonNull final String mRequestWindowName; @Nullable final String mImeControlTargetName; @Nullable final String mImeTargetNameFromWm; Entry(ClientState client, EditorInfo editorInfo, String focusedWindowName, @SoftInputModeFlags int softInputMode, @SoftInputShowHideReason int reason, boolean inFullscreenMode, String requestWindowName) { boolean inFullscreenMode, String requestWindowName, @Nullable String imeControlTargetName, @Nullable String imeTargetName) { mClientState = client; mEditorInfo = editorInfo; mFocusedWindowName = focusedWindowName; Loading @@ -833,6 +838,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub mWallTime = System.currentTimeMillis(); mInFullscreenMode = inFullscreenMode; mRequestWindowName = requestWindowName; mImeControlTargetName = imeControlTargetName; mImeTargetNameFromWm = imeTargetName; } } Loading Loading @@ -872,6 +879,12 @@ public class InputMethodManagerService extends IInputMethodManager.Stub pw.print(prefix); pw.println(" requestWindowName=" + entry.mRequestWindowName); pw.print(prefix); pw.println(" imeControlTargetName=" + entry.mImeControlTargetName); pw.print(prefix); pw.println(" imeTargetNameFromWm=" + entry.mImeTargetNameFromWm); pw.print(prefix); pw.print(" editorInfo: "); pw.print(" inputType=" + entry.mEditorInfo.inputType); Loading Loading @@ -4123,7 +4136,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub mWindowManagerInternal.getWindowName(mCurFocusedWindow), mCurFocusedWindowSoftInputMode, reason, mInFullscreenMode, mWindowManagerInternal.getWindowName( mShowRequestWindowMap.get(args.arg3)))); mShowRequestWindowMap.get(args.arg3)), mWindowManagerInternal.getImeControlTargetNameForLogging( mCurTokenDisplayId), mWindowManagerInternal.getImeTargetNameForLogging( mCurTokenDisplayId))); } catch (RemoteException e) { } args.recycle(); Loading @@ -4142,7 +4159,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub mWindowManagerInternal.getWindowName(mCurFocusedWindow), mCurFocusedWindowSoftInputMode, reason, mInFullscreenMode, mWindowManagerInternal.getWindowName( mHideRequestWindowMap.get(args.arg3)))); mHideRequestWindowMap.get(args.arg3)), mWindowManagerInternal.getImeControlTargetNameForLogging( mCurTokenDisplayId), mWindowManagerInternal.getImeTargetNameForLogging( mCurTokenDisplayId))); } catch (RemoteException e) { } args.recycle(); Loading services/core/java/com/android/server/wm/WindowManagerInternal.java +20 −0 Original line number Diff line number Diff line Loading @@ -576,4 +576,24 @@ public abstract class WindowManagerInternal { * @return The corresponding {@link WindowState#getName()} */ public abstract String getWindowName(@NonNull IBinder binder); /** * Return the window name of IME Insets control target. * * @param displayId The ID of the display which input method is currently focused. * @return The corresponding {@link WindowState#getName()} */ public abstract @Nullable String getImeControlTargetNameForLogging(int displayId); /** * Return the current window name of the input method is on top of. * * Note that the concept of this window is only reparent the target window behind the input * method window, it may different with the window which reported by * {@code InputMethodManagerService#reportStartInput} which has input connection. * * @param displayId The ID of the display which input method is currently focused. * @return The corresponding {@link WindowState#getName()} */ public abstract @Nullable String getImeTargetNameForLogging(int displayId); } services/core/java/com/android/server/wm/WindowManagerService.java +27 −0 Original line number Diff line number Diff line Loading @@ -7755,6 +7755,33 @@ public class WindowManagerService extends IWindowManager.Stub return w != null ? w.getName() : null; } } @Override public String getImeControlTargetNameForLogging(int displayId) { synchronized (mGlobalLock) { final DisplayContent dc = mRoot.getDisplayContent(displayId); if (dc == null) { return null; } final InsetsControlTarget target = dc.mInputMethodControlTarget; if (target == null) { return null; } final WindowState win = target.getWindow(); return win != null ? win.getName() : target.toString(); } } @Override public String getImeTargetNameForLogging(int displayId) { synchronized (mGlobalLock) { final DisplayContent dc = mRoot.getDisplayContent(displayId); if (dc == null) { return null; } return dc.mInputMethodTarget != null ? dc.mInputMethodTarget.getName() : null; } } } void registerAppFreezeListener(AppFreezeListener listener) { Loading Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +24 −3 Original line number Diff line number Diff line Loading @@ -820,10 +820,15 @@ public class InputMethodManagerService extends IInputMethodManager.Stub final EditorInfo mEditorInfo; @NonNull final String mRequestWindowName; @Nullable final String mImeControlTargetName; @Nullable final String mImeTargetNameFromWm; Entry(ClientState client, EditorInfo editorInfo, String focusedWindowName, @SoftInputModeFlags int softInputMode, @SoftInputShowHideReason int reason, boolean inFullscreenMode, String requestWindowName) { boolean inFullscreenMode, String requestWindowName, @Nullable String imeControlTargetName, @Nullable String imeTargetName) { mClientState = client; mEditorInfo = editorInfo; mFocusedWindowName = focusedWindowName; Loading @@ -833,6 +838,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub mWallTime = System.currentTimeMillis(); mInFullscreenMode = inFullscreenMode; mRequestWindowName = requestWindowName; mImeControlTargetName = imeControlTargetName; mImeTargetNameFromWm = imeTargetName; } } Loading Loading @@ -872,6 +879,12 @@ public class InputMethodManagerService extends IInputMethodManager.Stub pw.print(prefix); pw.println(" requestWindowName=" + entry.mRequestWindowName); pw.print(prefix); pw.println(" imeControlTargetName=" + entry.mImeControlTargetName); pw.print(prefix); pw.println(" imeTargetNameFromWm=" + entry.mImeTargetNameFromWm); pw.print(prefix); pw.print(" editorInfo: "); pw.print(" inputType=" + entry.mEditorInfo.inputType); Loading Loading @@ -4123,7 +4136,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub mWindowManagerInternal.getWindowName(mCurFocusedWindow), mCurFocusedWindowSoftInputMode, reason, mInFullscreenMode, mWindowManagerInternal.getWindowName( mShowRequestWindowMap.get(args.arg3)))); mShowRequestWindowMap.get(args.arg3)), mWindowManagerInternal.getImeControlTargetNameForLogging( mCurTokenDisplayId), mWindowManagerInternal.getImeTargetNameForLogging( mCurTokenDisplayId))); } catch (RemoteException e) { } args.recycle(); Loading @@ -4142,7 +4159,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub mWindowManagerInternal.getWindowName(mCurFocusedWindow), mCurFocusedWindowSoftInputMode, reason, mInFullscreenMode, mWindowManagerInternal.getWindowName( mHideRequestWindowMap.get(args.arg3)))); mHideRequestWindowMap.get(args.arg3)), mWindowManagerInternal.getImeControlTargetNameForLogging( mCurTokenDisplayId), mWindowManagerInternal.getImeTargetNameForLogging( mCurTokenDisplayId))); } catch (RemoteException e) { } args.recycle(); Loading
services/core/java/com/android/server/wm/WindowManagerInternal.java +20 −0 Original line number Diff line number Diff line Loading @@ -576,4 +576,24 @@ public abstract class WindowManagerInternal { * @return The corresponding {@link WindowState#getName()} */ public abstract String getWindowName(@NonNull IBinder binder); /** * Return the window name of IME Insets control target. * * @param displayId The ID of the display which input method is currently focused. * @return The corresponding {@link WindowState#getName()} */ public abstract @Nullable String getImeControlTargetNameForLogging(int displayId); /** * Return the current window name of the input method is on top of. * * Note that the concept of this window is only reparent the target window behind the input * method window, it may different with the window which reported by * {@code InputMethodManagerService#reportStartInput} which has input connection. * * @param displayId The ID of the display which input method is currently focused. * @return The corresponding {@link WindowState#getName()} */ public abstract @Nullable String getImeTargetNameForLogging(int displayId); }
services/core/java/com/android/server/wm/WindowManagerService.java +27 −0 Original line number Diff line number Diff line Loading @@ -7755,6 +7755,33 @@ public class WindowManagerService extends IWindowManager.Stub return w != null ? w.getName() : null; } } @Override public String getImeControlTargetNameForLogging(int displayId) { synchronized (mGlobalLock) { final DisplayContent dc = mRoot.getDisplayContent(displayId); if (dc == null) { return null; } final InsetsControlTarget target = dc.mInputMethodControlTarget; if (target == null) { return null; } final WindowState win = target.getWindow(); return win != null ? win.getName() : target.toString(); } } @Override public String getImeTargetNameForLogging(int displayId) { synchronized (mGlobalLock) { final DisplayContent dc = mRoot.getDisplayContent(displayId); if (dc == null) { return null; } return dc.mInputMethodTarget != null ? dc.mInputMethodTarget.getName() : null; } } } void registerAppFreezeListener(AppFreezeListener listener) { Loading