微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 手机设计讨论 > MTK手机平台交流 > FDN开启后手机仍然能够上网

FDN开启后手机仍然能够上网

时间:10-02 整理:3721RD 点击:
[DESCRIPTION]
FDN功能开启,并且在FDN list中没有"*99#",手机却依然能够上网
[SOLUTION]
目前mtk原始设计遵循大部分客户的需求,FDN开启与否不影响上网功能;
若需要在FDN开启的情况下禁止手机上网功能,需要有L4 license,可见L4 code;
1、Modem 中需要修改如下:
修改modem source code modem\l4\l4c\src\common\l4c_utility.c 文件中的l4_custom_approval_type()函数返回值。
保整返回值为 return APPROVAL_TYPE_FULL;
2、4G 项目还需要在AP端修改两处:
1>./alps/php?mod=tag&id=6090" target="_blank" class="relatedlink">Frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DcTracker.java文件内
private void onFdnChanged() {
if (mGSMDCTExt.isFdnEnableSupport()) {
log("onFdnChanged");
if (getFdnStatus()) {
if(hasSpecialNumber())
{
log("fdn enalbed and hasSpecialNumber setupDataOnConnectableApns!");
setupDataOnConnectableApns(Phone.REASON_FDN_DISABLED);
}
else{
log("fdn enabled and do not hasSpecialNumber , cleanUpAllConnections!");
cleanUpAllConnections(true, Phone.REASON_FDN_ENABLED);
}
} else {
log("fdn disabled, setupDataOnConnectableApns!");
setupDataOnConnectableApns(Phone.REASON_FDN_DISABLED);
}
} else {
log("not support fdn enabled, skip onFdnChanged");
}
}
And here is sample code for you to implement how to judge there exist a *99# in FDN list, you can refer to that.
ContentResolver resolver = getContentResolver();
Cursor cursor = null;
private static final String[] COLUMN_NAMES = new String[] {
"index"/*MTK*/,
"name",
"number"
};
private Uri getUri(int SIMId){
if (FeatureOption.MTK_GEMINI_SUPPORT){
if(simId == 0){
return Uri.parse("content://icc/fdn1");
}else if(simId == 1){
return Uri.parse("content://icc/fdn2");
}else{
return Uri.parse("content://icc/fdn");
}
}else{
return Uri.parse("content://icc/fdn");
}
}
public Boolean hasSpecialNumber(int simId){
Boolean hasNumber = false;
try {
cursor = resolver.query(getUri(simId), COLUMN_NAMES, null, null, null);
if (cursor != null){
cursor.moveToFirst();
do {
number = cursor.getString(2);
if(number.equals("*99#"){
hasNumber = true;
}
} while (cursor.moveToNext());
}
} catch (Exception e) {
Log.w(TAG, "Exception thrown during hasSpecialNumber", e);
} finally{
if (cursor != null){
cursor.close();
}
}
return hasNumber;
}
2>.
public boolean isFdnEnableSupport() {
// Default is return false, set to true if needed
return true;
}

。。

    支持

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top