Loading core/java/android/view/ImeInsetsSourceConsumer.java +2 −1 Original line number Diff line number Diff line Loading @@ -168,7 +168,8 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer { statsToken = ImeTracker.forLogging().onRequestHide(null /* component */, Process.myUid(), ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT, SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API); SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API, mController.getHost().isHandlingPointerEvent() /* fromUser */); } ImeTracker.forLogging().onProgress(statsToken, Loading core/java/android/view/InsetsController.java +9 −2 Original line number Diff line number Diff line Loading @@ -224,6 +224,11 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation * @param running {@code true} if there is any animation running; {@code false} otherwise. */ default void notifyAnimationRunningStateChanged(boolean running) {} /** @see ViewRootImpl#isHandlingPointerEvent */ default boolean isHandlingPointerEvent() { return false; } } private static final String TAG = "InsetsController"; Loading Loading @@ -1063,7 +1068,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation if ((types & ime()) != 0) { statsToken = ImeTracker.forLogging().onRequestShow(null /* component */, Process.myUid(), ImeTracker.ORIGIN_CLIENT_SHOW_SOFT_INPUT, SoftInputShowHideReason.SHOW_SOFT_INPUT_BY_INSETS_API); SoftInputShowHideReason.SHOW_SOFT_INPUT_BY_INSETS_API, mHost.isHandlingPointerEvent() /* fromUser */); } show(types, false /* fromIme */, statsToken); Loading Loading @@ -1168,7 +1174,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation if ((types & ime()) != 0) { statsToken = ImeTracker.forLogging().onRequestHide(null /* component */, Process.myUid(), ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT, SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API); SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API, mHost.isHandlingPointerEvent() /* fromUser */); } hide(types, false /* fromIme */, statsToken); Loading core/java/android/view/ViewRootImpl.java +9 −0 Original line number Diff line number Diff line Loading @@ -7587,6 +7587,15 @@ public final class ViewRootImpl implements ViewParent, } } /** * Returns whether this view is currently handling a pointer event. * * @hide */ public boolean isHandlingPointerEvent() { return mAttachInfo.mHandlingPointerEvent; } private void resetPointerIcon(MotionEvent event) { mPointerIconType = null; mResolvedPointerIcon = null; Loading core/java/android/view/ViewRootInsetsControllerHost.java +5 −0 Original line number Diff line number Diff line Loading @@ -286,6 +286,11 @@ public class ViewRootInsetsControllerHost implements InsetsController.Host { } } @Override public boolean isHandlingPointerEvent() { return mViewRoot != null && mViewRoot.isHandlingPointerEvent(); } private boolean isVisibleToUser() { return mViewRoot.getHostVisibility() == View.VISIBLE; } Loading core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java +4 −4 Original line number Diff line number Diff line Loading @@ -575,14 +575,14 @@ final class IInputMethodManagerGlobalInvoker { @AnyThread @NonNull static ImeTracker.Token onRequestShow(@NonNull String tag, int uid, @ImeTracker.Origin int origin, @SoftInputShowHideReason int reason) { @ImeTracker.Origin int origin, @SoftInputShowHideReason int reason, boolean fromUser) { final IImeTracker service = getImeTrackerService(); if (service == null) { // Create token with "fake" binder if the service was not found. return new ImeTracker.Token(new Binder(), tag); } try { return service.onRequestShow(tag, uid, origin, reason); return service.onRequestShow(tag, uid, origin, reason, fromUser); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading @@ -592,14 +592,14 @@ final class IInputMethodManagerGlobalInvoker { @AnyThread @NonNull static ImeTracker.Token onRequestHide(@NonNull String tag, int uid, @ImeTracker.Origin int origin, @SoftInputShowHideReason int reason) { @ImeTracker.Origin int origin, @SoftInputShowHideReason int reason, boolean fromUser) { final IImeTracker service = getImeTrackerService(); if (service == null) { // Create token with "fake" binder if the service was not found. return new ImeTracker.Token(new Binder(), tag); } try { return service.onRequestHide(tag, uid, origin, reason); return service.onRequestHide(tag, uid, origin, reason, fromUser); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading Loading
core/java/android/view/ImeInsetsSourceConsumer.java +2 −1 Original line number Diff line number Diff line Loading @@ -168,7 +168,8 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer { statsToken = ImeTracker.forLogging().onRequestHide(null /* component */, Process.myUid(), ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT, SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API); SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API, mController.getHost().isHandlingPointerEvent() /* fromUser */); } ImeTracker.forLogging().onProgress(statsToken, Loading
core/java/android/view/InsetsController.java +9 −2 Original line number Diff line number Diff line Loading @@ -224,6 +224,11 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation * @param running {@code true} if there is any animation running; {@code false} otherwise. */ default void notifyAnimationRunningStateChanged(boolean running) {} /** @see ViewRootImpl#isHandlingPointerEvent */ default boolean isHandlingPointerEvent() { return false; } } private static final String TAG = "InsetsController"; Loading Loading @@ -1063,7 +1068,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation if ((types & ime()) != 0) { statsToken = ImeTracker.forLogging().onRequestShow(null /* component */, Process.myUid(), ImeTracker.ORIGIN_CLIENT_SHOW_SOFT_INPUT, SoftInputShowHideReason.SHOW_SOFT_INPUT_BY_INSETS_API); SoftInputShowHideReason.SHOW_SOFT_INPUT_BY_INSETS_API, mHost.isHandlingPointerEvent() /* fromUser */); } show(types, false /* fromIme */, statsToken); Loading Loading @@ -1168,7 +1174,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation if ((types & ime()) != 0) { statsToken = ImeTracker.forLogging().onRequestHide(null /* component */, Process.myUid(), ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT, SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API); SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API, mHost.isHandlingPointerEvent() /* fromUser */); } hide(types, false /* fromIme */, statsToken); Loading
core/java/android/view/ViewRootImpl.java +9 −0 Original line number Diff line number Diff line Loading @@ -7587,6 +7587,15 @@ public final class ViewRootImpl implements ViewParent, } } /** * Returns whether this view is currently handling a pointer event. * * @hide */ public boolean isHandlingPointerEvent() { return mAttachInfo.mHandlingPointerEvent; } private void resetPointerIcon(MotionEvent event) { mPointerIconType = null; mResolvedPointerIcon = null; Loading
core/java/android/view/ViewRootInsetsControllerHost.java +5 −0 Original line number Diff line number Diff line Loading @@ -286,6 +286,11 @@ public class ViewRootInsetsControllerHost implements InsetsController.Host { } } @Override public boolean isHandlingPointerEvent() { return mViewRoot != null && mViewRoot.isHandlingPointerEvent(); } private boolean isVisibleToUser() { return mViewRoot.getHostVisibility() == View.VISIBLE; } Loading
core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java +4 −4 Original line number Diff line number Diff line Loading @@ -575,14 +575,14 @@ final class IInputMethodManagerGlobalInvoker { @AnyThread @NonNull static ImeTracker.Token onRequestShow(@NonNull String tag, int uid, @ImeTracker.Origin int origin, @SoftInputShowHideReason int reason) { @ImeTracker.Origin int origin, @SoftInputShowHideReason int reason, boolean fromUser) { final IImeTracker service = getImeTrackerService(); if (service == null) { // Create token with "fake" binder if the service was not found. return new ImeTracker.Token(new Binder(), tag); } try { return service.onRequestShow(tag, uid, origin, reason); return service.onRequestShow(tag, uid, origin, reason, fromUser); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading @@ -592,14 +592,14 @@ final class IInputMethodManagerGlobalInvoker { @AnyThread @NonNull static ImeTracker.Token onRequestHide(@NonNull String tag, int uid, @ImeTracker.Origin int origin, @SoftInputShowHideReason int reason) { @ImeTracker.Origin int origin, @SoftInputShowHideReason int reason, boolean fromUser) { final IImeTracker service = getImeTrackerService(); if (service == null) { // Create token with "fake" binder if the service was not found. return new ImeTracker.Token(new Binder(), tag); } try { return service.onRequestHide(tag, uid, origin, reason); return service.onRequestHide(tag, uid, origin, reason, fromUser); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading