diff options
author | Dianne Hackborn <hackbod@google.com> | 2014-09-12 14:23:58 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2014-09-12 14:23:58 -0700 |
commit | 33d738a10209d4dc882a65285d6e71cfaeabe769 (patch) | |
tree | 137356da4f232b701e884ca7521f003822c6ac51 | |
parent | 098116854e5b2500d71a1d7b5cce499edf31d287 (diff) | |
download | frameworks_base-33d738a10209d4dc882a65285d6e71cfaeabe769.zip frameworks_base-33d738a10209d4dc882a65285d6e71cfaeabe769.tar.gz frameworks_base-33d738a10209d4dc882a65285d6e71cfaeabe769.tar.bz2 |
Allow throwing UnsupportedOperationException across Binder.
Change-Id: I3a9b81958886033d546c3a20331716dbb9492365
-rw-r--r-- | core/java/android/os/Parcel.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java index d1ad0ad..5230128 100644 --- a/core/java/android/os/Parcel.java +++ b/core/java/android/os/Parcel.java @@ -236,6 +236,7 @@ public final class Parcel { private static final int EX_NULL_POINTER = -4; private static final int EX_ILLEGAL_STATE = -5; private static final int EX_NETWORK_MAIN_THREAD = -6; + private static final int EX_UNSUPPORTED_OPERATION = -7; private static final int EX_HAS_REPLY_HEADER = -128; // special; see below private static native int nativeDataSize(long nativePtr); @@ -1427,6 +1428,8 @@ public final class Parcel { code = EX_ILLEGAL_STATE; } else if (e instanceof NetworkOnMainThreadException) { code = EX_NETWORK_MAIN_THREAD; + } else if (e instanceof UnsupportedOperationException) { + code = EX_UNSUPPORTED_OPERATION; } writeInt(code); StrictMode.clearGatheredViolations(); @@ -1545,6 +1548,8 @@ public final class Parcel { throw new IllegalStateException(msg); case EX_NETWORK_MAIN_THREAD: throw new NetworkOnMainThreadException(); + case EX_UNSUPPORTED_OPERATION: + throw new UnsupportedOperationException(msg); } throw new RuntimeException("Unknown exception code: " + code + " msg " + msg); |