diff options
| author | 2023-10-17 11:37:29 +0200 | |
|---|---|---|
| committer | 2023-10-17 16:58:56 +0200 | |
| commit | 60e5c8e5bc6b0d0f4e095b7c618d38aefb63fc84 (patch) | |
| tree | 6bec7ecef71bc409c3bf835c9cc7aae9cd41ca6c | |
| parent | 641f6fabf797a54e036645f58e3bd8bef219b99c (diff) | |
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
| -rw-r--r-- | core/java/android/view/InsetsController.java | 6 | ||||
| -rw-r--r-- | core/java/android/view/inputmethod/ImeTracker.java | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/core/java/android/view/InsetsController.java b/core/java/android/view/InsetsController.java index fb24211e591a..90663c7ad38e 100644 --- a/core/java/android/view/InsetsController.java +++ b/core/java/android/view/InsetsController.java @@ -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; diff --git a/core/java/android/view/inputmethod/ImeTracker.java b/core/java/android/view/inputmethod/ImeTracker.java index f9d8b083ee9c..1bc735397115 100644 --- a/core/java/android/view/inputmethod/ImeTracker.java +++ b/core/java/android/view/inputmethod/ImeTracker.java @@ -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; |