Allow queries in folder URIs

As a result of a previous change, we are appending application version
to the end of the folder name.  This breaks the EmailProvider's
expectation about folder URIs.  So instead of using just
uifolder/<number>, allow for uifolder/<number>?<appversion query>

getPathSegments().get(i) will still return the path segment without
the query, so the folder ID gets resolved correctly.

The previous change:
https://googleplex-android-review.googlesource.com/#/c/281416/

Bug: 8435074 Not able to access Exchange inbox and combined inbox

Change-Id: I7b9ffad9b5510d1a08a29e2a21aacb091d4330a6
This commit is contained in:
Vikram Aggarwal 2013-04-09 15:06:02 -07:00
parent 7b423bf136
commit 6b88a2471f

View File

@ -1157,7 +1157,9 @@ public class EmailProvider extends ContentProvider {
matcher.addURI(EmailContent.AUTHORITY, "uimessage/#", UI_MESSAGE);
matcher.addURI(EmailContent.AUTHORITY, "uiundo", UI_UNDO);
matcher.addURI(EmailContent.AUTHORITY, "uirefresh/#", UI_FOLDER_REFRESH);
matcher.addURI(EmailContent.AUTHORITY, "uifolder/#", UI_FOLDER);
// We listen to everything trailing uifolder/ since there might be an appVersion
// as in Utils.appendVersionQueryParameter().
matcher.addURI(EmailContent.AUTHORITY, "uifolder/*", UI_FOLDER);
matcher.addURI(EmailContent.AUTHORITY, "uiaccount/#", UI_ACCOUNT);
matcher.addURI(EmailContent.AUTHORITY, "uiaccts", UI_ACCTS);
matcher.addURI(EmailContent.AUTHORITY, "uiattachments/#", UI_ATTACHMENTS);