如何默认勾选DATA ROAMING

[DESCRIPTION]
 
     如果客户想默认打开数据漫游开关,即默认勾选DATA ROAMING,则可以按如下方式客制化即可。
 

注意:数据漫游打开后,可能会产生高额的漫遊费用,故目前默认的设置都是将数据漫游关闭。

 
[SOLUTION]
 
 
方法1:
1: 修改文件:
alps\mediatek\config\贵司对应项目 \system.prop
 
2: 增加定义

ro.com.android.dataroaming=true

ro.com.android.dataroaming2=true

 

 

3:修改setting里UI的默认值
      修改  telephony.java  里  SimInfo   类的     
        DATA_ROAMING_DEFAULT = DATA_ROAMING_ENABLE
 
 
方法2:
1: 修改文件 alps/frameworks/base/packages/settingsprovider/src/com/android/providers/settings/DatabaseHelper.java
 
2: 修改Settings.Global.DATA_ROAMING(有些版本是:Settings.Secure.DATA_ROAMING)的值,如下,搜索DATA_ROAMING关键字, 修改对应的loadSetting值,一般位于loadSystemSettings()中,可参考如下方法修改:
 
old:
        // Data roaming default, based on build
        loadSetting(stmt, Settings.Global.DATA_ROAMING,
                    "true".equalsIgnoreCase(
                            SystemProperties.get("ro.com.android.dataroaming",
                                    "false")) ? 1 : 0);
new:
        // Data roaming default, based on build
        loadSetting(stmt, Settings.Global.DATA_ROAMING,1);

         
同理,
 
old:
        // Data roaming default, based on build
        loadSetting(stmt, Settings.Global.DATA_ROAMING_2,
                    "true".equalsIgnoreCase(
                            SystemProperties.get("ro.com.android.dataroaming2",
                                    "false")) ? 1 : 0);
new:
        // Data roaming default, based on build
        loadSetting(stmt, Settings.Global.DATA_ROAMING_2,1);
 

 

3:修改setting里UI的默认值
      修改  telephony.java  里 SimInfo 类的
          DATA_ROAMING_DEFAULT = DATA_ROAMING_ENABLE

你可能感兴趣的:(如何默认勾选DATA ROAMING)