After the first boot, choose Settings> More> traffic usage> option> automatic data synchronization. How can I change the default status?
Find the SyncStorageEngine. java file (alpsrameworksasecorejavaandroidcontent)
In versions earlier than JB (excluding JB), automatic synchronization is performed by default. If this parameter is set to False, automatic synchronization is not performed.
MMasterSyncAutomatically = Ture-"False
In Versions later than JB (including JB), you need to make the following changes:
1. public boolean getMasterSyncAutomatically (int userId ){
Synchronized (mAuthorities ){
Boolean auto =. get (userId );
Log. d (TAG, userId = + userId + auto = + auto + mExt = + mExt );
If (mExt! = Null & mExt. getCurrentOPIndex () = 1 ){
/// M: add for cmccc when there is no account default auto sync is off
Log. d (TAG, mExt. getCurrentOPIndex () = + mExt. getCurrentOPIndex ());
// If the CMCC project is modified, the original value is false. Change it to true. Thank you!
Return auto = null? False: auto;
// Modification ended
} Else {
// If the project is not CMCC, It is selected by default. If it is not synchronized by default, it must be changed to false.
Return auto = null? True: auto;
}
// Return auto = null? Mdefamastermastersyncautomatically: auto;
}
}
2. private void readAccountInfoLocked (){
...
MMasterSyncAutomatically. put (0, listen = null | Boolean. parseBoolean (listen ));
To:
MMasterSyncAutomatically. put (0, Boolean. parseBoolean (listen ));
After modification, try again.