diff options
author | rhed_jao <rhed_jao@htc.com> | 2015-10-09 22:17:57 +0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-11-07 05:40:46 -0800 |
commit | c59cd236f12b6af82197fcf4e4f76690392cf379 (patch) | |
tree | 9360b22aec972b8188121e055037d26fa1434680 | |
parent | 4707b5c29128da077bed583a16f072a61998ed60 (diff) | |
download | frameworks_base-c59cd236f12b6af82197fcf4e4f76690392cf379.zip frameworks_base-c59cd236f12b6af82197fcf4e4f76690392cf379.tar.gz frameworks_base-c59cd236f12b6af82197fcf4e4f76690392cf379.tar.bz2 |
Stop feeding restore engine if it's already in failed state and exit.
b/24518516
modified: services/backup/java/com/android/server/backup/BackupManagerService.java
Change-Id: I371b7e87fa7ba408b1255263c6d23821496916a2
Signed-off-by: rhed_jao <rhed_jao@htc.com>
-rw-r--r-- | services/backup/java/com/android/server/backup/BackupManagerService.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/services/backup/java/com/android/server/backup/BackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java index b3bb9e6..1629a37 100644 --- a/services/backup/java/com/android/server/backup/BackupManagerService.java +++ b/services/backup/java/com/android/server/backup/BackupManagerService.java @@ -7948,6 +7948,11 @@ if (MORE_DEBUG) Slog.v(TAG, " + got " + nRead + "; now wanting " + (size - soF } int toCopy = result; while (toCopy > 0) { + if (!mEngine.isRunning() && RestoreEngine.SUCCESS != mEngine.getResult()) { + Slog.e(TAG, "RestoreEngine fail"); + // throw IOException to abandon this package's restore + throw new IOException(); + } int n = transportIn.read(buffer, 0, toCopy); engineOut.write(buffer, 0, n); toCopy -= n; |