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

Commit 9dfdac5b authored by Christopher Tate's avatar Christopher Tate
Browse files

Clear app data via the Activity Manager, not Package Manager

This is because doing it through the Activity Manager also makes sure that the
app has been shut down first, which is quite a desirable invariant for restore
handling.
parent d87c19f7
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -792,7 +792,11 @@ class BackupManagerService extends IBackupManager.Stub {

        synchronized(mClearDataLock) {
            mClearingData = true;
            mPackageManager.clearApplicationUserData(packageName, observer);
            try {
                mActivityManager.clearApplicationUserData(packageName, observer);
            } catch (RemoteException e) {
                // can't happen because the activity manager is in this process
            }

            // only wait 10 seconds for the clear data to happen
            long timeoutMark = System.currentTimeMillis() + TIMEOUT_INTERVAL;