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

Commit 88f05345 authored by Todd Lee's avatar Todd Lee
Browse files

Add logging to track transition deferral/continuation

Test: presubmits
Bug: b/409417764
Flag: NONE exempt logging
Change-Id: Ib1a380670cbf6ed6c7050c362ca1cae131175232
parent 1a6e52d3
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@ import android.graphics.Rect;
import android.hardware.HardwareBuffer;
import android.os.Binder;
import android.os.Bundle;
import android.os.Debug;
import android.os.IBinder;
import android.os.IRemoteCallback;
import android.os.Looper;
@@ -3861,6 +3862,11 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
     */
    void deferTransitionReady() {
        ++mReadyTrackerOld.mDeferReadyDepth;

        ProtoLog.v(WmProtoLogGroups.WM_DEBUG_WINDOW_TRANSITIONS_MIN,
                "deferTransitionReady deferReadyDepth=%d stack=%s",
                mReadyTrackerOld.mDeferReadyDepth, Debug.getCallers(5));

        // Make sure it wait until #continueTransitionReady() is called.
        mSyncEngine.setReady(mSyncId, false);
    }
@@ -3868,6 +3874,11 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
    /** This undoes one call to {@link #deferTransitionReady}. */
    void continueTransitionReady() {
        --mReadyTrackerOld.mDeferReadyDepth;

        ProtoLog.v(WmProtoLogGroups.WM_DEBUG_WINDOW_TRANSITIONS_MIN,
                "continueTransitionReady deferReadyDepth=%d stack=%s",
                mReadyTrackerOld.mDeferReadyDepth, Debug.getCallers(5));

        // Apply ready in case it is waiting for the previous defer call.
        applyReady();
    }