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

Commit 60e5c8e5 authored by Cosmin Băieș's avatar Cosmin Băieș
Browse files

Deprecate ImeTracker phase disabled user animation

This removes the usage of and deprecates the
PHASE_CLIENT_DISABLED_USER_ANIMATION, as this is no longer valuable
(follows another phase without code branching off), since [1].

In parallel this also handles the code branch above using the
PHASE_CLIENT_CONTROL_ANIMATION to avoid a potential request timeout.

  [1]: I3210df9bcc087f5fba712e0e7ac4922475c3b88d

Test: n/a
Bug: 305899730
Change-Id: Ie20283a72ba463231c3fa5f54b7255057548c361
parent 641f6fab
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1283,7 +1283,6 @@ 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);
        if ((types & mTypesBeingCancelled) != 0) {
            final boolean monitoredAnimation =
                    animationType == ANIMATION_TYPE_SHOW || animationType == ANIMATION_TYPE_HIDE;
@@ -1295,12 +1294,15 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
                    ImeTracker.forLatency().onHideCancelled(statsToken,
                            PHASE_CLIENT_ANIMATION_CANCEL, ActivityThread::currentApplication);
                }
                ImeTracker.forLogging().onCancelled(statsToken,
                        ImeTracker.PHASE_CLIENT_CONTROL_ANIMATION);
            }
            throw new IllegalStateException("Cannot start a new insets animation of "
                    + Type.toString(types)
                    + " while an existing " + Type.toString(mTypesBeingCancelled)
                    + " is being cancelled.");
        }
        ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_CONTROL_ANIMATION);
        if (types == 0) {
            // nothing to animate.
            listener.onCancelled(null);
@@ -1309,8 +1311,6 @@ 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);
        if (DEBUG) Log.d(TAG, "controlAnimation types: " + types);
        mLastStartedAnimTypes |= types;

+0 −4
Original line number Diff line number Diff line
@@ -172,7 +172,6 @@ public interface ImeTracker {
            PHASE_CLIENT_HANDLE_HIDE_INSETS,
            PHASE_CLIENT_APPLY_ANIMATION,
            PHASE_CLIENT_CONTROL_ANIMATION,
            PHASE_CLIENT_DISABLED_USER_ANIMATION,
            PHASE_CLIENT_COLLECT_SOURCE_CONTROLS,
            PHASE_CLIENT_INSETS_CONSUMER_REQUEST_SHOW,
            PHASE_CLIENT_REQUEST_IME_SHOW,
@@ -292,9 +291,6 @@ public interface ImeTracker {
    /** Started the IME window insets show animation. */
    int PHASE_CLIENT_CONTROL_ANIMATION = ImeProtoEnums.PHASE_CLIENT_CONTROL_ANIMATION;

    /** Checked that the IME is controllable. */
    int PHASE_CLIENT_DISABLED_USER_ANIMATION = ImeProtoEnums.PHASE_CLIENT_DISABLED_USER_ANIMATION;

    /** Collecting insets source controls. */
    int PHASE_CLIENT_COLLECT_SOURCE_CONTROLS = ImeProtoEnums.PHASE_CLIENT_COLLECT_SOURCE_CONTROLS;