Merge "Fix NPE in SyncManager when updating accounts." into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a5d32d0375
@@ -3256,14 +3256,17 @@ public class SyncManager {
|
||||
}
|
||||
}
|
||||
|
||||
// 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");
|
||||
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");
|
||||
}
|
||||
AccountSyncSettingsBackupHelper.accountAdded(mContext, syncTargets.userId);
|
||||
break;
|
||||
}
|
||||
AccountSyncSettingsBackupHelper.accountAdded(mContext, syncTargets.userId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user