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

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

Fix IME user animation statsToken creation

In [1] I introduced tracking for IME show/hide requests that are
controlled by the client (user animation type), and started creating
a statsToken in controlWindowInsetsAnimation, regardless of the given
types parameter.

This fixes the creation to only trigger when the types parameter
contains the `ime` inset type.

  [1]: I9ae3494c044aebdcb74365d8b23a20b4f426f9bd

Test: logcat while tapping on launcher google search
Bug: 328034080
Fix: 341336264
Change-Id: Ied6ae6700bb365dd190b803f58d34259efc08042
parent 6d223f0c
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1262,8 +1262,10 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
                    mHost.getInputMethodManager(), null /* icProto */);
        }

        final var statsToken = ImeTracker.forLogging().onStart(ImeTracker.TYPE_USER,
                ImeTracker.ORIGIN_CLIENT, SoftInputShowHideReason.CONTROL_WINDOW_INSETS_ANIMATION,
        final var statsToken = (types & ime()) == 0 ? null
                : ImeTracker.forLogging().onStart(ImeTracker.TYPE_USER,
                        ImeTracker.ORIGIN_CLIENT,
                        SoftInputShowHideReason.CONTROL_WINDOW_INSETS_ANIMATION,
                        mHost.isHandlingPointerEvent() /* fromUser */);
        controlAnimationUnchecked(types, cancellationSignal, listener, mFrame, fromIme, durationMs,
                interpolator, animationType,