From aa0c02d22182011b2add83b56ef96a303fa53ee0 Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Fri, 23 Mar 2012 13:56:34 -0700 Subject: 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 --- services/java/com/android/server/BackupManagerService.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'services/java/com/android/server/BackupManagerService.java') diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java index a7b08f5..3657ea3 100644 --- a/services/java/com/android/server/BackupManagerService.java +++ b/services/java/com/android/server/BackupManagerService.java @@ -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 { -- cgit v1.1