From 207a35f174a1004c6431b2e336d9ff29db47d0f5 Mon Sep 17 00:00:00 2001 From: Tony Mantler Date: Fri, 22 Aug 2014 14:28:41 -0700 Subject: [PATCH] Fix search mailbox status on early-out when searching b/17109656 Change-Id: I8ff643d57a461d81519da65d017c8c3cc95c5659 --- src/com/android/email/service/ImapService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/android/email/service/ImapService.java b/src/com/android/email/service/ImapService.java index 5abd05d91..71d07fd80 100644 --- a/src/com/android/email/service/ImapService.java +++ b/src/com/android/email/service/ImapService.java @@ -1505,6 +1505,10 @@ public class ImapService extends Service { Math.min(numSearchResults - searchParams.mOffset, searchParams.mLimit); destMailbox.updateMessageCount(context, numSearchResults); if (numToLoad <= 0) { + // Tell UI that we're done loading messages + statusValues.put(Mailbox.SYNC_TIME, System.currentTimeMillis()); + statusValues.put(Mailbox.UI_SYNC_STATUS, UIProvider.SyncStatus.NO_SYNC); + destMailbox.update(context, statusValues); return 0; }