summaryrefslogtreecommitdiff
path: root/services/backup/java
diff options
context:
space:
mode:
authorAl Sutton <alsutton@google.com>2019-09-12 08:36:28 +0100
committerAl Sutton <alsutton@google.com>2019-09-12 08:36:28 +0100
commite4accbe31f79861858c3bc5caccfba53ee5cea85 (patch)
treec4eef7ad8e5fb5d26cc3c47053f910b2a2aae9ee /services/backup/java
parent7b1aaaee937b6847a35215e172f44389d53865fa (diff)
Capture all exceptions rather than just IO ones.
If an exception which isn't in the IOException hierarchy gets thrown within this code it can bring down the system_server, so we should capture and log any exception rather than letting it propagate out and bring down system_server. I decided not to capture all Throwables because they represent more serious runtime errors that probably should bring down system_server. Fixes: 140472631 Test: m -j (compilation means we're OK). Change-Id: Ibbd9612d1e9b42c100ce7fda0b7463ac3f10704e
Diffstat (limited to 'services/backup/java')
-rw-r--r--services/backup/java/com/android/server/backup/restore/PerformAdbRestoreTask.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/backup/java/com/android/server/backup/restore/PerformAdbRestoreTask.java b/services/backup/java/com/android/server/backup/restore/PerformAdbRestoreTask.java
index ec2d5454210b..01b40fbff201 100644
--- a/services/backup/java/com/android/server/backup/restore/PerformAdbRestoreTask.java
+++ b/services/backup/java/com/android/server/backup/restore/PerformAdbRestoreTask.java
@@ -110,7 +110,7 @@ public class PerformAdbRestoreTask implements Runnable {
if (MORE_DEBUG) {
Slog.v(TAG, "Done consuming input tarfile.");
}
- } catch (IOException e) {
+ } catch (Exception e) {
Slog.e(TAG, "Unable to read restore input");
} finally {
try {