Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c59cd236 authored by rhed_jao's avatar rhed_jao Committed by Steve Kondik
Browse files

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: default avatarrhed_jao <rhed_jao@htc.com>
parent 4707b5c2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;