summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2024-03-25 20:20:36 +0000
committer Steven Moreland <smoreland@google.com> 2024-03-25 23:52:12 +0000
commitaf7df9712b565e22ef07c113355912d4b0d4cec8 (patch)
tree99472d602521376f2f5fc03be3e20c47b3aba2c5
parent771e5d913963ee62c1af494f0d4c78d5d18b3bc9 (diff)
Parcel: log invalid Parcel when obtaining
Log, not error, in case an error causes more issues. This is unexpected though. This provides us an earlier error so we are sure that the issue comes from the pool and not from the code that is using the pool. Bug: 330965161 Test: boot Change-Id: If4bf1ac17307d7aea8ba746d16108e8cf542a6e0
-rw-r--r--core/java/android/os/Parcel.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java
index 352c9d2ba81f..430093b60121 100644
--- a/core/java/android/os/Parcel.java
+++ b/core/java/android/os/Parcel.java
@@ -554,6 +554,11 @@ public final class Parcel {
}
res.mReadWriteHelper = ReadWriteHelper.DEFAULT;
}
+
+ if (res.mNativePtr == 0) {
+ Log.e(TAG, "Obtained Parcel object has null native pointer. Invalid state.");
+ }
+
return res;
}