Merge "Update callsites for leashes in a transition" into udc-dev am: 3e130b1254

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23591504

Change-Id: I6abfb55016cffd9a817e825eab807f3fd78ccd87
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Winson Chung
2023-06-06 23:16:29 +00:00
committed by Automerger Merge Worker
2 changed files with 11 additions and 0 deletions

View File

@@ -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
* refcounts are incremented which allows the "remote" receiver to release them without breaking

View File

@@ -641,6 +641,7 @@ public class Transitions implements RemoteCallable<Transitions>,
@VisibleForTesting
void onTransitionReady(@NonNull IBinder transitionToken, @NonNull TransitionInfo info,
@NonNull SurfaceControl.Transaction t, @NonNull SurfaceControl.Transaction finishT) {
info.setUnreleasedWarningCallSiteForAllSurfaces("Transitions.onTransitionReady");
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, "onTransitionReady %s: %s",
transitionToken, info);
final int activeIdx = findByToken(mPendingTransitions, transitionToken);