* <ul>
* <li>{@link #KEY_ACCOUNT_SESSION_BUNDLE} - encrypted Bundle for
* adding the the to the device later.
- * <li>{@link #KEY_PASSWORD} - optional, the password or password
- * hash of the account.
* <li>{@link #KEY_ACCOUNT_STATUS_TOKEN} - optional, token to check
* status of the account
* </ul>
* <ul>
* <li>{@link #KEY_ACCOUNT_SESSION_BUNDLE} - encrypted Bundle for
* updating the local credentials on device later.
- * <li>{@link #KEY_PASSWORD} - optional, the password or password
- * hash of the account
* <li>{@link #KEY_ACCOUNT_STATUS_TOKEN} - optional, token to check
* status of the account
* </ul>
boolean isPasswordForwardingAllowed = isPermitted(
callerPkg, uid, Manifest.permission.GET_PASSWORD);
- int usrId = UserHandle.getCallingUserId();
long identityToken = clearCallingIdentity();
try {
- UserAccounts accounts = getUserAccounts(usrId);
+ UserAccounts accounts = getUserAccounts(userId);
logRecordWithUid(accounts, DebugDbHelper.ACTION_CALLED_START_ACCOUNT_ADD,
TABLE_ACCOUNTS, uid);
new StartAccountSession(
checkKeyIntent(
Binder.getCallingUid(),
intent);
- // Omit passwords if the caller isn't permitted to see them.
- if (!mIsPasswordForwardingAllowed) {
- result.remove(AccountManager.KEY_PASSWORD);
- }
}
IAccountManagerResponse response;
if (mExpectActivityLaunch && result != null
return;
}
+ // Omit passwords if the caller isn't permitted to see them.
+ if (!mIsPasswordForwardingAllowed) {
+ result.remove(AccountManager.KEY_PASSWORD);
+ }
+
// Strip auth token from result.
result.remove(AccountManager.KEY_AUTHTOKEN);