diff options
| author | 2025-01-21 13:14:49 -0800 | |
|---|---|---|
| committer | 2025-01-21 14:55:56 -0800 | |
| commit | 98636f8026c81f29f27eb444481d434b1869f2f7 (patch) | |
| tree | 3ea4fe52d54ef5471fb0391846291a73cd9fd8d2 | |
| parent | 0bb6108bfa916dfb9eefb26c59703df986bc32ed (diff) | |
Revert "Assert Parcel not in pool when used (partial reland)"
This reverts commit 0bb6108bfa916dfb9eefb26c59703df986bc32ed.
Reason for revert: b/390748425
Fixes: 390748425
Bug: 381155347
Change-Id: I606123c67884d96c929ad21adce5303984d56a07
| -rw-r--r-- | core/java/android/os/Parcel.java | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java index c6a63a7ef238..4aa74621bd62 100644 --- a/core/java/android/os/Parcel.java +++ b/core/java/android/os/Parcel.java @@ -50,7 +50,6 @@ import com.android.internal.util.ArrayUtils; import dalvik.annotation.optimization.CriticalNative; import dalvik.annotation.optimization.FastNative; -import dalvik.annotation.optimization.NeverInline; import libcore.util.SneakyThrow; @@ -629,19 +628,6 @@ public final class Parcel { } } - @NeverInline - private void errorUsedWhileRecycling() { - String error = "Parcel used while recycled. " - + Log.getStackTraceString(new Throwable()) - + " Original recycle call (if DEBUG_RECYCLE): ", mStack; - Log.wtf(TAG, error); - // TODO(b/381155347): harder error - } - - private void assertNotRecycled() { - if (mRecycled) errorUsedWhileRecycling(); - } - /** * Set a {@link ReadWriteHelper}, which can be used to avoid having duplicate strings, for * example. @@ -1194,7 +1180,6 @@ public final class Parcel { * growing dataCapacity() if needed. */ public final void writeInt(int val) { - assertNotRecycled(); int err = nativeWriteInt(mNativePtr, val); if (err != OK) { nativeSignalExceptionForError(err); @@ -3297,7 +3282,6 @@ public final class Parcel { * Read an integer value from the parcel at the current dataPosition(). */ public final int readInt() { - assertNotRecycled(); return nativeReadInt(mNativePtr); } |