Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Commit

Permalink
Add logs to IOExceptions during adb backup
Browse files Browse the repository at this point in the history
Test: Run adb backup
Bug: 65435587
Change-Id: I744cb2878654b716858d7c9bedeb12fb9978df6b
  • Loading branch information
Bernardo Rufino committed Sep 13, 2017
1 parent 4562ece commit 628fee5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion cmds/bu/src/com/android/commands/bu/Backup.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ private void doBackup(int socketFd) {
if (fd != null) {
try {
fd.close();
} catch (IOException e) {}
} catch (IOException e) {
Log.e(TAG, "IO error closing output for backup: " + e.getMessage());
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4535,7 +4535,7 @@ public void run() {
}
mOutputFile.close();
} catch (IOException e) {
/* nothing we can do about this */
Slog.e(TAG, "IO error closing adb backup file: " + e.getMessage());
}
synchronized (mLatch) {
mLatch.set(true);
Expand Down Expand Up @@ -10112,7 +10112,7 @@ public void adbBackup(ParcelFileDescriptor fd, boolean includeApks, boolean incl
try {
fd.close();
} catch (IOException e) {
// just eat it
Slog.e(TAG, "IO error closing output for adb backup: " + e.getMessage());
}
Binder.restoreCallingIdentity(oldId);
Slog.d(TAG, "Adb backup processing complete.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2486,7 +2486,7 @@ public void adbBackup(ParcelFileDescriptor fd, boolean includeApks, boolean incl
try {
fd.close();
} catch (IOException e) {
// just eat it
Slog.e(TAG, "IO error closing output for adb backup: " + e.getMessage());
}
Binder.restoreCallingIdentity(oldId);
Slog.d(TAG, "Adb backup processing complete.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ public void run() {
}
mOutputFile.close();
} catch (IOException e) {
/* nothing we can do about this */
Slog.e(TAG, "IO error closing adb backup file: " + e.getMessage());
}
synchronized (mLatch) {
mLatch.set(true);
Expand Down

0 comments on commit 628fee5

Please sign in to comment.