Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96a43d64 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Instrument latency and jank for IME"

parents a68dbada f6862470
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -223,11 +223,13 @@ 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.get().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH);
                    ImeTracker.forLogging().onProgress(
                            statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH);
                    inputMethod.showSoftInputWithToken(
                            msg.arg1, (ResultReceiver) args.arg2, (IBinder) args.arg1, statsToken);
                } else {
                    ImeTracker.get().onFailed(statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH);
                    ImeTracker.forLogging().onFailed(
                            statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH);
                }
                args.recycle();
                return;
@@ -236,11 +238,13 @@ 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.get().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH);
                    ImeTracker.forLogging().onProgress(
                            statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH);
                    inputMethod.hideSoftInputWithToken(msg.arg1, (ResultReceiver) args.arg2,
                            (IBinder) args.arg1, statsToken);
                } else {
                    ImeTracker.get().onFailed(statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH);
                    ImeTracker.forLogging().onFailed(
                            statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH);
                }
                args.recycle();
                return;
@@ -428,7 +432,7 @@ class IInputMethodWrapper extends IInputMethod.Stub
    @Override
    public void showSoftInput(IBinder showInputToken, @Nullable ImeTracker.Token statsToken,
            int flags, ResultReceiver resultReceiver) {
        ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER);
        ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER);
        mCaller.executeOrSendMessage(mCaller.obtainMessageIOOO(DO_SHOW_SOFT_INPUT,
                flags, showInputToken, resultReceiver, statsToken));
    }
@@ -437,7 +441,7 @@ class IInputMethodWrapper extends IInputMethod.Stub
    @Override
    public void hideSoftInput(IBinder hideInputToken, @Nullable ImeTracker.Token statsToken,
            int flags, ResultReceiver resultReceiver) {
        ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER);
        ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER);
        mCaller.executeOrSendMessage(mCaller.obtainMessageIOOO(DO_HIDE_SOFT_INPUT,
                flags, hideInputToken, resultReceiver, statsToken));
    }
+7 −5
Original line number Diff line number Diff line
@@ -896,7 +896,8 @@ public class InputMethodService extends AbstractInputMethodService {
        @MainThread
        @Override
        public void hideSoftInput(int flags, ResultReceiver resultReceiver) {
            ImeTracker.get().onProgress(mCurStatsToken, ImeTracker.PHASE_IME_HIDE_SOFT_INPUT);
            ImeTracker.forLogging().onProgress(
                    mCurStatsToken, ImeTracker.PHASE_IME_HIDE_SOFT_INPUT);
            if (DEBUG) Log.v(TAG, "hideSoftInput()");
            if (getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.R
                    && !mSystemCallingHideSoftInput) {
@@ -950,7 +951,8 @@ public class InputMethodService extends AbstractInputMethodService {
        @MainThread
        @Override
        public void showSoftInput(int flags, ResultReceiver resultReceiver) {
            ImeTracker.get().onProgress(mCurStatsToken, ImeTracker.PHASE_IME_SHOW_SOFT_INPUT);
            ImeTracker.forLogging().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
@@ -966,11 +968,11 @@ public class InputMethodService extends AbstractInputMethodService {
                    null /* icProto */);
            final boolean wasVisible = isInputViewShown();
            if (dispatchOnShowInputRequested(flags, false)) {
                ImeTracker.get().onProgress(mCurStatsToken,
                ImeTracker.forLogging().onProgress(mCurStatsToken,
                        ImeTracker.PHASE_IME_ON_SHOW_SOFT_INPUT_TRUE);
                showWindow(true);
            } else {
                ImeTracker.get().onFailed(mCurStatsToken,
                ImeTracker.forLogging().onFailed(mCurStatsToken,
                        ImeTracker.PHASE_IME_ON_SHOW_SOFT_INPUT_TRUE);
            }
            setImeWindowStatus(mapToImeWindowStatus(), mBackDisposition);
@@ -2979,7 +2981,7 @@ public class InputMethodService extends AbstractInputMethodService {
        ImeTracing.getInstance().triggerServiceDump(
                "InputMethodService#applyVisibilityInInsetsConsumerIfNecessary", mDumper,
                null /* icProto */);
        ImeTracker.get().onProgress(mCurStatsToken,
        ImeTracker.forLogging().onProgress(mCurStatsToken,
                ImeTracker.PHASE_IME_APPLY_VISIBILITY_INSETS_CONSUMER);
        mPrivOps.applyImeVisibilityAsync(setVisible
                ? mCurShowInputToken : mCurHideInputToken, setVisible, mCurStatsToken);
+4 −3
Original line number Diff line number Diff line
@@ -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.get().onProgress(statsToken,
        ImeTracker.forLogging().onProgress(statsToken,
                ImeTracker.PHASE_CLIENT_INSETS_CONSUMER_REQUEST_SHOW);

        if (getControl() == null) {
@@ -165,12 +165,13 @@ 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.get().onRequestHide(null /* component */, Process.myUid(),
            statsToken = ImeTracker.forLogging().onRequestHide(null /* component */,
                    Process.myUid(),
                    ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT,
                    SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API);
        }

        ImeTracker.get().onProgress(statsToken,
        ImeTracker.forLogging().onProgress(statsToken,
                ImeTracker.PHASE_CLIENT_INSETS_CONSUMER_NOTIFY_HIDDEN);

        getImm().notifyImeHidden(mController.getHost().getWindowToken(), statsToken);
+99 −24
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import static android.view.WindowInsets.Type.LAST;
import static android.view.WindowInsets.Type.all;
import static android.view.WindowInsets.Type.captionBar;
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;
@@ -35,6 +36,8 @@ 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;
@@ -59,6 +62,7 @@ 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;
@@ -185,6 +189,14 @@ 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);

@@ -308,7 +320,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})
    @interface AnimationType {
    public @interface AnimationType {
    }

    /**
@@ -323,6 +335,25 @@ 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 InsetsSourceControl imeSourceControl = getImeSourceConsumer().getControl();
            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.
@@ -340,6 +371,7 @@ 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>() {
@@ -353,7 +385,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation

        public InternalAnimationControlListener(boolean show, boolean hasAnimationCallbacks,
                @InsetsType int requestedTypes, @Behavior int behavior, boolean disable,
                int floatingImeBottomInset, WindowInsetsAnimationControlListener loggingListener) {
                int floatingImeBottomInset, WindowInsetsAnimationControlListener loggingListener,
                @Nullable InputMethodJankContext jankContext) {
            mShow = show;
            mHasAnimationCallbacks = hasAnimationCallbacks;
            mRequestedTypes = requestedTypes;
@@ -362,6 +395,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
            mDisable = disable;
            mFloatingImeBottomInset = floatingImeBottomInset;
            mLoggingListener = loggingListener;
            mInputMethodJankContext = jankContext;
        }

        @Override
@@ -408,10 +442,26 @@ 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) {
@@ -897,7 +947,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation

    /**
     * @see InsetsState#calculateInsets(Rect, InsetsState, boolean, boolean, int, int, int, int,
     *      int, SparseIntArray)
     *      int, android.util.SparseIntArray)
     */
    @VisibleForTesting
    public WindowInsets calculateInsets(boolean isScreenRound, boolean alwaysConsumeSystemBars,
@@ -1005,7 +1055,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
    public void show(@InsetsType int types) {
        ImeTracker.Token statsToken = null;
        if ((types & ime()) != 0) {
            statsToken = ImeTracker.get().onRequestShow(null /* component */,
            statsToken = ImeTracker.forLogging().onRequestShow(null /* component */,
                    Process.myUid(), ImeTracker.ORIGIN_CLIENT_SHOW_SOFT_INPUT,
                    SoftInputShowHideReason.SHOW_SOFT_INPUT_BY_INSETS_API);
        }
@@ -1030,6 +1080,9 @@ 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;
        }
@@ -1052,7 +1105,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
                        "show ignored for type: %d animType: %d requestedVisible: %s",
                        type, animationType, requestedVisible));
                if (isImeAnimation) {
                    ImeTracker.get().onCancelled(statsToken,
                    ImeTracker.forLogging().onCancelled(statsToken,
                            ImeTracker.PHASE_CLIENT_APPLY_ANIMATION);
                }
                continue;
@@ -1060,16 +1113,21 @@ 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.get().onFailed(statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION);
                    ImeTracker.forLogging().onFailed(
                            statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION);
                }
                continue;
            }
            if (isImeAnimation) {
                ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION);
                ImeTracker.forLogging().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);
    }

@@ -1098,7 +1156,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
    public void hide(@InsetsType int types) {
        ImeTracker.Token statsToken = null;
        if ((types & ime()) != 0) {
            statsToken = ImeTracker.get().onRequestHide(null /* component */,
            statsToken = ImeTracker.forLogging().onRequestHide(null /* component */,
                    Process.myUid(), ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT,
                    SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API);
        }
@@ -1147,13 +1205,14 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
                // no-op: already hidden or animating out (because window visibility is
                // applied before starting animation).
                if (isImeAnimation) {
                    ImeTracker.get().onCancelled(statsToken,
                    ImeTracker.forLogging().onCancelled(statsToken,
                            ImeTracker.PHASE_CLIENT_APPLY_ANIMATION);
                }
                continue;
            }
            if (isImeAnimation) {
                ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION);
                ImeTracker.forLogging().onProgress(
                        statsToken, ImeTracker.PHASE_CLIENT_APPLY_ANIMATION);
            }
            typesReady |= type;
        }
@@ -1225,8 +1284,19 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
            @AnimationType int animationType,
            @LayoutInsetsDuringAnimation int layoutInsetsDuringAnimation,
            boolean useInsetsAnimationThread, @Nullable ImeTracker.Token statsToken) {
        ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_CONTROL_ANIMATION);
        ImeTracker.forLogging().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)
@@ -1238,7 +1308,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
            types &= ~mDisabledUserAnimationInsetsTypes;

            if ((disabledTypes & ime()) != 0) {
                ImeTracker.get().onFailed(statsToken,
                ImeTracker.forLogging().onFailed(statsToken,
                        ImeTracker.PHASE_CLIENT_DISABLED_USER_ANIMATION);

                if (fromIme
@@ -1260,7 +1330,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
            Trace.asyncTraceEnd(TRACE_TAG_VIEW, "IC.showRequestFromApiToImeReady", 0);
            return;
        }
        ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_DISABLED_USER_ANIMATION);
        ImeTracker.forLogging().onProgress(statsToken,
                ImeTracker.PHASE_CLIENT_DISABLED_USER_ANIMATION);
        if (DEBUG) Log.d(TAG, "controlAnimation types: " + types);
        mLastStartedAnimTypes |= types;

@@ -1327,8 +1398,11 @@ 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.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_ANIMATION_RUNNING);
        ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_ANIMATION_RUNNING);
        mRunningAnimations.add(new RunningAnimation(runner, animationType));
        if (DEBUG) Log.d(TAG, "Animation added to runner. useInsetsAnimationThread: "
                + useInsetsAnimationThread);
@@ -1368,7 +1442,8 @@ 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.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_COLLECT_SOURCE_CONTROLS);
        ImeTracker.forLogging().onProgress(statsToken,
                ImeTracker.PHASE_CLIENT_COLLECT_SOURCE_CONTROLS);

        int typesReady = 0;
        boolean imeReady = true;
@@ -1471,13 +1546,13 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
        }
        final ImeTracker.Token statsToken = runner.getStatsToken();
        if (shown) {
            ImeTracker.get().onProgress(statsToken,
            ImeTracker.forLogging().onProgress(statsToken,
                    ImeTracker.PHASE_CLIENT_ANIMATION_FINISHED_SHOW);
            ImeTracker.get().onShown(statsToken);
            ImeTracker.forLogging().onShown(statsToken);
        } else {
            ImeTracker.get().onProgress(statsToken,
            ImeTracker.forLogging().onProgress(statsToken,
                    ImeTracker.PHASE_CLIENT_ANIMATION_FINISHED_HIDE);
            ImeTracker.get().onHidden(statsToken);
            ImeTracker.forLogging().onHidden(statsToken);
        }
        reportRequestedVisibleTypes();
    }
@@ -1503,13 +1578,13 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation

    private void cancelAnimation(InsetsAnimationControlRunner control, boolean invokeCallback) {
        if (invokeCallback) {
            ImeTracker.get().onCancelled(control.getStatsToken(),
                    ImeTracker.PHASE_CLIENT_ANIMATION_CANCEL);
            ImeTracker.forLogging().onCancelled(control.getStatsToken(),
                    PHASE_CLIENT_ANIMATION_CANCEL);
            control.cancel();
        } else {
            // Succeeds if invokeCallback is false (i.e. when called from notifyFinished).
            ImeTracker.get().onProgress(control.getStatsToken(),
                    ImeTracker.PHASE_CLIENT_ANIMATION_CANCEL);
            ImeTracker.forLogging().onProgress(control.getStatsToken(),
                    PHASE_CLIENT_ANIMATION_CANCEL);
        }
        if (DEBUG) {
            Log.d(TAG, TextUtils.formatSimple(
@@ -1674,7 +1749,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);
                mLoggingListener, mJankContext);

        // 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.
+6 −6
Original line number Diff line number Diff line
@@ -5815,7 +5815,7 @@ public final class ViewRootImpl implements ViewParent,
                }
                case MSG_SHOW_INSETS: {
                    final ImeTracker.Token statsToken = (ImeTracker.Token) msg.obj;
                    ImeTracker.get().onProgress(statsToken,
                    ImeTracker.forLogging().onProgress(statsToken,
                            ImeTracker.PHASE_CLIENT_HANDLE_SHOW_INSETS);
                    if (mView == null) {
                        Log.e(TAG,
@@ -5828,7 +5828,7 @@ public final class ViewRootImpl implements ViewParent,
                }
                case MSG_HIDE_INSETS: {
                    final ImeTracker.Token statsToken = (ImeTracker.Token) msg.obj;
                    ImeTracker.get().onProgress(statsToken,
                    ImeTracker.forLogging().onProgress(statsToken,
                            ImeTracker.PHASE_CLIENT_HANDLE_HIDE_INSETS);
                    mInsetsController.hide(msg.arg1, msg.arg2 == 1, statsToken);
                    break;
@@ -10407,10 +10407,10 @@ public final class ViewRootImpl implements ViewParent,
                        null /* icProto */);
            }
            if (viewAncestor != null) {
                ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_SHOW_INSETS);
                ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_SHOW_INSETS);
                viewAncestor.showInsets(types, fromIme, statsToken);
            } else {
                ImeTracker.get().onFailed(statsToken, ImeTracker.PHASE_CLIENT_SHOW_INSETS);
                ImeTracker.forLogging().onFailed(statsToken, ImeTracker.PHASE_CLIENT_SHOW_INSETS);
            }
        }

@@ -10424,10 +10424,10 @@ public final class ViewRootImpl implements ViewParent,
                        null /* icProto */);
            }
            if (viewAncestor != null) {
                ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_CLIENT_HIDE_INSETS);
                ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_HIDE_INSETS);
                viewAncestor.hideInsets(types, fromIme, statsToken);
            } else {
                ImeTracker.get().onFailed(statsToken, ImeTracker.PHASE_CLIENT_HIDE_INSETS);
                ImeTracker.forLogging().onFailed(statsToken, ImeTracker.PHASE_CLIENT_HIDE_INSETS);
            }
        }

Loading