首页 > 代码库 > Android 数据连接关闭的情况下如何让彩信发不出去
Android 数据连接关闭的情况下如何让彩信发不出去
alps\frameworks\base\services\java\com\android\server\ConnectivityService.java
如下2个函数的开头加入如下语句:
startUsingNetworkFeature()
startUsingNetworkFeatureGemini()
int currentDataConnectionSimId = -1;
if(FeatureOption.MTK_GEMINI_ENHANCEMENT == true){
long currentDataConnectionMultiSimId = Settings.System.getLong(mContext.getContentResolver(), Settings.System.GPRS_CONNECTION_SIM_SETTING, Settings.System.DEFAULT_SIM_NOT_SET);
currentDataConnectionSimId = SIMInfo.getSlotById(mContext, currentDataConnectionMultiSimId);
}else{
currentDataConnectionSimId = Settings.System.getInt(mContext.getContentResolver(), GPRS_CONNECTION_SETTING, GPRS_CONNECTION_SETTING_DEFAULT) - 1;
}
if(currentDataConnectionSimId < 0){
return Phone.APN_REQUEST_FAILED;
}
如下2个函数的开头加入如下语句:
startUsingNetworkFeature()
startUsingNetworkFeatureGemini()
int currentDataConnectionSimId = -1;
if(FeatureOption.MTK_GEMINI_ENHANCEMENT == true){
long currentDataConnectionMultiSimId = Settings.System.getLong(mContext.getContentResolver(), Settings.System.GPRS_CONNECTION_SIM_SETTING, Settings.System.DEFAULT_SIM_NOT_SET);
currentDataConnectionSimId = SIMInfo.getSlotById(mContext, currentDataConnectionMultiSimId);
}else{
currentDataConnectionSimId = Settings.System.getInt(mContext.getContentResolver(), GPRS_CONNECTION_SETTING, GPRS_CONNECTION_SETTING_DEFAULT) - 1;
}
if(currentDataConnectionSimId < 0){
return Phone.APN_REQUEST_FAILED;
}
Android 数据连接关闭的情况下如何让彩信发不出去
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。