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

Commit 738f779b authored by Winson Chung's avatar Winson Chung
Browse files

Update callsites for leashes in a transition

- Helps clarify what the surfaces are in the registry when dumping

Bug: 266978825
Test: dumpsys activity service SystemUIService WMShell

Change-Id: Ifd34bb2977e1a8c1a1ef9fcaaaa3e3677ec35f9b
parent 00ce757d
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -549,6 +549,16 @@ public final class TransitionInfo implements Parcelable {
        }
        }
    }
    }


    /**
     * Updates the callsites of all the surfaces in this transition, which aids in the debugging of
     * lingering surfaces.
     */
    public void setUnreleasedWarningCallSiteForAllSurfaces(String callsite) {
        for (int i = mChanges.size() - 1; i >= 0; --i) {
            mChanges.get(i).getLeash().setUnreleasedWarningCallSite(callsite);
        }
    }

    /**
    /**
     * Makes a copy of this as if it were parcel'd and unparcel'd. This implies that surfacecontrol
     * Makes a copy of this as if it were parcel'd and unparcel'd. This implies that surfacecontrol
     * refcounts are incremented which allows the "remote" receiver to release them without breaking
     * refcounts are incremented which allows the "remote" receiver to release them without breaking
+1 −0
Original line number Original line Diff line number Diff line
@@ -641,6 +641,7 @@ public class Transitions implements RemoteCallable<Transitions>,
    @VisibleForTesting
    @VisibleForTesting
    void onTransitionReady(@NonNull IBinder transitionToken, @NonNull TransitionInfo info,
    void onTransitionReady(@NonNull IBinder transitionToken, @NonNull TransitionInfo info,
            @NonNull SurfaceControl.Transaction t, @NonNull SurfaceControl.Transaction finishT) {
            @NonNull SurfaceControl.Transaction t, @NonNull SurfaceControl.Transaction finishT) {
        info.setUnreleasedWarningCallSiteForAllSurfaces("Transitions.onTransitionReady");
        ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, "onTransitionReady %s: %s",
        ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, "onTransitionReady %s: %s",
                transitionToken, info);
                transitionToken, info);
        final int activeIdx = findByToken(mPendingTransitions, transitionToken);
        final int activeIdx = findByToken(mPendingTransitions, transitionToken);