Don't show "No messages" when starting a search on Exchange
Also clean up some finals b/11027351 Change-Id: Ib76cc90b04acb531d53b2d6bdc4e3b0ad911f72c
This commit is contained in:
parent
1bccfccd9a
commit
768c6b86db
|
@ -89,6 +89,7 @@ public abstract class EmailContent {
|
|||
public static final int SYNC_STATUS_NONE = UIProvider.SyncStatus.NO_SYNC;
|
||||
public static final int SYNC_STATUS_USER = UIProvider.SyncStatus.USER_REFRESH;
|
||||
public static final int SYNC_STATUS_BACKGROUND = UIProvider.SyncStatus.BACKGROUND_SYNC;
|
||||
public static final int SYNC_STATUS_LIVE = UIProvider.SyncStatus.LIVE_QUERY;
|
||||
|
||||
public static final int LAST_SYNC_RESULT_SUCCESS = UIProvider.LastSyncResult.SUCCESS;
|
||||
public static final int LAST_SYNC_RESULT_AUTH_ERROR = UIProvider.LastSyncResult.AUTH_ERROR;
|
||||
|
|
|
@ -3547,7 +3547,8 @@ public class EmailProvider extends ContentProvider {
|
|||
mailbox.mUiLastSyncResult);
|
||||
mExtras.putInt(UIProvider.CursorExtraKeys.EXTRA_TOTAL_COUNT, mailbox.mTotalCount);
|
||||
if (mailbox.mUiSyncStatus == EmailContent.SYNC_STATUS_BACKGROUND
|
||||
|| mailbox.mUiSyncStatus == EmailContent.SYNC_STATUS_USER) {
|
||||
|| mailbox.mUiSyncStatus == EmailContent.SYNC_STATUS_USER
|
||||
|| mailbox.mUiSyncStatus == EmailContent.SYNC_STATUS_LIVE) {
|
||||
mExtras.putInt(UIProvider.CursorExtraKeys.EXTRA_STATUS,
|
||||
UIProvider.CursorStatus.LOADING);
|
||||
} else if (mailbox.mUiSyncStatus == EmailContent.SYNC_STATUS_NONE) {
|
||||
|
|
|
@ -1427,15 +1427,15 @@ public class ImapService extends Service {
|
|||
|
||||
// Tell UI that we're loading messages
|
||||
|
||||
Store remoteStore = Store.getInstance(account, context);
|
||||
Folder remoteFolder = remoteStore.getFolder(mailbox.mServerId);
|
||||
final Store remoteStore = Store.getInstance(account, context);
|
||||
final Folder remoteFolder = remoteStore.getFolder(mailbox.mServerId);
|
||||
remoteFolder.open(OpenMode.READ_WRITE);
|
||||
|
||||
SortableMessage[] sortableMessages = new SortableMessage[0];
|
||||
if (searchParams.mOffset == 0) {
|
||||
// Get the "bare" messages (basically uid)
|
||||
Message[] remoteMessages = remoteFolder.getMessages(searchParams, null);
|
||||
int remoteCount = remoteMessages.length;
|
||||
final Message[] remoteMessages = remoteFolder.getMessages(searchParams, null);
|
||||
final int remoteCount = remoteMessages.length;
|
||||
if (remoteCount > 0) {
|
||||
sortableMessages = new SortableMessage[remoteCount];
|
||||
int i = 0;
|
||||
|
|
Loading…
Reference in New Issue