Merge branch 'readonly-p4-donut' into donut

This commit is contained in:
Andy Stadler 2009-05-06 17:51:57 -07:00 committed by The Android Open Source Project
commit 5a376edb5f
2 changed files with 9 additions and 3 deletions

View File

@ -22,6 +22,11 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<!-- Only required if a store implements push mail and needs to keep network open -->
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<permission android:name="com.android.email.permission.READ_ATTACHMENT"
android:permissionGroup="android.permission-group.MESSAGES"
android:protectionLevel="dangerous"

View File

@ -163,10 +163,11 @@ public class MailService extends Service {
int shortestInterval = -1;
for (Account account : Preferences.getPreferences(this).getAccounts()) {
if (account.getAutomaticCheckIntervalMinutes() > 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) {