From dab90a7b350e9c7dc23d501f12a40060d7178763 Mon Sep 17 00:00:00 2001 From: Andy Stadler Date: Wed, 6 May 2009 17:50:29 -0700 Subject: [PATCH] AI 148377: Push Mode changes: (1) Add android.permission.WAKE_LOCK and READ_PHONE_STATE so a push mode service can hold an active network connection, monitor roaming status, etc. (2) Refresh push mode status on Refresh(), not just on Check, so UI (settings) changes, which call refresh(), propagate immediately to the stores. BUG=1776149 Automated import of CL 148377 --- AndroidManifest.xml | 5 +++++ src/com/android/email/service/MailService.java | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index b1fc4fdf1..ed0ef5368 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -22,6 +22,11 @@ + + + + + 0 - && (account.getAutomaticCheckIntervalMinutes() < shortestInterval || shortestInterval == -1)) { - shortestInterval = account.getAutomaticCheckIntervalMinutes(); + int interval = account.getAutomaticCheckIntervalMinutes(); + if (interval > 0 && (interval < shortestInterval || shortestInterval == -1)) { + shortestInterval = interval; } + enablePushMail(account, interval == Account.CHECK_INTERVAL_PUSH); } if (shortestInterval == -1) {