Enable "auto-refresh" for EAS accounts as well.

bug 2990997

Change-Id: Ia8481c806ee6f2e8d9308dacee67c982e1caaa69
This commit is contained in:
Makoto Onuki 2010-09-13 16:16:28 -07:00
parent d4aac1e847
commit fe7dd2df56

View File

@ -711,13 +711,12 @@ public class MessageListFragment extends ListFragment
* multiple conditions are true, including: * multiple conditions are true, including:
* Only refreshable mailboxes. * Only refreshable mailboxes.
* Only when the user explicitly opens the mailbox (not onResume, for example) * Only when the user explicitly opens the mailbox (not onResume, for example)
* Only for real, non-push mailboxes (c.f. manual refresh is still enabled for push accounts)
* Only when the mailbox is "stale" (currently set to 5 minutes since last refresh) * Only when the mailbox is "stale" (currently set to 5 minutes since last refresh)
* Note we do this even if it's a push account; even on Exchange only inbox can be pushed.
*/ */
private void autoRefreshStaleMailbox() { private void autoRefreshStaleMailbox() {
if (!mDoAutoRefresh // Not explicitly open if (!mDoAutoRefresh // Not explicitly open
|| !mIsRefreshable // Not refreshable (special box such as drafts, or magic boxes) || !mIsRefreshable // Not refreshable (special box such as drafts, or magic boxes)
|| (mAccount.mSyncInterval == Account.CHECK_INTERVAL_PUSH) // Push account
) { ) {
return; return;
} }