ensure that search mailboxes don't have parents
This causes issues in the mailbox list when trying to auto navigate to a search mailbox Change-Id: Ie4e43f20ec662a7c9304dd906ba5a58560cba9f5
This commit is contained in:
parent
0b34643204
commit
f62fd3fd17
@ -271,6 +271,7 @@ public class Controller {
|
||||
m.mSyncInterval = Mailbox.CHECK_INTERVAL_NEVER;
|
||||
m.mType = Mailbox.TYPE_SEARCH;
|
||||
m.mFlags = Mailbox.FLAG_HOLDS_MAIL;
|
||||
m.mParentKey = Mailbox.NO_MAILBOX;
|
||||
m.save(mProviderContext);
|
||||
}
|
||||
return m;
|
||||
@ -911,7 +912,11 @@ public class Controller {
|
||||
} else {
|
||||
// This is the actual mailbox we'll be searching
|
||||
Mailbox actualMailbox = Mailbox.restoreMailboxWithId(mContext, searchParams.mMailboxId);
|
||||
if (actualMailbox == null) return;
|
||||
if (actualMailbox == null) {
|
||||
Log.e(Logging.LOG_TAG, "Unable to find mailbox " + searchParams.mMailboxId
|
||||
+ " to search in with " + searchParams);
|
||||
return;
|
||||
}
|
||||
|
||||
// Delete existing contents of search mailbox
|
||||
ContentResolver resolver = mContext.getContentResolver();
|
||||
|
Loading…
Reference in New Issue
Block a user