Handle internal push states when showing sync interval
* We turn them into "push", which is the external representation of those states (ping and push/hold) Bug: 5327559 Change-Id: I843f37e4619f1c33cdafbf8a3a6a39abb8e8834c
This commit is contained in:
parent
7683a43117
commit
a49da87191
@ -222,15 +222,23 @@ public class MailboxSettings extends PreferenceActivity {
|
||||
* @return current sync interval setting from the objects
|
||||
*/
|
||||
private int getSyncInterval() {
|
||||
int syncInterval;
|
||||
if (mMailbox.mType == Mailbox.TYPE_INBOX) {
|
||||
return mAccount.mSyncInterval;
|
||||
syncInterval = mAccount.mSyncInterval;
|
||||
} else {
|
||||
if (mMailbox.mSyncInterval == 0) {
|
||||
// 0 is the default value, and it means "don't sync" (for non-inbox mailboxes)
|
||||
return Mailbox.CHECK_INTERVAL_NEVER;
|
||||
syncInterval = Mailbox.CHECK_INTERVAL_NEVER;
|
||||
} else {
|
||||
syncInterval = mMailbox.mSyncInterval;
|
||||
}
|
||||
return mMailbox.mSyncInterval;
|
||||
}
|
||||
// In the case of the internal push states, use "push"
|
||||
if (syncInterval == Mailbox.CHECK_INTERVAL_PING ||
|
||||
syncInterval == Mailbox.CHECK_INTERVAL_PUSH_HOLD) {
|
||||
syncInterval = Mailbox.CHECK_INTERVAL_PUSH;
|
||||
}
|
||||
return syncInterval;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user