am 1381d408
: Skip null/empty account types
* commit '1381d4083bbfdf046eceac081420ab3fa7a1ae81': Skip null/empty account types
This commit is contained in:
commit
f0deafc816
@ -1614,7 +1614,10 @@ public class EmailProvider extends ContentProvider
|
||||
// Find all possible account types
|
||||
final Set<String> accountTypes = new HashSet<String>(3);
|
||||
for (final EmailServiceInfo info : infos) {
|
||||
accountTypes.add(info.accountType);
|
||||
if (!TextUtils.isEmpty(info.accountType)) {
|
||||
// accountType will be empty for the gmail stub entry
|
||||
accountTypes.add(info.accountType);
|
||||
}
|
||||
}
|
||||
// Find all accounts we own
|
||||
final List<android.accounts.Account> amAccounts = new ArrayList<android.accounts.Account>();
|
||||
@ -1626,11 +1629,7 @@ public class EmailProvider extends ContentProvider
|
||||
int restoredCount = 0;
|
||||
for (final android.accounts.Account amAccount : amAccounts) {
|
||||
String jsonString = null;
|
||||
try {
|
||||
jsonString = am.getUserData(amAccount, ACCOUNT_MANAGER_JSON_TAG);
|
||||
} catch (SecurityException e) {
|
||||
LogUtils.e(TAG, e, "catching exception");
|
||||
}
|
||||
if (TextUtils.isEmpty(jsonString)) {
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user