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

Commit 5d16ac5e authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 3374 into donut

* changes:
  Fix tracking of backup participants across package remove/update
parents e3523054 cd4ff2e7
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -337,7 +337,14 @@ class BackupManagerService extends IBackupManager.Stub {
                int uid = app.uid;
                HashSet<ApplicationInfo> set = mBackupParticipants.get(uid);
                if (set != null) {
                    set.remove(app);
                    // Find the existing entry with the same package name, and remove it.
                    // We can't just remove(app) because the instances are different.
                    for (ApplicationInfo entry: set) {
                        if (entry.packageName.equals(app.packageName)) {
                            set.remove(entry);
                            break;
                        }
                    }
                    if (set.size() == 0) {
                        mBackupParticipants.delete(uid);                    }
                }