summaryrefslogtreecommitdiffstats
path: root/core/java/android/accounts/AccountManagerService.java
diff options
context:
space:
mode:
authorCostin Manolache <costin@google.com>2011-01-17 12:12:37 -0800
committerCostin Manolache <costin@google.com>2011-01-17 15:12:57 -0800
commit9ec17366c17efd14c643ee88fa1132ab05197349 (patch)
treef5c9964f697d8cea815554f57531542ba0f79200 /core/java/android/accounts/AccountManagerService.java
parentf90633a07edf2ed058c054ec4cb82d7d1b3a8666 (diff)
downloadframeworks_base-9ec17366c17efd14c643ee88fa1132ab05197349.zip
frameworks_base-9ec17366c17efd14c643ee88fa1132ab05197349.tar.gz
frameworks_base-9ec17366c17efd14c643ee88fa1132ab05197349.tar.bz2
Add back NEW_TASK flag.
b/2510486 suggests we remove it, but this breaks services who can't call the intent without the flag. A different solution is needed to notify when the activity is done. Change-Id: I0b32ead69cf816e105899fdd74e99cc1e8bf5ce3
Diffstat (limited to 'core/java/android/accounts/AccountManagerService.java')
-rw-r--r--core/java/android/accounts/AccountManagerService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/android/accounts/AccountManagerService.java b/core/java/android/accounts/AccountManagerService.java
index 9cbc7be..e6eaf71 100644
--- a/core/java/android/accounts/AccountManagerService.java
+++ b/core/java/android/accounts/AccountManagerService.java
@@ -1019,6 +1019,10 @@ public class AccountManagerService
AccountAuthenticatorResponse response, String authTokenType, String authTokenLabel) {
Intent intent = new Intent(mContext, GrantCredentialsPermissionActivity.class);
+ // See FLAT_ACTIVITY_NEW_TASK docs for limitations and benefits of the flag.
+ // Since it was set in Eclair+ we can't change it without breaking apps using
+ // the intent from a non-Activity context.
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addCategory(
String.valueOf(getCredentialPermissionNotificationId(account, authTokenType, uid)));