release 773
authorsnickersun <scy@incartech.cn>
Fri, 2 Apr 2021 10:14:34 +0000 (18:14 +0800)
committersnickersun <scy@incartech.cn>
Fri, 2 Apr 2021 10:14:34 +0000 (18:14 +0800)
修复无法强制阅读sms的问题
L02默认使用协议提示短信消息

app/release/ICSer_V773_2104021759_release.apk [moved from app/release/ICSer_V772_2103311126_release.apk with 78% similarity]
app/release/output.json
app/src/main/java/com/enqualcomm/support/Config.java
app/src/main/java/com/enqualcomm/support/ICSmsManager.java
app/src/main/java/com/enqualcomm/support/utils/ContextProxy.java
app/version_code.properties

similarity index 78%
rename from app/release/ICSer_V772_2103311126_release.apk
rename to app/release/ICSer_V773_2104021759_release.apk
index 3b05ffd..aa3598a 100644 (file)
Binary files a/app/release/ICSer_V772_2103311126_release.apk and b/app/release/ICSer_V773_2104021759_release.apk differ
index 5a1ab0b..b7f13cb 100644 (file)
@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":772,"versionName":"2103311126","enabled":true,"outputFile":"ICSer_V772_2103311126_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V772_2103311126_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":773,"versionName":"2104021759","enabled":true,"outputFile":"ICSer_V773_2104021759_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V773_2104021759_release.apk","properties":{}}]
\ No newline at end of file
index 043da9d..a050f5c 100644 (file)
@@ -570,6 +570,7 @@ public class Config {
             C5_noBroadCastActionStrip = true;
         } else if (custom_name.equals("L02")) {
             noPushTxtReadReply = false;//即爱需要阅读反馈
+            noBroadCastPushTxtNotify = true;
         } else {
             noBroadCastPushTxtNotify = true;
         }
index a94d9fb..2f9da84 100644 (file)
@@ -38,6 +38,7 @@ import com.enqualcomm.support.utils.TemperatureUtil;
 import com.enqualcomm.support.utils.TimeUtil;
 import com.enqualcomm.support.utils.Util;
 import com.enqualcomm.support.utils.VibrateUtil;
+import com.enqualcomm.support.utils.WakeLockUtil;
 import com.ic.protocols.protocolAPIHelper;
 import com.ic.view.msg.MsgMustReadDialog;
 
@@ -101,8 +102,6 @@ public class ICSmsManager extends BroadcastReceiver {
             long currenttime = System.currentTimeMillis();
 //            if (currenttime - ICSmsManager.preTimeMillis > 30000L) {
             ICSmsManager.preTimeMillis = currenttime;
-//                (new Thread(new Runnable() {
-//                    public void run() {
             SystemClock.sleep(3000L);
             if (intent == null || intent.getAction() == null) return;
 
@@ -119,14 +118,29 @@ public class ICSmsManager extends BroadcastReceiver {
                 message += sms.getDisplayMessageBody();
             }
             ICLogger.i("收到" + from + "短信:" + message);
-//                         Toast.makeText(context, "收到" + from + "短信:" + message, Toast.LENGTH_LONG).show();
+            //判断是否要弹窗,强制读取
+            String forceReadMsg = Util.getSystemProperties("persist.sys.forcereadmsg");
+            ICLogger.d("forceReadMsg == > " + forceReadMsg);
             if (handleSMS_CMD(from, message) == false) {
+
                 //说明不是sms命令,提示短信接收。
-                ContextProxy.sendMsgBroadcast(context, message, 1);
+                if (!TextUtils.isEmpty(forceReadMsg)) {
+
+                    WakeLockUtil.ScreenOnWakeLockTemperary(context);
+                    ContextProxy.play_waning_notify(context);
+                    VibrateUtil.getInstance(context).VibrateOnOnce(true);
+                    Util.mSleep(2000);
+
+                    MsgMustReadDialog instance = MsgMustReadDialog.getInstance();
+                    instance.showMsgDialog();
+                    List<String> list = new ArrayList<>();
+                    list.add(message);
+                    instance.addData(list);
+                } else {
+                    //说明不是sms命令,提示短信接收。
+                    ContextProxy.sendMsgBroadcast(context, message, 1);
+                }
             }
-//                    }
-//                })).start();
-//            }
         }
 
     }
@@ -181,6 +195,11 @@ public class ICSmsManager extends BroadcastReceiver {
                                     if (!handleSMS_CMD(from, smsmessage)) {
                                         //说明不是sms命令,提示短信接收。
                                         if (!TextUtils.isEmpty(forceReadMsg)) {
+                                            WakeLockUtil.ScreenOnWakeLockTemperary(mContext);
+                                            ContextProxy.play_waning_notify(mContext);
+                                            VibrateUtil.getInstance(mContext).VibrateOnOnce(true);
+                                            Util.mSleep(2000);
+
                                             MsgMustReadDialog instance = MsgMustReadDialog.getInstance();
                                             instance.showMsgDialog();
                                             List<String> list = new ArrayList<>();
index e945164..190fe0e 100644 (file)
@@ -377,7 +377,7 @@ public class ContextProxy {
         sendMsgBroadcast(this.context, msg, msgType);
     }
 
-    private static void play_waning_notify(Context context) {
+    public static void play_waning_notify(Context context) {
         AudioService.getInstance().play(context.getAssets(), "warning.mp3");
     }
 
index 6d30eac..51ebd3f 100644 (file)
@@ -1,2 +1,2 @@
-#Wed Mar 31 11:26:30 CST 2021
-VERSION_CODE=772
+#Fri Apr 02 17:59:55 CST 2021
+VERSION_CODE=773