Loading core/java/android/inputmethodservice/IInputMethodWrapper.java +6 −10 Original line number Diff line number Diff line Loading @@ -223,13 +223,11 @@ class IInputMethodWrapper extends IInputMethod.Stub final SomeArgs args = (SomeArgs) msg.obj; final ImeTracker.Token statsToken = (ImeTracker.Token) args.arg3; if (isValid(inputMethod, target, "DO_SHOW_SOFT_INPUT")) { ImeTracker.forLogging().onProgress( statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH); inputMethod.showSoftInputWithToken( msg.arg1, (ResultReceiver) args.arg2, (IBinder) args.arg1, statsToken); } else { ImeTracker.forLogging().onFailed( statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH); ImeTracker.get().onFailed(statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH); } args.recycle(); return; Loading @@ -238,13 +236,11 @@ class IInputMethodWrapper extends IInputMethod.Stub final SomeArgs args = (SomeArgs) msg.obj; final ImeTracker.Token statsToken = (ImeTracker.Token) args.arg3; if (isValid(inputMethod, target, "DO_HIDE_SOFT_INPUT")) { ImeTracker.forLogging().onProgress( statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH); inputMethod.hideSoftInputWithToken(msg.arg1, (ResultReceiver) args.arg2, (IBinder) args.arg1, statsToken); } else { ImeTracker.forLogging().onFailed( statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH); ImeTracker.get().onFailed(statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH); } args.recycle(); return; Loading Loading @@ -432,7 +428,7 @@ class IInputMethodWrapper extends IInputMethod.Stub @Override public void showSoftInput(IBinder showInputToken, @Nullable ImeTracker.Token statsToken, int flags, ResultReceiver resultReceiver) { ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER); mCaller.executeOrSendMessage(mCaller.obtainMessageIOOO(DO_SHOW_SOFT_INPUT, flags, showInputToken, resultReceiver, statsToken)); } Loading @@ -441,7 +437,7 @@ class IInputMethodWrapper extends IInputMethod.Stub @Override public void hideSoftInput(IBinder hideInputToken, @Nullable ImeTracker.Token statsToken, int flags, ResultReceiver resultReceiver) { ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER); mCaller.executeOrSendMessage(mCaller.obtainMessageIOOO(DO_HIDE_SOFT_INPUT, flags, hideInputToken, resultReceiver, statsToken)); } Loading core/java/android/inputmethodservice/InputMethodService.java +5 −7 Original line number Diff line number Diff line Loading @@ -896,8 +896,7 @@ public class InputMethodService extends AbstractInputMethodService { @MainThread @Override public void hideSoftInput(int flags, ResultReceiver resultReceiver) { ImeTracker.forLogging().onProgress( mCurStatsToken, ImeTracker.PHASE_IME_HIDE_SOFT_INPUT); ImeTracker.get().onProgress(mCurStatsToken, ImeTracker.PHASE_IME_HIDE_SOFT_INPUT); if (DEBUG) Log.v(TAG, "hideSoftInput()"); if (getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.R && !mSystemCallingHideSoftInput) { Loading Loading @@ -951,8 +950,7 @@ public class InputMethodService extends AbstractInputMethodService { @MainThread @Override public void showSoftInput(int flags, ResultReceiver resultReceiver) { ImeTracker.forLogging().onProgress( mCurStatsToken, ImeTracker.PHASE_IME_SHOW_SOFT_INPUT); ImeTracker.get().onProgress(mCurStatsToken, ImeTracker.PHASE_IME_SHOW_SOFT_INPUT); if (DEBUG) Log.v(TAG, "showSoftInput()"); // TODO(b/148086656): Disallow IME developers from calling InputMethodImpl methods. if (getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.R Loading @@ -968,11 +966,11 @@ public class InputMethodService extends AbstractInputMethodService { null /* icProto */); final boolean wasVisible = isInputViewShown(); if (dispatchOnShowInputRequested(flags, false)) { ImeTracker.forLogging().onProgress(mCurStatsToken, ImeTracker.get().onProgress(mCurStatsToken, ImeTracker.PHASE_IME_ON_SHOW_SOFT_INPUT_TRUE); showWindow(true); } else { ImeTracker.forLogging().onFailed(mCurStatsToken, ImeTracker.get().onFailed(mCurStatsToken, ImeTracker.PHASE_IME_ON_SHOW_SOFT_INPUT_TRUE); } setImeWindowStatus(mapToImeWindowStatus(), mBackDisposition); Loading Loading @@ -2981,7 +2979,7 @@ public class InputMethodService extends AbstractInputMethodService { ImeTracing.getInstance().triggerServiceDump( "InputMethodService#applyVisibilityInInsetsConsumerIfNecessary", mDumper, null /* icProto */); ImeTracker.forLogging().onProgress(mCurStatsToken, ImeTracker.get().onProgress(mCurStatsToken, ImeTracker.PHASE_IME_APPLY_VISIBILITY_INSETS_CONSUMER); mPrivOps.applyImeVisibilityAsync(setVisible ? mCurShowInputToken : mCurHideInputToken, setVisible, mCurStatsToken); Loading core/java/android/view/ImeInsetsSourceConsumer.java +3 −4 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer { // TODO: ResultReceiver for IME. // TODO: Set mShowOnNextImeRender to automatically show IME and guard it with a flag. ImeTracker.forLogging().onProgress(statsToken, ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_INSETS_CONSUMER_REQUEST_SHOW); if (getControl() == null) { Loading Loading @@ -164,13 +164,12 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer { // - we do already have one, but we have control and use the passed in token // for the insets animation already. if (statsToken == null || getControl() != null) { statsToken = ImeTracker.forLogging().onRequestHide(null /* component */, Process.myUid(), statsToken = ImeTracker.get().onRequestHide(null /* component */, Process.myUid(), ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT, SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API); } ImeTracker.forLogging().onProgress(statsToken, ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_INSETS_CONSUMER_NOTIFY_HIDDEN); getImm().notifyImeHidden(mController.getHost().getWindowToken(), statsToken); Loading core/java/android/view/InsetsController.java +24 −101 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ import static android.view.WindowInsets.Type.FIRST; import static android.view.WindowInsets.Type.LAST; import static android.view.WindowInsets.Type.all; import static android.view.WindowInsets.Type.ime; import static android.view.inputmethod.ImeTracker.PHASE_CLIENT_ANIMATION_CANCEL; import android.animation.AnimationHandler; import android.animation.Animator; Loading @@ -36,8 +35,6 @@ import android.animation.ValueAnimator; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.app.ActivityThread; import android.content.Context; import android.content.res.CompatibilityInfo; import android.graphics.Insets; import android.graphics.Rect; Loading @@ -63,7 +60,6 @@ import android.view.animation.Interpolator; import android.view.animation.LinearInterpolator; import android.view.animation.PathInterpolator; import android.view.inputmethod.ImeTracker; import android.view.inputmethod.ImeTracker.InputMethodJankContext; import android.view.inputmethod.InputMethodManager; import com.android.internal.annotations.VisibleForTesting; Loading Loading @@ -190,14 +186,6 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation @Nullable String getRootViewTitle(); /** * @return the context related to the rootView. */ @Nullable default Context getRootViewContext() { return null; } /** @see ViewRootImpl#dipToPx */ int dipToPx(int dips); Loading Loading @@ -318,7 +306,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation @Retention(RetentionPolicy.SOURCE) @IntDef(value = {ANIMATION_TYPE_NONE, ANIMATION_TYPE_SHOW, ANIMATION_TYPE_HIDE, ANIMATION_TYPE_USER, ANIMATION_TYPE_RESIZE}) public @interface AnimationType { @interface AnimationType { } /** Loading @@ -333,27 +321,6 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation /** Logging listener. */ private WindowInsetsAnimationControlListener mLoggingListener; /** Context for {@link android.view.inputmethod.ImeTracker.ImeJankTracker} to monitor jank. */ private final InputMethodJankContext mJankContext = new InputMethodJankContext() { @Override public Context getDisplayContext() { return mHost != null ? mHost.getRootViewContext() : null; } @Override public SurfaceControl getTargetSurfaceControl() { final InsetsSourceConsumer imeSourceConsumer = mSourceConsumers.get(ITYPE_IME); final InsetsSourceControl imeSourceControl = imeSourceConsumer != null ? imeSourceConsumer.getControl() : null; return imeSourceControl != null ? imeSourceControl.getLeash() : null; } @Override public String getHostPackageName() { return mHost != null ? mHost.getRootViewContext().getPackageName() : null; } }; /** * The default implementation of listener, to be used by InsetsController and InsetsPolicy to * animate insets. Loading @@ -371,7 +338,6 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation private final boolean mDisable; private final int mFloatingImeBottomInset; private final WindowInsetsAnimationControlListener mLoggingListener; private final InputMethodJankContext mInputMethodJankContext; private final ThreadLocal<AnimationHandler> mSfAnimationHandlerThreadLocal = new ThreadLocal<AnimationHandler>() { Loading @@ -385,8 +351,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation public InternalAnimationControlListener(boolean show, boolean hasAnimationCallbacks, @InsetsType int requestedTypes, @Behavior int behavior, boolean disable, int floatingImeBottomInset, WindowInsetsAnimationControlListener loggingListener, @Nullable InputMethodJankContext jankContext) { int floatingImeBottomInset, WindowInsetsAnimationControlListener loggingListener) { mShow = show; mHasAnimationCallbacks = hasAnimationCallbacks; mRequestedTypes = requestedTypes; Loading @@ -395,7 +360,6 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation mDisable = disable; mFloatingImeBottomInset = floatingImeBottomInset; mLoggingListener = loggingListener; mInputMethodJankContext = jankContext; } @Override Loading Loading @@ -442,26 +406,10 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation + insetsFraction); }); mAnimator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { if (mInputMethodJankContext == null) return; ImeTracker.forJank().onRequestAnimation( mInputMethodJankContext, mShow ? ANIMATION_TYPE_SHOW : ANIMATION_TYPE_HIDE, !mHasAnimationCallbacks); } @Override public void onAnimationCancel(Animator animation) { if (mInputMethodJankContext == null) return; ImeTracker.forJank().onCancelAnimation(); } @Override public void onAnimationEnd(Animator animation) { onAnimationFinish(); if (mInputMethodJankContext == null) return; ImeTracker.forJank().onFinishAnimation(); } }); if (!mHasAnimationCallbacks) { Loading Loading @@ -925,7 +873,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation /** * @see InsetsState#calculateInsets(Rect, InsetsState, boolean, boolean, int, int, int, int, * int, android.util.SparseIntArray) * int, SparseIntArray) */ @VisibleForTesting public WindowInsets calculateInsets(boolean isScreenRound, boolean alwaysConsumeSystemBars, Loading Loading @@ -1033,7 +981,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation public void show(@InsetsType int types) { ImeTracker.Token statsToken = null; if ((types & ime()) != 0) { statsToken = ImeTracker.forLogging().onRequestShow(null /* component */, statsToken = ImeTracker.get().onRequestShow(null /* component */, Process.myUid(), ImeTracker.ORIGIN_CLIENT_SHOW_SOFT_INPUT, SoftInputShowHideReason.SHOW_SOFT_INPUT_BY_INSETS_API); } Loading @@ -1058,9 +1006,6 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation } // Handle pending request ready in case there was one set. if (fromIme && mPendingImeControlRequest != null) { if ((types & Type.ime()) != 0) { ImeTracker.forLatency().onShown(statsToken, ActivityThread::currentApplication); } handlePendingControlRequest(statsToken); return; } Loading @@ -1083,7 +1028,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation "show ignored for type: %d animType: %d requestedVisible: %s", type, animationType, requestedVisible)); if (isImeAnimation) { ImeTracker.forLogging().onCancelled(statsToken, ImeTracker.get().onCancelled(statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION); } continue; Loading @@ -1091,21 +1036,16 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation if (fromIme && animationType == ANIMATION_TYPE_USER) { // App is already controlling the IME, don't cancel it. if (isImeAnimation) { ImeTracker.forLogging().onFailed( statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION); ImeTracker.get().onFailed(statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION); } continue; } if (isImeAnimation) { ImeTracker.forLogging().onProgress( statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION); } typesReady |= type; } if (DEBUG) Log.d(TAG, "show typesReady: " + typesReady); if (fromIme && (typesReady & Type.ime()) != 0) { ImeTracker.forLatency().onShown(statsToken, ActivityThread::currentApplication); } applyAnimation(typesReady, true /* show */, fromIme, statsToken); } Loading Loading @@ -1134,7 +1074,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation public void hide(@InsetsType int types) { ImeTracker.Token statsToken = null; if ((types & ime()) != 0) { statsToken = ImeTracker.forLogging().onRequestHide(null /* component */, statsToken = ImeTracker.get().onRequestHide(null /* component */, Process.myUid(), ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT, SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API); } Loading Loading @@ -1183,14 +1123,13 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation // no-op: already hidden or animating out (because window visibility is // applied before starting animation). if (isImeAnimation) { ImeTracker.forLogging().onCancelled(statsToken, ImeTracker.get().onCancelled(statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION); } continue; } if (isImeAnimation) { ImeTracker.forLogging().onProgress( statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION); } typesReady |= type; } Loading Loading @@ -1262,19 +1201,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation @AnimationType int animationType, @LayoutInsetsDuringAnimation int layoutInsetsDuringAnimation, boolean useInsetsAnimationThread, @Nullable ImeTracker.Token statsToken) { ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_CONTROL_ANIMATION); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_CONTROL_ANIMATION); if ((types & mTypesBeingCancelled) != 0) { final boolean monitoredAnimation = animationType == ANIMATION_TYPE_SHOW || animationType == ANIMATION_TYPE_HIDE; if (monitoredAnimation && (types & Type.ime()) != 0) { if (animationType == ANIMATION_TYPE_SHOW) { ImeTracker.forLatency().onShowCancelled(statsToken, PHASE_CLIENT_ANIMATION_CANCEL, ActivityThread::currentApplication); } else { ImeTracker.forLatency().onHideCancelled(statsToken, PHASE_CLIENT_ANIMATION_CANCEL, ActivityThread::currentApplication); } } throw new IllegalStateException("Cannot start a new insets animation of " + Type.toString(types) + " while an existing " + Type.toString(mTypesBeingCancelled) Loading @@ -1286,7 +1214,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation types &= ~mDisabledUserAnimationInsetsTypes; if ((disabledTypes & ime()) != 0) { ImeTracker.forLogging().onFailed(statsToken, ImeTracker.get().onFailed(statsToken, ImeTracker.PHASE_CLIENT_DISABLED_USER_ANIMATION); if (fromIme && !mState.getSource(mImeSourceConsumer.getId()).isVisible()) { Loading @@ -1307,8 +1235,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation Trace.asyncTraceEnd(TRACE_TAG_VIEW, "IC.showRequestFromApiToImeReady", 0); return; } ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_DISABLED_USER_ANIMATION); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_DISABLED_USER_ANIMATION); if (DEBUG) Log.d(TAG, "controlAnimation types: " + types); mLastStartedAnimTypes |= types; Loading Loading @@ -1375,11 +1302,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation if ((typesReady & WindowInsets.Type.ime()) != 0) { ImeTracing.getInstance().triggerClientDump("InsetsAnimationControlImpl", mHost.getInputMethodManager(), null /* icProto */); if (animationType == ANIMATION_TYPE_HIDE) { ImeTracker.forLatency().onHidden(statsToken, ActivityThread::currentApplication); } } ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_ANIMATION_RUNNING); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_ANIMATION_RUNNING); mRunningAnimations.add(new RunningAnimation(runner, animationType)); if (DEBUG) Log.d(TAG, "Animation added to runner. useInsetsAnimationThread: " + useInsetsAnimationThread); Loading Loading @@ -1419,8 +1343,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation private Pair<Integer, Boolean> collectSourceControls(boolean fromIme, @InsetsType int types, SparseArray<InsetsSourceControl> controls, @AnimationType int animationType, @Nullable ImeTracker.Token statsToken) { ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_COLLECT_SOURCE_CONTROLS); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_COLLECT_SOURCE_CONTROLS); int typesReady = 0; boolean imeReady = true; Loading Loading @@ -1523,13 +1446,13 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation } final ImeTracker.Token statsToken = runner.getStatsToken(); if (shown) { ImeTracker.forLogging().onProgress(statsToken, ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_ANIMATION_FINISHED_SHOW); ImeTracker.forLogging().onShown(statsToken); ImeTracker.get().onShown(statsToken); } else { ImeTracker.forLogging().onProgress(statsToken, ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_ANIMATION_FINISHED_HIDE); ImeTracker.forLogging().onHidden(statsToken); ImeTracker.get().onHidden(statsToken); } reportRequestedVisibleTypes(); } Loading @@ -1555,13 +1478,13 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation private void cancelAnimation(InsetsAnimationControlRunner control, boolean invokeCallback) { if (invokeCallback) { ImeTracker.forLogging().onCancelled(control.getStatsToken(), PHASE_CLIENT_ANIMATION_CANCEL); ImeTracker.get().onCancelled(control.getStatsToken(), ImeTracker.PHASE_CLIENT_ANIMATION_CANCEL); control.cancel(); } else { // Succeeds if invokeCallback is false (i.e. when called from notifyFinished). ImeTracker.forLogging().onProgress(control.getStatsToken(), PHASE_CLIENT_ANIMATION_CANCEL); ImeTracker.get().onProgress(control.getStatsToken(), ImeTracker.PHASE_CLIENT_ANIMATION_CANCEL); } if (DEBUG) { Log.d(TAG, TextUtils.formatSimple( Loading Loading @@ -1726,7 +1649,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation final InternalAnimationControlListener listener = new InternalAnimationControlListener( show, hasAnimationCallbacks, types, mHost.getSystemBarsBehavior(), skipAnim || mAnimationsDisabled, mHost.dipToPx(FLOATING_IME_BOTTOM_INSET_DP), mLoggingListener, mJankContext); mLoggingListener); // We are about to playing the default animation (show/hide). Passing a null frame indicates // the controlled types should be animated regardless of the frame. Loading core/java/android/view/ViewRootImpl.java +6 −6 Original line number Diff line number Diff line Loading @@ -5765,7 +5765,7 @@ public final class ViewRootImpl implements ViewParent, } case MSG_SHOW_INSETS: { final ImeTracker.Token statsToken = (ImeTracker.Token) msg.obj; ImeTracker.forLogging().onProgress(statsToken, ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_HANDLE_SHOW_INSETS); if (mView == null) { Log.e(TAG, Loading @@ -5778,7 +5778,7 @@ public final class ViewRootImpl implements ViewParent, } case MSG_HIDE_INSETS: { final ImeTracker.Token statsToken = (ImeTracker.Token) msg.obj; ImeTracker.forLogging().onProgress(statsToken, ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_HANDLE_HIDE_INSETS); mInsetsController.hide(msg.arg1, msg.arg2 == 1, statsToken); break; Loading Loading @@ -10325,10 +10325,10 @@ public final class ViewRootImpl implements ViewParent, null /* icProto */); } if (viewAncestor != null) { ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_SHOW_INSETS); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_SHOW_INSETS); viewAncestor.showInsets(types, fromIme, statsToken); } else { ImeTracker.forLogging().onFailed(statsToken, ImeTracker.PHASE_CLIENT_SHOW_INSETS); ImeTracker.get().onFailed(statsToken, ImeTracker.PHASE_CLIENT_SHOW_INSETS); } } Loading @@ -10342,10 +10342,10 @@ public final class ViewRootImpl implements ViewParent, null /* icProto */); } if (viewAncestor != null) { ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_HIDE_INSETS); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_HIDE_INSETS); viewAncestor.hideInsets(types, fromIme, statsToken); } else { ImeTracker.forLogging().onFailed(statsToken, ImeTracker.PHASE_CLIENT_HIDE_INSETS); ImeTracker.get().onFailed(statsToken, ImeTracker.PHASE_CLIENT_HIDE_INSETS); } } Loading Loading
core/java/android/inputmethodservice/IInputMethodWrapper.java +6 −10 Original line number Diff line number Diff line Loading @@ -223,13 +223,11 @@ class IInputMethodWrapper extends IInputMethod.Stub final SomeArgs args = (SomeArgs) msg.obj; final ImeTracker.Token statsToken = (ImeTracker.Token) args.arg3; if (isValid(inputMethod, target, "DO_SHOW_SOFT_INPUT")) { ImeTracker.forLogging().onProgress( statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH); inputMethod.showSoftInputWithToken( msg.arg1, (ResultReceiver) args.arg2, (IBinder) args.arg1, statsToken); } else { ImeTracker.forLogging().onFailed( statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH); ImeTracker.get().onFailed(statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH); } args.recycle(); return; Loading @@ -238,13 +236,11 @@ class IInputMethodWrapper extends IInputMethod.Stub final SomeArgs args = (SomeArgs) msg.obj; final ImeTracker.Token statsToken = (ImeTracker.Token) args.arg3; if (isValid(inputMethod, target, "DO_HIDE_SOFT_INPUT")) { ImeTracker.forLogging().onProgress( statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH); inputMethod.hideSoftInputWithToken(msg.arg1, (ResultReceiver) args.arg2, (IBinder) args.arg1, statsToken); } else { ImeTracker.forLogging().onFailed( statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH); ImeTracker.get().onFailed(statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH); } args.recycle(); return; Loading Loading @@ -432,7 +428,7 @@ class IInputMethodWrapper extends IInputMethod.Stub @Override public void showSoftInput(IBinder showInputToken, @Nullable ImeTracker.Token statsToken, int flags, ResultReceiver resultReceiver) { ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER); mCaller.executeOrSendMessage(mCaller.obtainMessageIOOO(DO_SHOW_SOFT_INPUT, flags, showInputToken, resultReceiver, statsToken)); } Loading @@ -441,7 +437,7 @@ class IInputMethodWrapper extends IInputMethod.Stub @Override public void hideSoftInput(IBinder hideInputToken, @Nullable ImeTracker.Token statsToken, int flags, ResultReceiver resultReceiver) { ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER); mCaller.executeOrSendMessage(mCaller.obtainMessageIOOO(DO_HIDE_SOFT_INPUT, flags, hideInputToken, resultReceiver, statsToken)); } Loading
core/java/android/inputmethodservice/InputMethodService.java +5 −7 Original line number Diff line number Diff line Loading @@ -896,8 +896,7 @@ public class InputMethodService extends AbstractInputMethodService { @MainThread @Override public void hideSoftInput(int flags, ResultReceiver resultReceiver) { ImeTracker.forLogging().onProgress( mCurStatsToken, ImeTracker.PHASE_IME_HIDE_SOFT_INPUT); ImeTracker.get().onProgress(mCurStatsToken, ImeTracker.PHASE_IME_HIDE_SOFT_INPUT); if (DEBUG) Log.v(TAG, "hideSoftInput()"); if (getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.R && !mSystemCallingHideSoftInput) { Loading Loading @@ -951,8 +950,7 @@ public class InputMethodService extends AbstractInputMethodService { @MainThread @Override public void showSoftInput(int flags, ResultReceiver resultReceiver) { ImeTracker.forLogging().onProgress( mCurStatsToken, ImeTracker.PHASE_IME_SHOW_SOFT_INPUT); ImeTracker.get().onProgress(mCurStatsToken, ImeTracker.PHASE_IME_SHOW_SOFT_INPUT); if (DEBUG) Log.v(TAG, "showSoftInput()"); // TODO(b/148086656): Disallow IME developers from calling InputMethodImpl methods. if (getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.R Loading @@ -968,11 +966,11 @@ public class InputMethodService extends AbstractInputMethodService { null /* icProto */); final boolean wasVisible = isInputViewShown(); if (dispatchOnShowInputRequested(flags, false)) { ImeTracker.forLogging().onProgress(mCurStatsToken, ImeTracker.get().onProgress(mCurStatsToken, ImeTracker.PHASE_IME_ON_SHOW_SOFT_INPUT_TRUE); showWindow(true); } else { ImeTracker.forLogging().onFailed(mCurStatsToken, ImeTracker.get().onFailed(mCurStatsToken, ImeTracker.PHASE_IME_ON_SHOW_SOFT_INPUT_TRUE); } setImeWindowStatus(mapToImeWindowStatus(), mBackDisposition); Loading Loading @@ -2981,7 +2979,7 @@ public class InputMethodService extends AbstractInputMethodService { ImeTracing.getInstance().triggerServiceDump( "InputMethodService#applyVisibilityInInsetsConsumerIfNecessary", mDumper, null /* icProto */); ImeTracker.forLogging().onProgress(mCurStatsToken, ImeTracker.get().onProgress(mCurStatsToken, ImeTracker.PHASE_IME_APPLY_VISIBILITY_INSETS_CONSUMER); mPrivOps.applyImeVisibilityAsync(setVisible ? mCurShowInputToken : mCurHideInputToken, setVisible, mCurStatsToken); Loading
core/java/android/view/ImeInsetsSourceConsumer.java +3 −4 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer { // TODO: ResultReceiver for IME. // TODO: Set mShowOnNextImeRender to automatically show IME and guard it with a flag. ImeTracker.forLogging().onProgress(statsToken, ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_INSETS_CONSUMER_REQUEST_SHOW); if (getControl() == null) { Loading Loading @@ -164,13 +164,12 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer { // - we do already have one, but we have control and use the passed in token // for the insets animation already. if (statsToken == null || getControl() != null) { statsToken = ImeTracker.forLogging().onRequestHide(null /* component */, Process.myUid(), statsToken = ImeTracker.get().onRequestHide(null /* component */, Process.myUid(), ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT, SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API); } ImeTracker.forLogging().onProgress(statsToken, ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_INSETS_CONSUMER_NOTIFY_HIDDEN); getImm().notifyImeHidden(mController.getHost().getWindowToken(), statsToken); Loading
core/java/android/view/InsetsController.java +24 −101 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ import static android.view.WindowInsets.Type.FIRST; import static android.view.WindowInsets.Type.LAST; import static android.view.WindowInsets.Type.all; import static android.view.WindowInsets.Type.ime; import static android.view.inputmethod.ImeTracker.PHASE_CLIENT_ANIMATION_CANCEL; import android.animation.AnimationHandler; import android.animation.Animator; Loading @@ -36,8 +35,6 @@ import android.animation.ValueAnimator; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.app.ActivityThread; import android.content.Context; import android.content.res.CompatibilityInfo; import android.graphics.Insets; import android.graphics.Rect; Loading @@ -63,7 +60,6 @@ import android.view.animation.Interpolator; import android.view.animation.LinearInterpolator; import android.view.animation.PathInterpolator; import android.view.inputmethod.ImeTracker; import android.view.inputmethod.ImeTracker.InputMethodJankContext; import android.view.inputmethod.InputMethodManager; import com.android.internal.annotations.VisibleForTesting; Loading Loading @@ -190,14 +186,6 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation @Nullable String getRootViewTitle(); /** * @return the context related to the rootView. */ @Nullable default Context getRootViewContext() { return null; } /** @see ViewRootImpl#dipToPx */ int dipToPx(int dips); Loading Loading @@ -318,7 +306,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation @Retention(RetentionPolicy.SOURCE) @IntDef(value = {ANIMATION_TYPE_NONE, ANIMATION_TYPE_SHOW, ANIMATION_TYPE_HIDE, ANIMATION_TYPE_USER, ANIMATION_TYPE_RESIZE}) public @interface AnimationType { @interface AnimationType { } /** Loading @@ -333,27 +321,6 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation /** Logging listener. */ private WindowInsetsAnimationControlListener mLoggingListener; /** Context for {@link android.view.inputmethod.ImeTracker.ImeJankTracker} to monitor jank. */ private final InputMethodJankContext mJankContext = new InputMethodJankContext() { @Override public Context getDisplayContext() { return mHost != null ? mHost.getRootViewContext() : null; } @Override public SurfaceControl getTargetSurfaceControl() { final InsetsSourceConsumer imeSourceConsumer = mSourceConsumers.get(ITYPE_IME); final InsetsSourceControl imeSourceControl = imeSourceConsumer != null ? imeSourceConsumer.getControl() : null; return imeSourceControl != null ? imeSourceControl.getLeash() : null; } @Override public String getHostPackageName() { return mHost != null ? mHost.getRootViewContext().getPackageName() : null; } }; /** * The default implementation of listener, to be used by InsetsController and InsetsPolicy to * animate insets. Loading @@ -371,7 +338,6 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation private final boolean mDisable; private final int mFloatingImeBottomInset; private final WindowInsetsAnimationControlListener mLoggingListener; private final InputMethodJankContext mInputMethodJankContext; private final ThreadLocal<AnimationHandler> mSfAnimationHandlerThreadLocal = new ThreadLocal<AnimationHandler>() { Loading @@ -385,8 +351,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation public InternalAnimationControlListener(boolean show, boolean hasAnimationCallbacks, @InsetsType int requestedTypes, @Behavior int behavior, boolean disable, int floatingImeBottomInset, WindowInsetsAnimationControlListener loggingListener, @Nullable InputMethodJankContext jankContext) { int floatingImeBottomInset, WindowInsetsAnimationControlListener loggingListener) { mShow = show; mHasAnimationCallbacks = hasAnimationCallbacks; mRequestedTypes = requestedTypes; Loading @@ -395,7 +360,6 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation mDisable = disable; mFloatingImeBottomInset = floatingImeBottomInset; mLoggingListener = loggingListener; mInputMethodJankContext = jankContext; } @Override Loading Loading @@ -442,26 +406,10 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation + insetsFraction); }); mAnimator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { if (mInputMethodJankContext == null) return; ImeTracker.forJank().onRequestAnimation( mInputMethodJankContext, mShow ? ANIMATION_TYPE_SHOW : ANIMATION_TYPE_HIDE, !mHasAnimationCallbacks); } @Override public void onAnimationCancel(Animator animation) { if (mInputMethodJankContext == null) return; ImeTracker.forJank().onCancelAnimation(); } @Override public void onAnimationEnd(Animator animation) { onAnimationFinish(); if (mInputMethodJankContext == null) return; ImeTracker.forJank().onFinishAnimation(); } }); if (!mHasAnimationCallbacks) { Loading Loading @@ -925,7 +873,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation /** * @see InsetsState#calculateInsets(Rect, InsetsState, boolean, boolean, int, int, int, int, * int, android.util.SparseIntArray) * int, SparseIntArray) */ @VisibleForTesting public WindowInsets calculateInsets(boolean isScreenRound, boolean alwaysConsumeSystemBars, Loading Loading @@ -1033,7 +981,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation public void show(@InsetsType int types) { ImeTracker.Token statsToken = null; if ((types & ime()) != 0) { statsToken = ImeTracker.forLogging().onRequestShow(null /* component */, statsToken = ImeTracker.get().onRequestShow(null /* component */, Process.myUid(), ImeTracker.ORIGIN_CLIENT_SHOW_SOFT_INPUT, SoftInputShowHideReason.SHOW_SOFT_INPUT_BY_INSETS_API); } Loading @@ -1058,9 +1006,6 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation } // Handle pending request ready in case there was one set. if (fromIme && mPendingImeControlRequest != null) { if ((types & Type.ime()) != 0) { ImeTracker.forLatency().onShown(statsToken, ActivityThread::currentApplication); } handlePendingControlRequest(statsToken); return; } Loading @@ -1083,7 +1028,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation "show ignored for type: %d animType: %d requestedVisible: %s", type, animationType, requestedVisible)); if (isImeAnimation) { ImeTracker.forLogging().onCancelled(statsToken, ImeTracker.get().onCancelled(statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION); } continue; Loading @@ -1091,21 +1036,16 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation if (fromIme && animationType == ANIMATION_TYPE_USER) { // App is already controlling the IME, don't cancel it. if (isImeAnimation) { ImeTracker.forLogging().onFailed( statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION); ImeTracker.get().onFailed(statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION); } continue; } if (isImeAnimation) { ImeTracker.forLogging().onProgress( statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION); } typesReady |= type; } if (DEBUG) Log.d(TAG, "show typesReady: " + typesReady); if (fromIme && (typesReady & Type.ime()) != 0) { ImeTracker.forLatency().onShown(statsToken, ActivityThread::currentApplication); } applyAnimation(typesReady, true /* show */, fromIme, statsToken); } Loading Loading @@ -1134,7 +1074,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation public void hide(@InsetsType int types) { ImeTracker.Token statsToken = null; if ((types & ime()) != 0) { statsToken = ImeTracker.forLogging().onRequestHide(null /* component */, statsToken = ImeTracker.get().onRequestHide(null /* component */, Process.myUid(), ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT, SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API); } Loading Loading @@ -1183,14 +1123,13 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation // no-op: already hidden or animating out (because window visibility is // applied before starting animation). if (isImeAnimation) { ImeTracker.forLogging().onCancelled(statsToken, ImeTracker.get().onCancelled(statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION); } continue; } if (isImeAnimation) { ImeTracker.forLogging().onProgress( statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION); } typesReady |= type; } Loading Loading @@ -1262,19 +1201,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation @AnimationType int animationType, @LayoutInsetsDuringAnimation int layoutInsetsDuringAnimation, boolean useInsetsAnimationThread, @Nullable ImeTracker.Token statsToken) { ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_CONTROL_ANIMATION); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_CONTROL_ANIMATION); if ((types & mTypesBeingCancelled) != 0) { final boolean monitoredAnimation = animationType == ANIMATION_TYPE_SHOW || animationType == ANIMATION_TYPE_HIDE; if (monitoredAnimation && (types & Type.ime()) != 0) { if (animationType == ANIMATION_TYPE_SHOW) { ImeTracker.forLatency().onShowCancelled(statsToken, PHASE_CLIENT_ANIMATION_CANCEL, ActivityThread::currentApplication); } else { ImeTracker.forLatency().onHideCancelled(statsToken, PHASE_CLIENT_ANIMATION_CANCEL, ActivityThread::currentApplication); } } throw new IllegalStateException("Cannot start a new insets animation of " + Type.toString(types) + " while an existing " + Type.toString(mTypesBeingCancelled) Loading @@ -1286,7 +1214,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation types &= ~mDisabledUserAnimationInsetsTypes; if ((disabledTypes & ime()) != 0) { ImeTracker.forLogging().onFailed(statsToken, ImeTracker.get().onFailed(statsToken, ImeTracker.PHASE_CLIENT_DISABLED_USER_ANIMATION); if (fromIme && !mState.getSource(mImeSourceConsumer.getId()).isVisible()) { Loading @@ -1307,8 +1235,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation Trace.asyncTraceEnd(TRACE_TAG_VIEW, "IC.showRequestFromApiToImeReady", 0); return; } ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_DISABLED_USER_ANIMATION); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_DISABLED_USER_ANIMATION); if (DEBUG) Log.d(TAG, "controlAnimation types: " + types); mLastStartedAnimTypes |= types; Loading Loading @@ -1375,11 +1302,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation if ((typesReady & WindowInsets.Type.ime()) != 0) { ImeTracing.getInstance().triggerClientDump("InsetsAnimationControlImpl", mHost.getInputMethodManager(), null /* icProto */); if (animationType == ANIMATION_TYPE_HIDE) { ImeTracker.forLatency().onHidden(statsToken, ActivityThread::currentApplication); } } ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_ANIMATION_RUNNING); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_ANIMATION_RUNNING); mRunningAnimations.add(new RunningAnimation(runner, animationType)); if (DEBUG) Log.d(TAG, "Animation added to runner. useInsetsAnimationThread: " + useInsetsAnimationThread); Loading Loading @@ -1419,8 +1343,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation private Pair<Integer, Boolean> collectSourceControls(boolean fromIme, @InsetsType int types, SparseArray<InsetsSourceControl> controls, @AnimationType int animationType, @Nullable ImeTracker.Token statsToken) { ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_COLLECT_SOURCE_CONTROLS); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_COLLECT_SOURCE_CONTROLS); int typesReady = 0; boolean imeReady = true; Loading Loading @@ -1523,13 +1446,13 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation } final ImeTracker.Token statsToken = runner.getStatsToken(); if (shown) { ImeTracker.forLogging().onProgress(statsToken, ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_ANIMATION_FINISHED_SHOW); ImeTracker.forLogging().onShown(statsToken); ImeTracker.get().onShown(statsToken); } else { ImeTracker.forLogging().onProgress(statsToken, ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_ANIMATION_FINISHED_HIDE); ImeTracker.forLogging().onHidden(statsToken); ImeTracker.get().onHidden(statsToken); } reportRequestedVisibleTypes(); } Loading @@ -1555,13 +1478,13 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation private void cancelAnimation(InsetsAnimationControlRunner control, boolean invokeCallback) { if (invokeCallback) { ImeTracker.forLogging().onCancelled(control.getStatsToken(), PHASE_CLIENT_ANIMATION_CANCEL); ImeTracker.get().onCancelled(control.getStatsToken(), ImeTracker.PHASE_CLIENT_ANIMATION_CANCEL); control.cancel(); } else { // Succeeds if invokeCallback is false (i.e. when called from notifyFinished). ImeTracker.forLogging().onProgress(control.getStatsToken(), PHASE_CLIENT_ANIMATION_CANCEL); ImeTracker.get().onProgress(control.getStatsToken(), ImeTracker.PHASE_CLIENT_ANIMATION_CANCEL); } if (DEBUG) { Log.d(TAG, TextUtils.formatSimple( Loading Loading @@ -1726,7 +1649,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation final InternalAnimationControlListener listener = new InternalAnimationControlListener( show, hasAnimationCallbacks, types, mHost.getSystemBarsBehavior(), skipAnim || mAnimationsDisabled, mHost.dipToPx(FLOATING_IME_BOTTOM_INSET_DP), mLoggingListener, mJankContext); mLoggingListener); // We are about to playing the default animation (show/hide). Passing a null frame indicates // the controlled types should be animated regardless of the frame. Loading
core/java/android/view/ViewRootImpl.java +6 −6 Original line number Diff line number Diff line Loading @@ -5765,7 +5765,7 @@ public final class ViewRootImpl implements ViewParent, } case MSG_SHOW_INSETS: { final ImeTracker.Token statsToken = (ImeTracker.Token) msg.obj; ImeTracker.forLogging().onProgress(statsToken, ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_HANDLE_SHOW_INSETS); if (mView == null) { Log.e(TAG, Loading @@ -5778,7 +5778,7 @@ public final class ViewRootImpl implements ViewParent, } case MSG_HIDE_INSETS: { final ImeTracker.Token statsToken = (ImeTracker.Token) msg.obj; ImeTracker.forLogging().onProgress(statsToken, ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_HANDLE_HIDE_INSETS); mInsetsController.hide(msg.arg1, msg.arg2 == 1, statsToken); break; Loading Loading @@ -10325,10 +10325,10 @@ public final class ViewRootImpl implements ViewParent, null /* icProto */); } if (viewAncestor != null) { ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_SHOW_INSETS); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_SHOW_INSETS); viewAncestor.showInsets(types, fromIme, statsToken); } else { ImeTracker.forLogging().onFailed(statsToken, ImeTracker.PHASE_CLIENT_SHOW_INSETS); ImeTracker.get().onFailed(statsToken, ImeTracker.PHASE_CLIENT_SHOW_INSETS); } } Loading @@ -10342,10 +10342,10 @@ public final class ViewRootImpl implements ViewParent, null /* icProto */); } if (viewAncestor != null) { ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_HIDE_INSETS); ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_HIDE_INSETS); viewAncestor.hideInsets(types, fromIme, statsToken); } else { ImeTracker.forLogging().onFailed(statsToken, ImeTracker.PHASE_CLIENT_HIDE_INSETS); ImeTracker.get().onFailed(statsToken, ImeTracker.PHASE_CLIENT_HIDE_INSETS); } } Loading