fixed gator sos phone num call.
authorTrillGates <williamtrillgates@gmail.com>
Mon, 13 Sep 2021 02:10:39 +0000 (10:10 +0800)
committerTrillGates <williamtrillgates@gmail.com>
Mon, 13 Sep 2021 02:10:39 +0000 (10:10 +0800)
app/release/ICSer_V951_2109101758_release.apk [moved from app/release/ICSer_V947_2109081949_release.apk with 77% similarity]
app/release/output.json
app/src/main/java/com/enqualcomm/support/service/WeTalkMsgObserver.java
app/src/main/java/com/enqualcomm/support/utils/ProcessReceiver.java
app/src/main/java/com/ic/protocols/protocol_fzd.java
app/src/main/java/com/ic/protocols/protocol_gator.java
app/src/main/java/com/ic/protocols/protocol_s123.java
app/version_code.properties

similarity index 77%
rename from app/release/ICSer_V947_2109081949_release.apk
rename to app/release/ICSer_V951_2109101758_release.apk
index ce76cf4..8a99b75 100644 (file)
Binary files a/app/release/ICSer_V947_2109081949_release.apk and b/app/release/ICSer_V951_2109101758_release.apk differ
index d3900c2..f384e32 100644 (file)
@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":947,"versionName":"2109081949","enabled":true,"outputFile":"ICSer_V947_2109081949_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V947_2109081949_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":951,"versionName":"2109101758","enabled":true,"outputFile":"ICSer_V951_2109101758_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V951_2109101758_release.apk","properties":{}}]
\ No newline at end of file
index 7e4c678..f211e38 100644 (file)
@@ -42,6 +42,7 @@ public class WeTalkMsgObserver extends ContentObserver {
                 //对方的ID,如果这个为null,那么则是群聊
                 //否则是单聊
                 String remoteNum = query.getString(query.getColumnIndex("remote_num"));
+                ICLogger.d("remoteNum ==> " + remoteNum);
                 int duration = query.getInt(query.getColumnIndex("duration"));
                 ICLogger.d("content --- > " + content);
                 //todo:还有类型也要查询出来
index 91ea611..7331877 100644 (file)
@@ -376,8 +376,6 @@ public class ProcessReceiver extends BroadcastReceiver {
                 ICLogger.i("receive taken photo to send " + msgUrl);
                 //创建voiceConent并添加到数据
                 final VoiceContent voiceContent = VoiceContent.placeHolderOut(CONTACT_CATEGORY_GROUP, msgFrom, "0000", msgUrl, 2, 2);
-
-
                 // 把voiceContent拆解成1024的分包
                 Util.parseToVoicePacketSent(voiceContent, 1024);
                 //trigger 分包发送
@@ -399,10 +397,7 @@ public class ProcessReceiver extends BroadcastReceiver {
                 }
 
             }
-
-
             return;
-
         } else if (DIALOG_ACTION.equals(str)) {
             if (paramIntent.hasExtra("contact")) {
                 contact = (Contact) paramIntent.getParcelableExtra("contact");
index 9085ca4..6285d61 100644 (file)
@@ -734,6 +734,7 @@ public class protocol_fzd {
             message2Db(remoteId, amrFilepath, ICDatabaseHelper.MessageType.VOICE);
             //返回结果
             mConnection.send(TKOne("1"));
+            mConnection.DeliverCMDMessageToSystem("NewVoice", amrFilepath);//通知下面线程状态变化
         } catch (Exception e) {
             e.printStackTrace();
             mConnection.send(TKOne("0"));
index ee58d4d..45902ff 100644 (file)
@@ -644,8 +644,6 @@ public class protocol_gator {
             ICLogger.e("AP06 format error!");
             connection.send(BPXX_REPLY(ds, CMD_TYPE.BP06, cmdlist[1], false));
         }
-
-
     }
 
     public void handleAP07(Runtime ds, Connection connection, String cmd) {
@@ -1444,16 +1442,15 @@ SOS报警上行WIFI、LBS混合定位数据,步数为255步,电量等级5,数
 
 
     public static byte[] BP34_Raw(String senderNumb, String packetTime, String recordtimelenHex, int count, int index, int datalen, byte[] amrdata) {
+        ICLogger.d("senderNumb ==> " + senderNumb);
         //recordtimelenHex 是yyyymmddhhmmss的,为了兼容其它协议,就不变了,自己修正一下放进现在的协议
-//(03C80106357593060153353BP34,13026618172,170413163300,2710,6,1,700,数据)
-//BP34:命令字符
-//1:亲情号码 (0表示发给所有人)
-//170413163300:YYMMDDHHMMSS格式的年月日时分秒,设备录音时间
-//2710(0x2710):语音文件录音时长10000ms
-//6:语音包分包总数
-
+        //(03C80106357593060153353BP34,13026618172,170413163300,2710,6,1,700,数据)
+        //BP34:命令字符
+        //1:亲情号码 (0表示发给所有人)
+        //170413163300:YYMMDDHHMMSS格式的年月日时分秒,设备录音时间
+        //2710(0x2710):语音文件录音时长10000ms
+        //6:语音包分包总数
         Runtime runtime = (CoreService.getInstance() == null) ? null : CoreService.getInstance().getRuntime();
-
         /*
         (    CHAR            1
         %04X   HEX_STRING      4
@@ -1468,10 +1465,13 @@ SOS报警上行WIFI、LBS混合定位数据,步数为255步,电量等级5,数
         int durationInt = Integer.parseInt(recordtimelenHex, 16);
         long duration = durationInt * 1000;
         if (runtime == null) return null;
+        if (TextUtils.isEmpty(senderNumb) || "-1".equals(senderNumb)) {
+            senderNumb = "0";
+        }
         StringBuffer sb = new StringBuffer(CMDHEADER).append("0000").append("0106").append(runtime.IMEI());
         sb.append(cmdMap.get(CMD_TYPE.BP34))
                 //往后的是消息内容
-                .append(CMDSPLIT).append("0")//要发给谁
+                .append(CMDSPLIT).append(senderNumb)//要发给谁
                 .append(CMDSPLIT).append(packetTime.substring(2))//时间
                 //.append(CMDSPLIT).append(TimeUtil.getSystemTimeYYMMDDHHMMSS())//时间
                 .append(CMDSPLIT).append(Long.toHexString(duration))
@@ -1488,15 +1488,15 @@ SOS报警上行WIFI、LBS混合定位数据,步数为255步,电量等级5,数
         sentbuf[len - 1] = ')';
         ICLogger.d(new String(sentbuf));
         return encrepteMsgBytes(sentbuf);
-
     }
 
     public void sendVoicePackage(int duration, String remoteNum, String content, String voiceId) {
 
         //创建voiceConent并添加到数据
         if (remoteNum == null || remoteNum.isEmpty()) {
-            remoteNum = "123";
+            remoteNum = "-1";
         }
+        ICLogger.d("remoteNum =====> " + remoteNum);
         final VoiceContent voiceContent = VoiceContent.placeHolderOut(CONTACT_CATEGORY_GROUP, remoteNum, String.format("%04X", duration), content, 1, 3);
         // 把voiceContent拆解成1024的分包
         Util.parseToVoicePacketSent(voiceContent, 900);
@@ -1505,7 +1505,6 @@ SOS报警上行WIFI、LBS混合定位数据,步数为255步,电量等级5,数
             CoreService.getInstance().getConnection()
                     .DeliverCMDMessageToSystem("SentVoicePacket", "");
         }
-
     }
 
     public boolean handleCmd(CMD_TYPE type, String cmd) {
index 328298b..d4e94af 100644 (file)
@@ -4294,11 +4294,12 @@ public class protocol_s123 {
                 //设置麦克风开关
                 //根据值去开关麦克风
                 //UI状态栏是否需要去显示Icon没有说明嗷
-                AudioManager audioManager = (AudioManager) mRuntime.getContextProxy()
-                        .context.getSystemService(Context.AUDIO_SERVICE);
-                if (audioManager != null) {
-                    audioManager.setMicrophoneMute("1".equals(value));
-                }
+                // 不用动,修改后,通话的地方会更新.
+//                AudioManager audioManager = (AudioManager) mRuntime.getContextProxy()
+//                        .context.getSystemService(Context.AUDIO_SERVICE);
+//                if (audioManager != null) {
+//                    audioManager.setMicrophoneMute("1".equals(value));
+//                }
                 String id = split[2];
                 //返回消息
                 //IWAPMK,080835,1#
index a8380af..c913296 100644 (file)
@@ -1,2 +1,2 @@
-#Wed Sep 08 19:49:14 CST 2021\r
-VERSION_CODE=947\r
+#Fri Sep 10 17:58:11 CST 2021\r
+VERSION_CODE=951\r