diff options
author | Fred Quintana <fredq@google.com> | 2009-09-16 17:32:42 -0700 |
---|---|---|
committer | Fred Quintana <fredq@google.com> | 2009-09-16 17:32:42 -0700 |
commit | 6dfd1382fe43592b9602fc6553e820c64067c759 (patch) | |
tree | 35b23a7ce41167bd3070c6d6521b7ae961ec0d85 /core | |
parent | 0828beee503b99a8f38f456416592d4ed6c799ae (diff) | |
download | frameworks_base-6dfd1382fe43592b9602fc6553e820c64067c759.zip frameworks_base-6dfd1382fe43592b9602fc6553e820c64067c759.tar.gz frameworks_base-6dfd1382fe43592b9602fc6553e820c64067c759.tar.bz2 |
remove the signin required notification as when the signin is successful
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/accounts/AccountManagerService.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/core/java/android/accounts/AccountManagerService.java b/core/java/android/accounts/AccountManagerService.java index 0bdcc1d..4217957 100644 --- a/core/java/android/accounts/AccountManagerService.java +++ b/core/java/android/accounts/AccountManagerService.java @@ -46,7 +46,6 @@ import android.util.Pair; import android.app.PendingIntent; import android.app.NotificationManager; import android.app.Notification; -import android.app.Activity; import android.Manifest; import java.io.FileDescriptor; @@ -471,6 +470,7 @@ public class AccountManagerService extends IAccountManager.Stub { } private boolean saveAuthTokenToDatabase(Account account, String type, String authToken) { + cancelNotification(getSigninRequiredNotificationId(account)); SQLiteDatabase db = mOpenHelper.getWritableDatabase(); db.beginTransaction(); try { @@ -523,7 +523,7 @@ public class AccountManagerService extends IAccountManager.Stub { checkAuthenticateAccountsPermission(account); long identityToken = clearCallingIdentity(); try { - cacheAuthToken(account, authTokenType, authToken); + saveAuthTokenToDatabase(account, authTokenType, authToken); } finally { restoreCallingIdentity(identityToken); } @@ -686,7 +686,8 @@ public class AccountManagerService extends IAccountManager.Stub { "the type and name should not be empty"); return; } - cacheAuthToken(new Account(name, type), authTokenType, authToken); + saveAuthTokenToDatabase(new Account(name, type), + authTokenType, authToken); } Intent intent = result.getParcelable(Constants.INTENT_KEY); @@ -1004,10 +1005,6 @@ public class AccountManagerService extends IAccountManager.Stub { } } - private boolean cacheAuthToken(Account account, String authTokenType, String authToken) { - return saveAuthTokenToDatabase(account, authTokenType, authToken); - } - private long getAccountId(SQLiteDatabase db, Account account) { Cursor cursor = db.query(TABLE_ACCOUNTS, new String[]{ACCOUNTS_ID}, "name=? AND type=?", new String[]{account.name, account.type}, null, null, null); |