diff options
author | Dianne Hackborn <hackbod@google.com> | 2014-09-13 03:05:03 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-13 03:05:03 +0000 |
commit | 79a17637e794a19ef3784d3c996d881d2ee23866 (patch) | |
tree | 4fa12c5ea77d348dfa5478f5d19bc37be37f0c6a | |
parent | 0df1cff1f47f2acb6e7ad00d97cdad7ef1bc057d (diff) | |
parent | 40461ddd8c1c087a31c1febbed76507e8d77ee40 (diff) | |
download | frameworks_base-79a17637e794a19ef3784d3c996d881d2ee23866.zip frameworks_base-79a17637e794a19ef3784d3c996d881d2ee23866.tar.gz frameworks_base-79a17637e794a19ef3784d3c996d881d2ee23866.tar.bz2 |
am 785f2a90: am 46c1851a: am a561b237: Merge "Allow throwing UnsupportedOperationException across Binder." into lmp-dev
* commit '785f2a901d6ca85a12a69095e4ad2367041e02e7':
Allow throwing UnsupportedOperationException across Binder.
-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); |