Setup composeUri for accounts in EmailProvider
* Add intent filter in manifest Change-Id: Ifbacfcb6109d76d48dabb87eb45ea28ec4278ad8
This commit is contained in:
parent
8c4b6e40cf
commit
d9201da55b
@ -264,6 +264,16 @@
|
||||
<action
|
||||
android:name="com.android.email.intent.action.REPLY" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category
|
||||
android:name="android.intent.category.DEFAULT" />
|
||||
<data
|
||||
android:scheme="content"
|
||||
android:host="ui.email.android.com"
|
||||
android:pathPrefix="/compose"
|
||||
/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<!-- Only used to support pre-HC shortcuts -->
|
||||
|
@ -2107,11 +2107,11 @@ outer:
|
||||
AccountCapabilities.SMART_REPLY |
|
||||
AccountCapabilities.UNDO;
|
||||
|
||||
private static final Uri BASE_SETTINGS_URI =
|
||||
Uri.parse("content://ui.email.android.com/settings");
|
||||
private static final Uri BASE_EXTERNAL_URI = Uri.parse("content://ui.email.android.com");
|
||||
|
||||
private static Uri getAccountSettingUri(String account) {
|
||||
return BASE_SETTINGS_URI.buildUpon().appendQueryParameter("account", account).build();
|
||||
private static String getExternalUriString(String segment, String account) {
|
||||
return BASE_EXTERNAL_URI.buildUpon().appendPath(segment)
|
||||
.appendQueryParameter("account", account).build().toString();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2147,8 +2147,10 @@ outer:
|
||||
}
|
||||
}
|
||||
values.put(UIProvider.AccountColumns.SETTINGS_INTENT_URI,
|
||||
getAccountSettingUri(id).toString());
|
||||
getExternalUriString("settings", id));
|
||||
StringBuilder sb = genSelect(sAccountListMap, uiProjection, values);
|
||||
values.put(UIProvider.AccountColumns.COMPOSE_URI,
|
||||
getExternalUriString("compose", id));
|
||||
sb.append(" FROM " + Account.TABLE_NAME + " WHERE " + AccountColumns.ID + "=?");
|
||||
return sb.toString();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user