Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7749a1c5 authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by Android Git Automerger
Browse files

am b4ac801c: am 1ca2fee9: Merge "Make default value of auto-sync in SyncStorageEngine configurable"

* commit 'b4ac801c':
  Make default value of auto-sync in SyncStorageEngine configurable
parents b693f6a9 b4ac801c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import org.xmlpull.v1.XmlSerializer;

import android.accounts.Account;
import android.accounts.AccountAndUser;
import android.content.res.Resources;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
@@ -337,6 +338,7 @@ public class SyncStorageEngine extends Handler {

    private int mNextHistoryId = 0;
    private SparseArray<Boolean> mMasterSyncAutomatically = new SparseArray<Boolean>();
    private boolean mDefaultMasterSyncAutomatically;

    private OnSyncRequestListener mSyncRequestListener;

@@ -346,6 +348,9 @@ public class SyncStorageEngine extends Handler {

        mCal = Calendar.getInstance(TimeZone.getTimeZone("GMT+0"));

        mDefaultMasterSyncAutomatically = mContext.getResources().getBoolean(
               com.android.internal.R.bool.config_syncstorageengine_masterSyncAutomatically);

        File systemDir = new File(dataDir, "system");
        File syncDir = new File(systemDir, "sync");
        syncDir.mkdirs();
@@ -781,7 +786,7 @@ public class SyncStorageEngine extends Handler {
    public boolean getMasterSyncAutomatically(int userId) {
        synchronized (mAuthorities) {
            Boolean auto = mMasterSyncAutomatically.get(userId);
            return auto == null ? true : auto;
            return auto == null ? mDefaultMasterSyncAutomatically : auto;
        }
    }

+3 −0
Original line number Diff line number Diff line
@@ -868,4 +868,7 @@

    <!-- Set to true to add links to Cell Broadcast app from Settings and MMS app. -->
    <bool name="config_cellBroadcastAppLinks">false</bool>

    <!-- The default value if the SyncStorageEngine should sync automatically or not -->
    <bool name="config_syncstorageengine_masterSyncAutomatically">true</bool>
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -253,6 +253,7 @@
  <java-symbol type="bool" name="config_sms_capable" />
  <java-symbol type="bool" name="config_sms_utf8_support" />
  <java-symbol type="bool" name="config_swipeDisambiguation" />
  <java-symbol type="bool" name="config_syncstorageengine_masterSyncAutomatically" />
  <java-symbol type="bool" name="config_telephony_use_own_number_for_voicemail" />
  <java-symbol type="bool" name="config_ui_enableFadingMarquee" />
  <java-symbol type="bool" name="config_use_strict_phone_number_comparation" />