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

Commit aad1bae9 authored by Piyush Singhania's avatar Piyush Singhania
Browse files

Mark the sync as non-pending when it's not active.

Flag: EXEMPT bugfix
Bug: 308493178
Test: atest ContentResolverTest, atest ContentResolverSyncTest
Change-Id: I834103f10d46cee944d654c426ed8c6917afd6ed
parent ebb4d530
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1198,6 +1198,7 @@ public class SyncStorageEngine {
     * Called to indicate that a previously active sync is no longer active.
     */
    public void removeActiveSync(SyncInfo syncInfo, int userId) {
        final EndPoint info = new EndPoint(syncInfo.account, syncInfo.authority, userId);
        synchronized (mAuthorities) {
            if (Log.isLoggable(TAG, Log.VERBOSE)) {
                Slog.v(TAG, "removeActiveSync: account=" + syncInfo.account
@@ -1205,9 +1206,9 @@ public class SyncStorageEngine {
                        + " auth=" + syncInfo.authority);
            }
            getCurrentSyncs(userId).remove(syncInfo);
            markPending(info, false);
        }

        reportActiveChange(new EndPoint(syncInfo.account, syncInfo.authority, userId));
        reportActiveChange(info);
    }

    /**