Better fix for the PendingIntent issue.
Refactor the changes introduced in Ib02842bb.
- Now Welcome and AccountSettingsXL accept intents with URLs of the following
style, and get IDs from query params, rather than extras.
Welcome:
content://ui.email.android.com/view/mailbox?ACCOUNT_ID=1&MAILBOX_ID=2&MESSAGE_ID=3
AccountSettingsXL:
content://ui.email.android.com/settings?ACCOUNT_ID=1
- Now the "new message" and "login failed" notifications use these new style
intents, so the system wouldn't merge PendingIntents for different accounts.
Also:
- Moved all notification creation logic to NotificationController.
(Except the one in CalendarSyncEnabler; which is used only to support
upgrading from pre-froyo and I don't think it's worth refactoring.)
- Note the "password expired/expiring" and "security needed" notifications
aren't changed; they still use extras to store account IDs. This is okay
because these notifications are not per-account.
Bug 4065269
Change-Id: I70737438d2e7c45fd7488a5b0a7105c8568e02f7
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 218ff0f..524062f 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -92,12 +92,20 @@
android:name=".activity.Welcome"
>
<intent-filter>
- <action
- android:name="android.intent.action.MAIN" />
- <category
- android:name="android.intent.category.DEFAULT" />
- <category
- android:name="android.intent.category.LAUNCHER" />
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ <data
+ android:scheme="content"
+ android:host="ui.email.android.com"
+ android:path="/view/mailbox"
+ />
</intent-filter>
</activity>
<!-- Must be exported in order for the AccountManager to launch it -->
@@ -154,6 +162,15 @@
<category
android:name="android.intent.category.DEFAULT" />
</intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.EDIT" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data
+ android:scheme="content"
+ android:host="ui.email.android.com"
+ android:path="/settings"
+ />
+ </intent-filter>
</activity>
<activity
android:name=".activity.setup.AccountSecurity"