Return folder list for combined inbox
Change-Id: I9f5422988d7f209e07b576f3f16ee3013f67a27c
This commit is contained in:
parent
17aeb1e0a8
commit
8c5527f55a
@ -2593,6 +2593,13 @@ outer:
|
|||||||
private static final String COMBINED_ACCOUNT_ID_STRING =
|
private static final String COMBINED_ACCOUNT_ID_STRING =
|
||||||
Long.toString(Account.ACCOUNT_ID_COMBINED_VIEW);
|
Long.toString(Account.ACCOUNT_ID_COMBINED_VIEW);
|
||||||
|
|
||||||
|
|
||||||
|
private Cursor getCombinedInboxCursor() {
|
||||||
|
MatrixCursor mc = new MatrixCursor(UIProvider.FOLDERS_PROJECTION, 1);
|
||||||
|
addCombinedInboxRow(mc);
|
||||||
|
return mc;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle UnifiedEmail queries here (dispatched from query())
|
* Handle UnifiedEmail queries here (dispatched from query())
|
||||||
*
|
*
|
||||||
@ -2611,7 +2618,11 @@ outer:
|
|||||||
Uri notifyUri = null;
|
Uri notifyUri = null;
|
||||||
switch(match) {
|
switch(match) {
|
||||||
case UI_FOLDERS:
|
case UI_FOLDERS:
|
||||||
|
if (id.equals(COMBINED_ACCOUNT_ID_STRING)) {
|
||||||
|
c = getCombinedInboxCursor();
|
||||||
|
} else {
|
||||||
c = db.rawQuery(genQueryAccountMailboxes(uiProjection), new String[] {id});
|
c = db.rawQuery(genQueryAccountMailboxes(uiProjection), new String[] {id});
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case UI_RECENT_FOLDERS:
|
case UI_RECENT_FOLDERS:
|
||||||
c = db.rawQuery(genQueryRecentMailboxes(uiProjection), new String[] {id});
|
c = db.rawQuery(genQueryRecentMailboxes(uiProjection), new String[] {id});
|
||||||
@ -2640,9 +2651,7 @@ outer:
|
|||||||
break;
|
break;
|
||||||
case UI_FOLDER:
|
case UI_FOLDER:
|
||||||
if (id.equals(combinedMailboxId(Mailbox.TYPE_INBOX))) {
|
if (id.equals(combinedMailboxId(Mailbox.TYPE_INBOX))) {
|
||||||
MatrixCursor mc = new MatrixCursor(UIProvider.FOLDERS_PROJECTION, 1);
|
c = getCombinedInboxCursor();
|
||||||
addCombinedInboxRow(mc);
|
|
||||||
c = mc;
|
|
||||||
} else {
|
} else {
|
||||||
c = db.rawQuery(genQueryMailbox(uiProjection, id), new String[] {id});
|
c = db.rawQuery(genQueryMailbox(uiProjection, id), new String[] {id});
|
||||||
notifyUri = UIPROVIDER_FOLDER_NOTIFIER.buildUpon().appendPath(id).build();
|
notifyUri = UIPROVIDER_FOLDER_NOTIFIER.buildUpon().appendPath(id).build();
|
||||||
|
Loading…
Reference in New Issue
Block a user