在窗口小部件裏快速設置如何默認同步關閉

[DESCRIPTION]

MTK窗口小部件裏快速設置如何默認同步關閉


[SOLUTION]

在JB版本是由SyncStorageEngine.Java (alps\php?mod=tag&id=6090" target="_blank" class="relatedlink">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;

這樣就默認是關閉了。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章