From: SnickerSun Date: Thu, 26 Aug 2021 13:37:09 +0000 (+0800) Subject: release protocolV2 V897 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=2a477db475bf42715f2f12109d48f08977977261;p=icsupport.git release protocolV2 V897 修复apn设置查询语句错误 --- diff --git a/app/release/ICSer_V896_2108262106_release.apk b/app/release/ICSer_V897_2108262136_release.apk similarity index 78% rename from app/release/ICSer_V896_2108262106_release.apk rename to app/release/ICSer_V897_2108262136_release.apk index 1e35e57e..2cbb7105 100644 Binary files a/app/release/ICSer_V896_2108262106_release.apk and b/app/release/ICSer_V897_2108262136_release.apk differ diff --git a/app/release/output.json b/app/release/output.json index 07aff077..5da0ef2e 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -1 +1 @@ -[{"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 diff --git a/app/src/main/java/com/enqualcomm/support/utils/APNUtil.java b/app/src/main/java/com/enqualcomm/support/utils/APNUtil.java index d559038a..df76bf76 100644 --- a/app/src/main/java/com/enqualcomm/support/utils/APNUtil.java +++ b/app/src/main/java/com/enqualcomm/support/utils/APNUtil.java @@ -58,12 +58,12 @@ public class APNUtil { 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 添加成功!"); @@ -93,7 +93,7 @@ public class APNUtil { 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(); diff --git a/app/src/main/java/com/enqualcomm/support/utils/ApnEditor.java b/app/src/main/java/com/enqualcomm/support/utils/ApnEditor.java index c2d231ee..0120aeb6 100644 --- a/app/src/main/java/com/enqualcomm/support/utils/ApnEditor.java +++ b/app/src/main/java/com/enqualcomm/support/utils/ApnEditor.java @@ -301,7 +301,7 @@ public class ApnEditor { 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); @@ -328,7 +328,7 @@ public class ApnEditor { 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); @@ -352,7 +352,7 @@ public class ApnEditor { 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); diff --git a/app/version_code.properties b/app/version_code.properties index e287aa48..e7588a14 100644 --- a/app/version_code.properties +++ b/app/version_code.properties @@ -1,2 +1,2 @@ -#Thu Aug 26 21:06:10 CST 2021 -VERSION_CODE=896 +#Thu Aug 26 21:36:16 CST 2021 +VERSION_CODE=897