Skip to content

Commit f389f28

Browse files
author
Jean-Baptiste Queru
committed
resolved conflicts for merge of 7749a1c to jb-mr1-dev
Change-Id: If30a6a4ded996749b34f6a975481a97006cbcf97
2 parents 5575e97 + 7749a1c commit f389f28

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

core/java/android/content/SyncStorageEngine.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
import android.accounts.Account;
2727
import android.accounts.AccountAndUser;
28+
import android.content.res.Resources;
2829
import android.database.Cursor;
2930
import android.database.sqlite.SQLiteDatabase;
3031
import android.database.sqlite.SQLiteException;
@@ -336,6 +337,7 @@ interface OnSyncRequestListener {
336337

337338
private int mNextHistoryId = 0;
338339
private SparseArray<Boolean> mMasterSyncAutomatically = new SparseArray<Boolean>();
340+
private boolean mDefaultMasterSyncAutomatically;
339341

340342
private OnSyncRequestListener mSyncRequestListener;
341343

@@ -345,6 +347,9 @@ private SyncStorageEngine(Context context, File dataDir) {
345347

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

350+
mDefaultMasterSyncAutomatically = mContext.getResources().getBoolean(
351+
com.android.internal.R.bool.config_syncstorageengine_masterSyncAutomatically);
352+
348353
File systemDir = new File(dataDir, "system");
349354
File syncDir = new File(systemDir, "sync");
350355
syncDir.mkdirs();
@@ -780,7 +785,7 @@ public void setMasterSyncAutomatically(boolean flag, int userId) {
780785
public boolean getMasterSyncAutomatically(int userId) {
781786
synchronized (mAuthorities) {
782787
Boolean auto = mMasterSyncAutomatically.get(userId);
783-
return auto == null ? true : auto;
788+
return auto == null ? mDefaultMasterSyncAutomatically : auto;
784789
}
785790
}
786791

core/res/res/values/config.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,9 @@
919919
<!-- Set to true to add links to Cell Broadcast app from Settings and MMS app. -->
920920
<bool name="config_cellBroadcastAppLinks">false</bool>
921921

922+
<!-- The default value if the SyncStorageEngine should sync automatically or not -->
923+
<bool name="config_syncstorageengine_masterSyncAutomatically">true</bool>
924+
922925
<!-- Maximum number of supported users -->
923926
<integer name="config_multiuserMaximumUsers">10</integer>
924927
</resources>

core/res/res/values/public.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@
255255
<java-symbol type="bool" name="config_sms_capable" />
256256
<java-symbol type="bool" name="config_sms_utf8_support" />
257257
<java-symbol type="bool" name="config_swipeDisambiguation" />
258+
<java-symbol type="bool" name="config_syncstorageengine_masterSyncAutomatically" />
258259
<java-symbol type="bool" name="config_telephony_use_own_number_for_voicemail" />
259260
<java-symbol type="bool" name="config_ui_enableFadingMarquee" />
260261
<java-symbol type="bool" name="config_use_strict_phone_number_comparation" />

0 commit comments

Comments
 (0)