get setting values.
authorTrillGates <williamtrillgates@gmail.com>
Fri, 23 Apr 2021 01:41:55 +0000 (09:41 +0800)
committerTrillGates <williamtrillgates@gmail.com>
Fri, 23 Apr 2021 01:41:55 +0000 (09:41 +0800)
app/release/ICSer_V777_2104161453_release.apk [new file with mode: 0644]
app/release/output.json
app/src/main/java/com/enqualcomm/support/CoreService.java
app/src/main/java/com/enqualcomm/support/LocationClient.java
app/src/main/java/com/enqualcomm/support/bean/Runtime.java
app/src/main/java/com/enqualcomm/support/provider/FZDDatabaseHelper.java
app/src/main/java/com/enqualcomm/support/provider/FZDMembersProvider.java
app/version_code.properties

diff --git a/app/release/ICSer_V777_2104161453_release.apk b/app/release/ICSer_V777_2104161453_release.apk
new file mode 100644 (file)
index 0000000..cf212ea
Binary files /dev/null and b/app/release/ICSer_V777_2104161453_release.apk differ
index 4370e5d..e45137e 100644 (file)
@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":776,"versionName":"2104151936","enabled":true,"outputFile":"ICSer_V776_2104151936_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V776_2104151936_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":777,"versionName":"2104161453","enabled":true,"outputFile":"ICSer_V777_2104161453_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V777_2104161453_release.apk","properties":{}}]
\ No newline at end of file
index 0615649..ad63007 100644 (file)
@@ -859,7 +859,6 @@ public class CoreService extends Service {
         this.invokeHandlerServiceChain.processAttach(this.connection, this.runtime);
 //        setAlarm(alarmCycle);
 
-
 //        if (Config.LOG_TOFILE)  FileOutputUtil.fileOutput(runtime.getCacheDir(), "log", "初始化网络协议服务");
         this.locationClient = new LocationClient(this.connection, this.runtime);
         this.connection.open();
@@ -867,10 +866,7 @@ public class CoreService extends Service {
         //启动inner Service
         startService(new Intent(this, InnerService.class));
 
-
         this.locationClient.init();
-
-
         //设置本service为前台运行,不被会被清理
         Notification notification = new Notification();
         notification.flags = Notification.FLAG_ONGOING_EVENT;
@@ -998,12 +994,10 @@ public class CoreService extends Service {
 
         //重置缓存中的在等待命令
         Deliver.resetCMDReocrdsDB();
-
         ReConnectToServer();
     }
 
     private void test() {
-
         ICLogger.i("周一清除所有睡眠数据Record");
         runtime.getDbHelper().deleteSleepData();
     }
index a426f6a..6bf6023 100644 (file)
@@ -12,7 +12,6 @@ import android.os.SystemClock;
 
 import com.enqualcomm.support.adapter.BTHelper;
 import com.enqualcomm.support.adapter.LBSHelper;
-import com.enqualcomm.support.bean.EventLooperHandlerThread;
 import com.enqualcomm.support.bean.ICLocation;
 import com.enqualcomm.support.bean.Runtime;
 import com.enqualcomm.support.bean.StringMessage;
@@ -858,7 +857,9 @@ public class LocationClient {
 
 
     public PowerManager.WakeLock getLocationWakeLock() {
-        PowerManager.WakeLock wakeLock = ((PowerManager) (runtime.getContextProxy()).context.getSystemService(Context.POWER_SERVICE)).newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, this.getClass().getSimpleName());
+        PowerManager.WakeLock wakeLock = ((PowerManager) (runtime.getContextProxy())
+                .context.getSystemService(Context.POWER_SERVICE)).newWakeLock(
+                        PowerManager.PARTIAL_WAKE_LOCK, this.getClass().getSimpleName());
         wakeLock.acquire(1000L);
         return wakeLock;
     }
index a27eb51..be07247 100644 (file)
@@ -2,11 +2,15 @@ package com.enqualcomm.support.bean;
 
 
 import android.content.Context;
+import android.database.Cursor;
+import android.net.Uri;
 import android.os.RemoteCallbackList;
 
 import com.enqualcomm.support.Config;
 import com.enqualcomm.support.IFZDCallback;
 import com.enqualcomm.support.adapter.LBSHelper;
+import com.enqualcomm.support.provider.FZDDatabaseHelper;
+import com.enqualcomm.support.provider.FZDSettingsProvider;
 import com.enqualcomm.support.utils.ContextProxy;
 import com.enqualcomm.support.utils.DBHelper;
 import com.enqualcomm.support.utils.DnsUtil;
@@ -400,8 +404,25 @@ public class Runtime {
     }
 
 
-    public void updateFZDDevStatusLowbat(boolean lowbattery) {
+    private String getSettingsValue(String key) {
+        Cursor query = contextProxy.getResolver().query(Uri.parse(FZDSettingsProvider.SETTINGS),
+                new String[]{FZDDatabaseHelper.sValue},
+                FZDDatabaseHelper.sKey + "=?", new String[]{
+                        key
+                }, null);
+        if (query != null) {
+            if (query.moveToNext()) {
+                return query.getString(0);
+            }
+            query.close();
+        }
+        return null;
+    }
 
+
+    //TODO:要判断是否开启低电量报警
+    public void updateFZDDevStatusLowbat(boolean lowbattery) {
+        //TODO:
         if (lowbattery) {
             fzdDevStatus |= 0x00000001;
             fzdDevStatus |= 0x00020000;
@@ -411,6 +432,7 @@ public class Runtime {
         }
     }
 
+    //TODO:要判断是否支持防摘报警
     public void updateFZDDevStatusWeared(boolean weared) {
         if (weared) {
             fzdDevStatus |= 0x00000008;
@@ -419,6 +441,7 @@ public class Runtime {
         }
     }
 
+
     public void updateFZDDevStatusMoving(boolean moving) {
         if (moving) {
             fzdDevStatus &= ~0x00000010;
@@ -461,6 +484,7 @@ public class Runtime {
                 fzdDevStatus |= 0x00100000;
                 break;
             case ALARM_FALL:
+                //TODO:判断是否需要监听跌到的状态上报
                 fzdDevStatus |= 0x00200000;
                 break;
             case ALARM_ABNORMAL_HEART_RATE:
index 4f75feb..ed34b72 100644 (file)
@@ -41,6 +41,7 @@ public class FZDDatabaseHelper extends SQLiteOpenHelper {
     }
 
     public interface MessageType {
+        int FRIEND_VOICE = 0;
         int VOICE = 1;
         int TEXT = 2;
         int PIC = 3;
index 24c9c87..14fff4d 100644 (file)
@@ -15,10 +15,9 @@ public class FZDMembersProvider extends ContentProvider {
     private static final int MATH_CODE_TABLE = 1;
 
     public static final String PATH = "members";
-    public static final String AUTHORITY = "com.ic.fzd.video-call";
+    public static final String AUTHORITY = "com.ic.fzd.members";
     public static final String MEMBERS = "content://" + AUTHORITY + "/" + PATH;
 
-
     static {
         sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
         sUriMatcher.addURI(AUTHORITY, PATH, MATH_CODE_TABLE);
index 9e9dcc9..48e635c 100644 (file)
@@ -1,2 +1,2 @@
-#Thu Apr 15 19:36:29 CST 2021
-VERSION_CODE=776
+#Fri Apr 16 14:53:25 CST 2021
+VERSION_CODE=777