diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-20 14:51:59 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-20 14:51:59 -0700 |
commit | 73c6afc91a90159e0d94ebeb28d67eda9c93223f (patch) | |
tree | 81a286aadff36a5e57ae127e34f4cd9893bf50b3 /services | |
parent | c7b0dba641d5417286caa3694e70b039012d1e91 (diff) | |
parent | 967330496438a7f28273b0220a444a30dbdc9fb9 (diff) | |
download | frameworks_base-73c6afc91a90159e0d94ebeb28d67eda9c93223f.zip frameworks_base-73c6afc91a90159e0d94ebeb28d67eda9c93223f.tar.gz frameworks_base-73c6afc91a90159e0d94ebeb28d67eda9c93223f.tar.bz2 |
Merge change 7945
* changes:
Clean up when an attempted restore throws
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/BackupManagerService.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java index c493a12..fc1ec03 100644 --- a/services/java/com/android/server/BackupManagerService.java +++ b/services/java/com/android/server/BackupManagerService.java @@ -1276,7 +1276,11 @@ class BackupManagerService extends IBackupManager.Stub { File savedStateName = new File(mStateDir, packageName); newStateName.renameTo(savedStateName); } catch (Exception e) { + // If the agent fails restore, it might have put the app's data + // into an incoherent state. For consistency we wipe its data + // again in this case before propagating the exception Log.e(TAG, "Error restoring data for " + packageName, e); + clearApplicationDataSynchronous(packageName); } } } |