Forráskód Böngészése

tts语音播报声音通道改回媒体类型,如果是铃声通道会导致事件播报也会从喇叭和耳机同时播放。

weizhengliang 2 éve
szülő
commit
ef0e948022

+ 2 - 2
build.gradle

@@ -47,12 +47,12 @@ buildscript {
     /**
      * APP版本码
      */
-    ext.app_version_code = 138
+    ext.app_version_code = 139
 
     /**
      * APP版本号
      */
-    ext.app_version = "1.3.56"
+    ext.app_version = "1.3.57"
 
     /**
      * 项目依赖库

+ 2 - 2
home/src/main/code/com/wdkl/ncs/android/component/home/service/PhoneStateReceiver.java

@@ -113,7 +113,7 @@ public class PhoneStateReceiver extends BroadcastReceiver {
                             EventBus.getDefault().post(new MessageEvent(true, Constants.EVENT_CLEAR_IM));
 
                             //tts语音播报
-                            if (ContactHelper.getContacts().size() > 0) {
+                            /*if (ContactHelper.getContacts().size() > 0) {
                                 for (WatchContactVO contactVO : ContactHelper.getContacts()) {
                                     if (contactVO.getPhoneNumber() != null && contactVO.getPhoneNumber().length() > 10
                                             && (contactVO.getPhoneNumber().contains(extraIncomingNumber) || extraIncomingNumber.contains(contactVO.getPhoneNumber()))) {
@@ -122,7 +122,7 @@ public class PhoneStateReceiver extends BroadcastReceiver {
                                         break;
                                     }
                                 }
-                            }
+                            }*/
                             return;
                         }
                     }

+ 6 - 6
home/src/main/code/com/wdkl/ncs/android/component/home/util/SpeechUtil.java

@@ -131,13 +131,13 @@ public class SpeechUtil {
             return;
         }
         isStop = false;
-        if (Constants.Companion.getPhoneType() == CommunicationEnum.MOBILE_PHONE.value()) {
-            //普通电话
-            params.putInt(TextToSpeech.Engine.KEY_PARAM_STREAM, AudioManager.STREAM_RING);
-        } else {
-            //网络电话
+        //if (Constants.Companion.getPhoneType() == CommunicationEnum.MOBILE_PHONE.value()) {
+        //    //普通电话
+        //    params.putInt(TextToSpeech.Engine.KEY_PARAM_STREAM, AudioManager.STREAM_RING);
+        //} else {
+        //    //网络电话
             params.putInt(TextToSpeech.Engine.KEY_PARAM_STREAM, AudioManager.STREAM_MUSIC);
-        }
+        //}
         //Log.e(TAG, "speech param stream: " + params.getInt(TextToSpeech.Engine.KEY_PARAM_STREAM));
 
         int speakStatus = textToSpeech.speak(text, TextToSpeech.QUEUE_FLUSH, params, "uniqueId");

BIN
release/adg.1.3.57_139_IP110.apk