[dev_minibus-d_230425_3.2.0] 优化可能出现bug的代码
This commit is contained in:
@@ -623,15 +623,16 @@ public class PadTTS implements IMogoTTS, VoiceClient.VoiceCmdCallBack, OnTtsList
|
||||
List<IMogoTTSCallback> callBacks = mCmdMap.get(cmd);
|
||||
if (callBacks != null) {
|
||||
callBacks.remove(callBack);
|
||||
}
|
||||
if (callBacks.isEmpty()) {
|
||||
mCmdMap.remove(cmd);
|
||||
try {
|
||||
mVoiceClient.unRegisterCustomWakeupCmd(cmd);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
if (callBacks.isEmpty()) {
|
||||
mCmdMap.remove(cmd);
|
||||
try {
|
||||
mVoiceClient.unRegisterCustomWakeupCmd(cmd);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mCacheUnWakeupCommands.remove(cmd);
|
||||
}
|
||||
mCacheUnWakeupCommands.remove(cmd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user