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

am: 6eb8c15

* commit '6eb8c15b7e07e320243fbb34999f4a34fa729ed0':
  Return null when user is locked

Change-Id: I7926a4226ce99d290ba60fff85b72f4a2f3cf6f3
This commit is contained in:
Fyodor Kupolov
2016-04-25 17:16:45 +00:00
committed by android-build-merger

View File

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