Merge "Return null when user is locked" into nyc-dev

This commit is contained in:
Fyodor Kupolov
2016-04-25 17:03:34 +00:00
committed by Android (Google) Code Review

View File

@@ -828,6 +828,10 @@ public class AccountManagerService
account.type); account.type);
throw new SecurityException(msg); throw new SecurityException(msg);
} }
if (!isUserUnlocked(userId)) {
Log.w(TAG, "User " + userId + " data is locked. callingUid " + callingUid);
return null;
}
long identityToken = clearCallingIdentity(); long identityToken = clearCallingIdentity();
try { try {
UserAccounts accounts = getUserAccounts(userId); UserAccounts accounts = getUserAccounts(userId);
@@ -1788,6 +1792,11 @@ public class AccountManagerService
account.type); account.type);
throw new SecurityException(msg); throw new SecurityException(msg);
} }
if (!isUserUnlocked(userId)) {
Log.w(TAG, "Authtoken not available - user " + userId + " data is locked. callingUid "
+ callingUid);
return null;
}
long identityToken = clearCallingIdentity(); long identityToken = clearCallingIdentity();
try { try {
UserAccounts accounts = getUserAccounts(userId); UserAccounts accounts = getUserAccounts(userId);