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

Commit aa0c02d2 authored by Christopher Tate's avatar Christopher Tate
Browse files

Deal gracefully with fatal exceptions during full backup

In particular, if the low-level zip or crypto layers of the output
pipeline throw, the output becomes invalid at that point, but we
were not properly detecting this; we were missing the exception and
the runtime was going down.  Now we catch any such fatal exception
and make sure to shut down the backup operation cleanly, leaving
the output at whatever point in its construction that it had
achieved.

Bug 6131870

Change-Id: If0fe0337857404b776f407a79d11dd88b8e60fd0
parent 54c54622
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2547,6 +2547,8 @@ class BackupManagerService extends IBackupManager.Stub {
                finalizeBackup(out);
            } catch (RemoteException e) {
                Slog.e(TAG, "App died during full backup");
            } catch (Exception e) {
                Slog.e(TAG, "Internal exception during full backup", e);
            } finally {
                tearDown(pkg);
                try {