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

Commit 5426b266 authored by Cosmin Băieș's avatar Cosmin Băieș Committed by Android (Google) Code Review
Browse files

Merge "Cancel pre-existing PHASE_WM_SHOW_IME_RUNNER" into main

parents 99dace73 02c3e3fe
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -180,7 +180,8 @@ public interface ImeTracker {
            PHASE_CLIENT_ANIMATION_RUNNING,
            PHASE_CLIENT_ANIMATION_CANCEL,
            PHASE_CLIENT_ANIMATION_FINISHED_SHOW,
            PHASE_CLIENT_ANIMATION_FINISHED_HIDE
            PHASE_CLIENT_ANIMATION_FINISHED_HIDE,
            PHASE_WM_ABORT_SHOW_IME_POST_LAYOUT,
    })
    @Retention(RetentionPolicy.SOURCE)
    @interface Phase {}
@@ -239,7 +240,7 @@ public interface ImeTracker {
    /** Applied the IME visibility. */
    int PHASE_SERVER_APPLY_IME_VISIBILITY = ImeProtoEnums.PHASE_SERVER_APPLY_IME_VISIBILITY;

    /** Created the show IME runner. */
    /** Started the show IME runner. */
    int PHASE_WM_SHOW_IME_RUNNER = ImeProtoEnums.PHASE_WM_SHOW_IME_RUNNER;

    /** Ready to show IME. */
@@ -318,6 +319,10 @@ public interface ImeTracker {
    /** Finished the IME window insets hide animation. */
    int PHASE_CLIENT_ANIMATION_FINISHED_HIDE = ImeProtoEnums.PHASE_CLIENT_ANIMATION_FINISHED_HIDE;

    /** Aborted the request to show the IME post layout. */
    int PHASE_WM_ABORT_SHOW_IME_POST_LAYOUT =
            ImeProtoEnums.PHASE_WM_ABORT_SHOW_IME_POST_LAYOUT;

    /**
     * Creates an IME show request tracking token.
     *
+4 −4
Original line number Diff line number Diff line
@@ -222,8 +222,8 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider {
            @Nullable ImeTracker.Token statsToken) {
        boolean targetChanged = isTargetChangedWithinActivity(imeTarget);
        mImeRequester = imeTarget;
        // There was still a stats token, so that request presumably failed.
        ImeTracker.forLogging().onFailed(
        // Cancel the pre-existing stats token, if any.
        ImeTracker.forLogging().onCancelled(
                mImeRequesterStatsToken, ImeTracker.PHASE_WM_SHOW_IME_RUNNER);
        mImeRequesterStatsToken = statsToken;
        if (targetChanged) {
@@ -300,8 +300,8 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider {
        mImeRequester = null;
        mIsImeLayoutDrawn = false;
        mShowImeRunner = null;
        ImeTracker.forLogging().onCancelled(
                mImeRequesterStatsToken, ImeTracker.PHASE_WM_SHOW_IME_RUNNER);
        ImeTracker.forLogging().onFailed(
                mImeRequesterStatsToken, ImeTracker.PHASE_WM_ABORT_SHOW_IME_POST_LAYOUT);
        mImeRequesterStatsToken = null;
    }