Merge "Fix NPE, caller may not pass loginOptions." into honeycomb

This commit is contained in:
Costin Manolache
2011-01-14 10:52:11 -08:00
committed by Android (Google) Code Review

View File

@ -888,6 +888,9 @@ public class AccountManagerService
final boolean permissionGranted = customTokens || final boolean permissionGranted = customTokens ||
permissionIsGranted(account, authTokenType, callerUid); permissionIsGranted(account, authTokenType, callerUid);
if (loginOptions == null) {
loginOptions = new Bundle();
}
if (customTokens) { if (customTokens) {
// let authenticator know the identity of the caller // let authenticator know the identity of the caller
loginOptions.putInt(AccountManager.KEY_CALLER_UID, callerUid); loginOptions.putInt(AccountManager.KEY_CALLER_UID, callerUid);