[DESCRIPTION]
在窗口小部件里快速设置如何默认同步关闭
[SOLUTION]
在JB版本是由SyncStorageEngine.JAVA (alps\frameworks\base\core\java\android\content)中
public boolean getMasterSyncAutomatically(int userId) {
synchronized (mAuthorities) {
Boolean auto = mMasterSyncAutomatically.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());
return auto == null ? false : auto;
} else {
return auto == null ? true : auto;
}
//return auto == null ? mDefaultMasterSyncAutomatically : auto;
}
}
决定的, 如果是CMCC的项目,默认就会是false.这是CMCC需求。
如果不是CMCC定制,可以修改 return auto == null ? true: auto;
为return auto == null ? false: auto;
这样就默认是关闭了。
在窗口小部件里快速设置如何默认同步关闭
最新推荐文章于 2023-07-25 14:05:40 发布