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

Commit 73c6afc9 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 7945

* changes:
  Clean up when an attempted restore throws
parents c7b0dba6 96733049
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);
            }
        }
    }