From cdb5f00ecb3456c82011cd9c3668447e8061b9d5 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Thu, 29 Sep 2022 00:59:22 +0000 Subject: [PATCH] Parcel: more stacks printed when recycle twice. We can print the second stack by default. Bug: 243768096 Test: N/A Change-Id: I49d4e72f87c15fc04ddf94a19ff8f76512b6ebbc --- core/java/android/os/Parcel.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java index 56652f57e6f1c..a6ae663dabb0b 100644 --- a/core/java/android/os/Parcel.java +++ b/core/java/android/os/Parcel.java @@ -560,7 +560,9 @@ public final class Parcel { */ public final void recycle() { if (mRecycled) { - Log.w(TAG, "Recycle called on unowned Parcel. (recycle twice?)", mStack); + Log.w(TAG, "Recycle called on unowned Parcel. (recycle twice?) Here: " + + Log.getStackTraceString(new Throwable()) + + " Original recycle call (if DEBUG_RECYCLE): ", mStack); } mRecycled = true;