添加了电话权限
authorTrillGates <williamtrillgates@gmail.com>
Thu, 28 Oct 2021 08:46:08 +0000 (16:46 +0800)
committerTrillGates <williamtrillgates@gmail.com>
Thu, 28 Oct 2021 08:46:08 +0000 (16:46 +0800)
app/release/ICSOS_V7_2110281634_release.apk [moved from app/release/ICSOS_V6_2110270942_release.apk with 58% similarity]
app/release/output-metadata.json
app/src/main/AndroidManifest.xml
app/src/main/java/com/ic/sos/SOSPresenter.java
app/version_code.properties

similarity index 58%
rename from app/release/ICSOS_V6_2110270942_release.apk
rename to app/release/ICSOS_V7_2110281634_release.apk
index abc3fc1..98e9ad2 100644 (file)
Binary files a/app/release/ICSOS_V6_2110270942_release.apk and b/app/release/ICSOS_V7_2110281634_release.apk differ
index 3a88a99..38c2e25 100644 (file)
@@ -12,7 +12,7 @@
       "filters": [],
       "versionCode": 1,
       "versionName": "1.0",
-      "outputFile": "ICSOS_V6_2110270942_release.apk"
+      "outputFile": "ICSOS_V7_2110281634_release.apk"
     }
   ]
 }
\ No newline at end of file
index c2fee61..463bccc 100644 (file)
@@ -8,6 +8,7 @@
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.WRITE_SETTINGS" />
     <uses-permission android:name="android.permission.CALL_PRIVILEGED" />
+    <uses-permission android:name="android.permission.CALL_PHONE" />
 
     <application
         android:name=".App"
index fbae97e..fe9b611 100644 (file)
@@ -77,7 +77,9 @@ public class SOSPresenter {
         @Override
         public void onChange(boolean selfChange) {
             handler.post(() -> {
-                sosTask();
+                if (phoneNumList != null && phoneNumList.size() == 0) {
+                    sosTask();
+                }
             });
         }
     };
@@ -304,7 +306,9 @@ public class SOSPresenter {
                     .getMethod("getService", String.class);
             IBinder binder = (IBinder) method.invoke(null, new Object[]{Context.TELEPHONY_SERVICE});
             ITelephony telephony = ITelephony.Stub.asInterface(binder);
-            telephony.endCall();
+            if (telephony != null) {
+                telephony.endCall();
+            }
         } catch (Exception e) {
             e.printStackTrace();
         }
index db72ccb..4948920 100644 (file)
@@ -1,2 +1,2 @@
-#Wed Oct 27 09:42:49 CST 2021
-VERSION_CODE=6
+#Thu Oct 28 16:34:22 CST 2021
+VERSION_CODE=7