在窗口小部件里快速设置如何默认同步关闭

来源:互联网 发布:淘宝仓库怎么看 编辑:程序博客网 时间:2024/06/12 02:24

在窗口小部件里快速设置如何默认同步关闭

[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;
这样就默认是关闭了。


0 0
原创粉丝点击