summaryrefslogtreecommitdiff
path: root/core/java/android/os/RemoteException.java
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2019-11-13 12:40:01 -0800
committerRoshan Pius <rpius@google.com>2019-11-14 16:53:43 +0000
commit148e86e5a563eedb710a71c97eced91310aa195d (patch)
tree9d992e3111cf8afcc93525a8e52df6d91e167d9f /core/java/android/os/RemoteException.java
parent1b14a1ccd9293c9b4ebff0bf868ed81c26e59961 (diff)
RemoteException: Mark rethrow* APIs public
Bug: 144435970 Test: Compiles Change-Id: I361f5d27529c938fff42fdbabb63f7b87527a270
Diffstat (limited to 'core/java/android/os/RemoteException.java')
-rw-r--r--core/java/android/os/RemoteException.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/core/java/android/os/RemoteException.java b/core/java/android/os/RemoteException.java
index 2e673a857a93..10ef27952df4 100644
--- a/core/java/android/os/RemoteException.java
+++ b/core/java/android/os/RemoteException.java
@@ -16,7 +16,7 @@
package android.os;
-import android.annotation.UnsupportedAppUsage;
+import android.annotation.NonNull;
import android.util.AndroidException;
/**
@@ -37,7 +37,15 @@ public class RemoteException extends AndroidException {
super(message, cause, enableSuppression, writableStackTrace);
}
- /** {@hide} */
+ /**
+ * Rethrow this as an unchecked runtime exception.
+ * <p>
+ * Apps making calls into other processes may end up persisting internal
+ * state or making security decisions based on the perceived success or
+ * failure of a call, or any default values returned. For this reason, we
+ * want to strongly throw when there was trouble with the transaction.
+ */
+ @NonNull
public RuntimeException rethrowAsRuntimeException() {
throw new RuntimeException(this);
}
@@ -52,10 +60,8 @@ public class RemoteException extends AndroidException {
* state or making security decisions based on the perceived success or
* failure of a call, or any default values returned. For this reason, we
* want to strongly throw when there was trouble with the transaction.
- *
- * @hide
*/
- @UnsupportedAppUsage
+ @NonNull
public RuntimeException rethrowFromSystemServer() {
if (this instanceof DeadObjectException) {
throw new RuntimeException(new DeadSystemException());