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

Commit a46dbf38 authored by Felix Stern's avatar Felix Stern
Browse files

Adding more protologs to find the reason why we cancel the statsToken too early

Bug: 353463205
Test: None, logs only
Flag: android.view.inputmethod.refactor_insets_controller
Change-Id: Ia72b2053a8da1a1633bbd11d6fe7546e8628a0ad
parent 95f5091d
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider {
                // If the server visibility didn't change (still visible), and mGivenInsetsReady
                // is set, we won't call into notifyControlChanged. Therefore, we can reset the
                // statsToken, if available.
                ProtoLog.d(WM_DEBUG_IME, "onPostLayout cancel statsToken, ws=%s", ws);
                ImeTracker.forLogging().onCancelled(mStatsToken,
                        ImeTracker.PHASE_WM_POST_LAYOUT_NOTIFY_CONTROLS_CHANGED);
                mStatsToken = null;
@@ -174,11 +175,15 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider {
        if (android.view.inputmethod.Flags.refactorInsetsController()) {
            if (control != null && control.getLeash() != null) {
                ImeTracker.Token statsToken = getAndClearStatsToken();
                if (statsToken == null) {
                    ProtoLog.d(WM_DEBUG_IME, "IME getControl without statsToken");
                } else {
                    ImeTracker.forLogging().onProgress(statsToken,
                            ImeTracker.PHASE_WM_GET_CONTROL_WITH_LEASH);
                    control.setImeStatsToken(statsToken);
                }
            }
        }
        return control;
    }