Implement "automatic" sync lookback (Email side)
* Update sync window options to include "Automatic" and "All" * Make the default (for new accounts) "Automatic" Change-Id: Icbc696f55abcfad79e66079ebb414ca50778dcaa
This commit is contained in:
parent
c6beaaea59
commit
335a724ee6
|
@ -17,6 +17,7 @@
|
|||
package com.android.emailcommon.service;
|
||||
|
||||
public class SyncWindow {
|
||||
public static final int SYNC_WINDOW_AUTO = -2;
|
||||
public static final int SYNC_WINDOW_USER = -1;
|
||||
public static final int SYNC_WINDOW_UNKNOWN = 0;
|
||||
public static final int SYNC_WINDOW_1_DAY = 1;
|
||||
|
|
|
@ -62,23 +62,25 @@
|
|||
</string-array>
|
||||
|
||||
<!-- Mail sync window sizes for EAS accounts -->
|
||||
<!-- Note, "all" (value 6) is not presented in UI. -->
|
||||
<string-array name="account_settings_mail_window_entries">
|
||||
<item>@string/account_setup_options_mail_window_auto</item>
|
||||
<item>@string/account_setup_options_mail_window_1day</item>
|
||||
<item>@string/account_setup_options_mail_window_3days</item>
|
||||
<item>@string/account_setup_options_mail_window_1week</item>
|
||||
<item>@string/account_setup_options_mail_window_2weeks</item>
|
||||
<item>@string/account_setup_options_mail_window_1month</item>
|
||||
<item>@string/account_setup_options_mail_window_all</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Mail sync window size codes for EAS accounts -->
|
||||
<!-- Note, "all" (value 6) is not presented in UI. -->
|
||||
<string-array name="account_settings_mail_window_values" translatable="false">
|
||||
<item>-2</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
<item>6</item>
|
||||
</string-array>
|
||||
|
||||
<!-- The vibrate notification modes -->
|
||||
|
|
|
@ -730,18 +730,23 @@ save attachment.</string>
|
|||
Automatically download attachments when connected to Wi-Fi</string>
|
||||
<!-- Dialog title when "setup" could not finish -->
|
||||
<string name="account_setup_failed_dlg_title">Setup could not finish</string>
|
||||
<!-- In Account setup options screen, label for email check frequency selector -->
|
||||
<!-- In Account setup options screen, label for email lookback selector -->
|
||||
<string name="account_setup_options_mail_window_label">Amount to synchronize</string>
|
||||
<!-- In account setup options & account settings screens (exchange), sync window length -->
|
||||
<!-- In account setup options & account settings screens (exchange), sync window length; this
|
||||
implies loading a 'reasonable' number of messages [CHAR LIMIT=25] -->
|
||||
<string name="account_setup_options_mail_window_auto">Automatic</string>
|
||||
<!-- A sync window length setting (i.e. load messages this far back) [CHAR LIMIT=25] -->
|
||||
<string name="account_setup_options_mail_window_1day">One day</string>
|
||||
<!-- In account setup options & account settings screens (exchange), sync window length -->
|
||||
<!-- A sync window length setting (i.e. load messages this far back) [CHAR LIMIT=25] -->
|
||||
<string name="account_setup_options_mail_window_3days">Three days</string>
|
||||
<!-- In account setup options & account settings screens (exchange), sync window length -->
|
||||
<!-- A sync window length setting (i.e. load messages this far back) [CHAR LIMIT=25] -->
|
||||
<string name="account_setup_options_mail_window_1week">One week</string>
|
||||
<!-- In account setup options & account settings screens (exchange), sync window length -->
|
||||
<!-- A sync window length setting (i.e. load messages this far back) [CHAR LIMIT=25] -->
|
||||
<string name="account_setup_options_mail_window_2weeks">Two weeks</string>
|
||||
<!-- In account setup options & account settings screens (exchange), sync window length -->
|
||||
<!-- A sync window length setting (i.e. load messages this far back) [CHAR LIMIT=25] -->
|
||||
<string name="account_setup_options_mail_window_1month">One month</string>
|
||||
<!-- A sync window length setting (i.e. load messages this far back) [CHAR LIMIT=25] -->
|
||||
<string name="account_setup_options_mail_window_all">All</string>
|
||||
|
||||
<!-- "Setup could not finish" dialog text; e.g., Username or password incorrect -->
|
||||
<string name="account_setup_failed_dlg_auth_message">Username or password incorrect.</string>
|
||||
|
|
|
@ -69,7 +69,9 @@ public class AccountSetupOptions extends AccountSetupActivity implements OnClick
|
|||
public static final int REQUEST_CODE_ACCEPT_POLICIES = 1;
|
||||
|
||||
/** Default sync window for new EAS accounts */
|
||||
private static final int SYNC_WINDOW_EAS_DEFAULT = SyncWindow.SYNC_WINDOW_3_DAYS;
|
||||
// STOPSHIP Change default for now to auto
|
||||
private static final int SYNC_WINDOW_EAS_DEFAULT = SyncWindow.SYNC_WINDOW_AUTO;
|
||||
// Was SYNC_WINDOW_3_DAYS;
|
||||
|
||||
public static void actionOptions(Activity fromActivity) {
|
||||
fromActivity.startActivity(new Intent(fromActivity, AccountSetupOptions.class));
|
||||
|
|
Loading…
Reference in New Issue