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

Commit af1d9519 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Removes the task snapshot's reference earlier from the persist queue." into main

parents 6205551d 8a9716a8
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -319,7 +319,13 @@ class SnapshotPersistQueue {
        @Override
        void onQueuedLocked() {
            // Remove duplicate request.
            mStoreQueueItems.remove(this);
            mStoreQueueItems.removeIf(item -> {
                if (item.equals(this) && item.mSnapshot != mSnapshot) {
                    item.mSnapshot.removeReference(TaskSnapshot.REFERENCE_PERSIST);
                    return true;
                }
                return false;
            });
            mStoreQueueItems.offer(this);
        }