release protocolV2 V897
authorSnickerSun <scy@incartech.cn>
Thu, 26 Aug 2021 13:37:09 +0000 (21:37 +0800)
committerSnickerSun <scy@incartech.cn>
Thu, 26 Aug 2021 13:37:09 +0000 (21:37 +0800)
修复apn设置查询语句错误

app/release/ICSer_V897_2108262136_release.apk [moved from app/release/ICSer_V896_2108262106_release.apk with 78% similarity]
app/release/output.json
app/src/main/java/com/enqualcomm/support/utils/APNUtil.java
app/src/main/java/com/enqualcomm/support/utils/ApnEditor.java
app/version_code.properties

similarity index 78%
rename from app/release/ICSer_V896_2108262106_release.apk
rename to app/release/ICSer_V897_2108262136_release.apk
index 1e35e57..2cbb710 100644 (file)
Binary files a/app/release/ICSer_V896_2108262106_release.apk and b/app/release/ICSer_V897_2108262136_release.apk differ
index 07aff07..5da0ef2 100644 (file)
@@ -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
index d559038..df76bf7 100644 (file)
@@ -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();
index c2d231e..0120aeb 100644 (file)
@@ -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);
index e287aa4..e7588a1 100644 (file)
@@ -1,2 +1,2 @@
-#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