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

Commit 62929d98 authored by Varun Shah's avatar Varun Shah Committed by android-build-merger
Browse files

Merge "Fix NPE in SyncManager when updating accounts." into qt-dev

am: a5d32d03

Change-Id: Ied70c772ef25e4933bf3d70724eba3726e5c9b5e
parents e9b4b148 a5d32d03
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -3256,16 +3256,19 @@ public class SyncManager {
                }
            }

            if (syncTargets != null) {
                // On account add, check if there are any settings to be restored.
                for (AccountAndUser aau : mRunningAccounts) {
                    if (!containsAccountAndUser(oldAccounts, aau.account, aau.userId)) {
                        if (Log.isLoggable(TAG, Log.DEBUG)) {
                        Log.d(TAG, "Account " + aau.account + " added, checking sync restore data");
                            Log.d(TAG, "Account " + aau.account
                                    + " added, checking sync restore data");
                        }
                        AccountSyncSettingsBackupHelper.accountAdded(mContext, syncTargets.userId);
                        break;
                    }
                }
            }

            // Cancel all jobs from non-existent accounts.
            AccountAndUser[] allAccounts = AccountManagerService.getSingleton().getAllAccounts();