diff options
Diffstat (limited to 'core/java/android/os')
-rw-r--r-- | core/java/android/os/Binder.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/core/java/android/os/Binder.java b/core/java/android/os/Binder.java index 7b91418..4627c88 100644 --- a/core/java/android/os/Binder.java +++ b/core/java/android/os/Binder.java @@ -296,7 +296,21 @@ public class Binder implements IBinder { disabled = sDumpDisabled; } if (disabled == null) { - dump(fd, pw, args); + try { + dump(fd, pw, args); + } catch (SecurityException e) { + pw.println(); + pw.println("Security exception: " + e.getMessage()); + throw e; + } catch (Throwable e) { + // Unlike usual calls, in this case if an exception gets thrown + // back to us we want to print it back in to the dump data, since + // that is where the caller expects all interesting information to + // go. + pw.println(); + pw.println("Exception occurred while dumping:"); + e.printStackTrace(pw); + } } else { pw.println(sDumpDisabled); } @@ -443,7 +457,6 @@ final class BinderProxy implements IBinder { data.writeStringArray(args); try { transact(DUMP_TRANSACTION, data, reply, FLAG_ONEWAY); - reply.readException(); } finally { data.recycle(); reply.recycle(); |