Merge remote-tracking branch 'origin/dev_robotaxi-d-app-module_260_220304_2.6.0' into dev_robotaxi-d-app-module_260_220304_2.6.0
@@ -12,7 +12,7 @@
|
||||
android:layout_width="@dimen/module_v2x_brake_image_width"
|
||||
android:layout_height="@dimen/module_v2x_brake_image_width"
|
||||
android:layout_marginStart="@dimen/module_v2x_brake_image_margin_left"
|
||||
android:src="@drawable/v2x_icon_ahead_car_brake"
|
||||
android:src="@drawable/icon_warning_v2x_emergency_brake"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
@@ -37,13 +37,13 @@ enum class EventTypeEnum(
|
||||
|
||||
//施工
|
||||
FOURS_ROAD_WORK(
|
||||
"10006", "道路施工", "前方施工", R.drawable.v2x_icon_daolushigong_vr,
|
||||
"10006", "道路施工", "前方施工", R.drawable.icon_warning_v2x_road_construction,
|
||||
"前方施工", "道路施工"
|
||||
),
|
||||
|
||||
//拥堵
|
||||
FOURS_BLOCK_UP(
|
||||
"10007", "道路拥堵", "前方拥堵", R.drawable.v2x_icon_yongdu_vr,
|
||||
"10007", "道路拥堵", "前方拥堵", R.drawable.icon_warning_v2x_congestion,
|
||||
"前方道路拥堵", "道路拥堵"
|
||||
),
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 17 KiB |
@@ -8,7 +8,7 @@
|
||||
<dimen name="module_v2n_image_margin_left">37px</dimen>
|
||||
<dimen name="module_v2x_brake_tip_width">435px</dimen>
|
||||
<dimen name="module_v2x_brake_tip_height">186px</dimen>
|
||||
<dimen name="module_v2x_brake_image_width">133px</dimen>
|
||||
<dimen name="module_v2x_brake_image_width">120px</dimen>
|
||||
<dimen name="module_v2x_brake_image_margin_left">37px</dimen>
|
||||
<dimen name="module_v2x_brake_image_margin_right">27px</dimen>
|
||||
|
||||
|
||||
@@ -18,13 +18,13 @@ import com.aispeech.export.config.AuthConfig;
|
||||
import com.aispeech.export.config.EchoConfig;
|
||||
import com.aispeech.export.engines.AILocalTTSEngine;
|
||||
import com.aispeech.export.intent.AILocalTTSIntent;
|
||||
import com.aispeech.export.listeners.AILocalTTSListener;
|
||||
import com.aispeech.export.listeners.AITTSListener;
|
||||
import com.aispeech.lite.AuthType;
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.cloud.commons.BuildConfig;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.tts.base.IMogoTTS;
|
||||
import com.mogo.tts.base.IMogoTTSCallback;
|
||||
@@ -59,27 +59,29 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack, OnTtsList
|
||||
private boolean mInitReady = true;
|
||||
private Context mContext;
|
||||
|
||||
public synchronized void release() {
|
||||
public void release() {
|
||||
CallerLogger.INSTANCE.d(TAG, "release");
|
||||
if (mCmdMap != null && !mCmdMap.isEmpty() && mVoiceClient != null) {
|
||||
for (String cmd : mCmdMap.keySet()) {
|
||||
try {
|
||||
mVoiceClient.unRegisterCustomWakeupCmd(cmd);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
ThreadUtils.runOnUiThread(() -> {
|
||||
if (mCmdMap != null && !mCmdMap.isEmpty() && mVoiceClient != null) {
|
||||
for (String cmd : mCmdMap.keySet()) {
|
||||
try {
|
||||
mVoiceClient.unRegisterCustomWakeupCmd(cmd);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mQAndAMap.clear();
|
||||
mVoiceClient.release();
|
||||
if (mEngine != null) {
|
||||
mEngine.destroy();
|
||||
mEngine = null;
|
||||
}
|
||||
mHasAuth = false;
|
||||
mSpeakVoiceMap.clear();
|
||||
mCacheUnWakeupCommands.clear();
|
||||
mContext = null;
|
||||
mQAndAMap.clear();
|
||||
mVoiceClient.release();
|
||||
if (mEngine != null) {
|
||||
mEngine.destroy();
|
||||
mEngine = null;
|
||||
}
|
||||
mHasAuth = false;
|
||||
mSpeakVoiceMap.clear();
|
||||
mCacheUnWakeupCommands.clear();
|
||||
mContext = null;
|
||||
});
|
||||
}
|
||||
|
||||
private VoiceClient mVoiceClient;
|
||||
@@ -147,8 +149,10 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack, OnTtsList
|
||||
@Override
|
||||
public void success() {
|
||||
CallerLogger.INSTANCE.d(TAG, "授权成功");
|
||||
mHasAuth = true;
|
||||
initTtsEngine();
|
||||
ThreadUtils.runOnUiThread(() -> {
|
||||
mHasAuth = true;
|
||||
initTtsEngine();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -251,7 +255,7 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack, OnTtsList
|
||||
if (!mCmdMap.containsKey(cmd)) {
|
||||
return;
|
||||
}
|
||||
CallerLogger.INSTANCE.d(TAG, "received command : " + cmd);
|
||||
CallerLogger.INSTANCE.d(TAG, "received command : " + cmd);
|
||||
|
||||
Iterator<IMogoTTSCallback> iterator = null;
|
||||
try {
|
||||
@@ -447,7 +451,7 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack, OnTtsList
|
||||
mVoiceClient.registerCustomWakeupCmd(cmd, cmdWords);
|
||||
mCacheUnWakeupCommands.remove(cmd);
|
||||
}
|
||||
CallerLogger.INSTANCE.i(TAG, "cache un wakeup command2. " + cmd);
|
||||
CallerLogger.INSTANCE.i(TAG, "cache un wakeup command2. " + cmd);
|
||||
mCacheUnWakeupCommands.put(cmd, cmdWords);
|
||||
}
|
||||
|
||||
@@ -463,7 +467,7 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack, OnTtsList
|
||||
mVoiceClient.registerCustomWakeupCmd(cmd, cmdWords);
|
||||
mCacheUnWakeupCommands.remove(cmd);
|
||||
}
|
||||
CallerLogger.INSTANCE.i(TAG, "cache un wakeup command. " + cmd);
|
||||
CallerLogger.INSTANCE.i(TAG, "cache un wakeup command. " + cmd);
|
||||
mCacheUnWakeupCommands.put(cmd, cmdWords);
|
||||
}
|
||||
|
||||
@@ -514,7 +518,7 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack, OnTtsList
|
||||
* @param status window_start_cancel 0 - 结束, 1 - 显示, 2 - 未激活调试进入
|
||||
*/
|
||||
public static void startAssistant(Context context, int status) {
|
||||
CallerLogger.INSTANCE.w(TAG, "startAssistant status = " + status);
|
||||
CallerLogger.INSTANCE.w(TAG, "startAssistant status = " + status);
|
||||
|
||||
final Intent intent = new Intent();
|
||||
intent.setFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
|
||||