diff --git a/core/java/android/os/Binder.java b/core/java/android/os/Binder.java index 8e8565c3574ca..4db8d1ea64d5b 100644 --- a/core/java/android/os/Binder.java +++ b/core/java/android/os/Binder.java @@ -740,6 +740,8 @@ public class Binder implements IBinder { Log.w(TAG, "Caught a RuntimeException from the binder stub implementation.", e); } } else { + // Clear the parcel before writing the exception + reply.setDataSize(0); reply.setDataPosition(0); reply.writeException(e); }