-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":896,"versionName":"2108262106","enabled":true,"outputFile":"ICSer_V896_2108262106_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V896_2108262106_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":897,"versionName":"2108262136","enabled":true,"outputFile":"ICSer_V897_2108262136_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V897_2108262136_release.apk","properties":{}}]
\ No newline at end of file
public static boolean addVPN(String apnName, String apn, String mcc,String mnc , String user,String passwd,Context context) {
if (checkAPN(mcc,mnc,apn,context)==true){
- ICLogger.i("VPN 已经存在,不需要添加!");
+ APNUtil.selectAPN(mcc,mnc,apn, context);
+ ICLogger.i("VPN 已经存在,不需要添加!只是默认选择它");
return false;
}
//添加新的APN到系统
boolean isAddSuccess=AddNewApn(apnName,apn,mcc,mnc,user,passwd,context);
-
if (isAddSuccess) {
APNUtil.selectAPN(mcc,mnc,apn, context);
ICLogger.i("APN 添加成功!");
public static boolean checkAPN(String mcc,String mnc,String apn,Context context) {
// 检查系统已经写入的APN
String found="";
- found+=ApnEditor.getApnEditorInstance(context).queryApn(apn,mcc+mnc);
+ found = ApnEditor.getApnEditorInstance(context).queryApn(apn,mcc+mnc);
ICLogger.i(found);
return !found.isEmpty();
String where;
where = "numeric=\"" + mccmnc + "\"";
where += " and name!='CMCC DM'";
- where += " and apn='"+apn+"'";
+ where += " and type like '%default%' and apn='"+apn+"'";
Log.d(TAG,"where = " + where );
mCursor = mContext.getContentResolver().query(mAPNUri, sProjection, where, null, Telephony.Carriers.DEFAULT_SORT_ORDER);
String where;
where = "numeric=\"" + mccmnc + "\"";
where += " and name!='CMCC DM'";
- where += " and like '%default%' and apn='"+apn+"'";
+ where += " and type like '%default%' and apn='"+apn+"'";
Log.d(TAG,"where = " + where );
mCursor = mContext.getContentResolver().query(mAPNUri, sProjection, where, null, Telephony.Carriers.DEFAULT_SORT_ORDER);
public String queryApn(String mccmnc){
String where;
where = "numeric=\"" + mccmnc + "\"";
- where += " and like '%default%' and name!='CMCC DM'";
+ where += " and type like '%default%' and name!='CMCC DM'";
Log.d(TAG,"where = " + where );
mCursor = mContext.getContentResolver().query(mAPNUri, sProjection, where, null, Telephony.Carriers.DEFAULT_SORT_ORDER);
-#Thu Aug 26 21:06:10 CST 2021\r
-VERSION_CODE=896\r
+#Thu Aug 26 21:36:16 CST 2021\r
+VERSION_CODE=897\r