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

Commit efe369ca authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Alarm:Fix issue exchange account disapper after power off alarm"

parents 223c12ee 974fae6a
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ import android.os.Parcel;
import android.os.Process;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
import android.os.storage.StorageManager;
@@ -426,6 +427,16 @@ public class AccountManagerService
                    + " userLocked=" + mLocalUnlockedUsers.get(accounts.userId));
        }

        // When OnUserUnlocked or onServiceChanged, this function will be
        // called. It is not necessary to validate accounts during alarm boot as
        // only power off alarm apps are installed. The applications with
        // sync accounts may not be installed during alarm boot. If the applications
        // are not installed, the AccountAuthenticators of these applications
        // will not exist. Then the accounts of the applications will be removed.
        if (SystemProperties.getBoolean("ro.alarm_boot", false)) {
            return;
        }

        if (invalidateAuthenticatorCache) {
            mAuthenticatorCache.invalidateCache(accounts.userId);
        }
+7 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.os.Message;
import android.os.Parcel;
import android.os.RemoteCallbackList;
import android.os.RemoteException;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.util.*;

@@ -892,6 +893,12 @@ public class SyncStorageEngine extends Handler {
     * active accounts.
     */
    public void doDatabaseCleanup(Account[] accounts, int userId) {
        // It is not necessary to clean up database during alarm boot as
        // only power off alarm apps are installed. The applications with
        // sync accounts won't be installed during alarm boot.
        if (SystemProperties.getBoolean("ro.alarm_boot", false)) {
            return;
        }
        synchronized (mAuthorities) {
            if (Log.isLoggable(TAG, Log.VERBOSE)) {
                Slog.v(TAG, "Updating for new accounts...");