diff --git a/res/values/constants.xml b/res/values/constants.xml
index e25d009ed..74ce82f68 100644
--- a/res/values/constants.xml
+++ b/res/values/constants.xml
@@ -30,4 +30,10 @@
false
+
+
+ true
+
+
+ true
\ No newline at end of file
diff --git a/src/com/android/email/provider/EmailProvider.java b/src/com/android/email/provider/EmailProvider.java
index 0c93109ae..174a9e49a 100644
--- a/src/com/android/email/provider/EmailProvider.java
+++ b/src/com/android/email/provider/EmailProvider.java
@@ -104,7 +104,6 @@ import com.android.emailcommon.service.IEmailService;
import com.android.emailcommon.service.SearchParams;
import com.android.emailcommon.utility.AttachmentUtilities;
import com.android.emailcommon.utility.EmailAsyncTask;
-import com.android.emailcommon.utility.IntentUtilities;
import com.android.emailcommon.utility.Utility;
import com.android.ex.photo.provider.PhotoContract;
import com.android.mail.preferences.MailPrefs;
@@ -378,12 +377,14 @@ public class EmailProvider extends ContentProvider
private final Set mDelayedSyncRequests = new HashSet();
private static void reconcileAccountsAsync(final Context context) {
- EmailAsyncTask.runAsyncParallel(new Runnable() {
- @Override
- public void run() {
- AccountReconciler.reconcileAccounts(context);
- }
- });
+ if (context.getResources().getBoolean(R.bool.reconcile_accounts)) {
+ EmailAsyncTask.runAsyncParallel(new Runnable() {
+ @Override
+ public void run() {
+ AccountReconciler.reconcileAccounts(context);
+ }
+ });
+ }
}
public static Uri uiUri(String type, long id) {
diff --git a/src/com/android/email2/ui/MailActivityEmail.java b/src/com/android/email2/ui/MailActivityEmail.java
index fae8101c0..97249993d 100644
--- a/src/com/android/email2/ui/MailActivityEmail.java
+++ b/src/com/android/email2/ui/MailActivityEmail.java
@@ -28,6 +28,7 @@ import android.os.Bundle;
import com.android.email.NotificationController;
import com.android.email.Preferences;
+import com.android.email.R;
import com.android.email.provider.EmailProvider;
import com.android.email.service.AttachmentService;
import com.android.email.service.EmailServiceUtils;
@@ -84,12 +85,14 @@ public class MailActivityEmail extends com.android.mail.ui.MailActivity {
* UI thread (or lifecycle entry points.)
*/
public static void setServicesEnabledAsync(final Context context) {
- EmailAsyncTask.runAsyncParallel(new Runnable() {
- @Override
- public void run() {
- setServicesEnabledSync(context);
- }
- });
+ if (context.getResources().getBoolean(R.bool.enable_services)) {
+ EmailAsyncTask.runAsyncParallel(new Runnable() {
+ @Override
+ public void run() {
+ setServicesEnabledSync(context);
+ }
+ });
+ }
}
/**