if (ev) {
LOGD("KEY[%s], type[%d]", ev->keyname, type);
- if (ev->keyname && strncmp(ev->keyname, VOICE_KEY, strlen(VOICE_KEY)) == 0 ) {
+ if (ev->keyname && strncmp(ev->keyname, VOICE_KEY, strlen(VOICE_KEY) + 1) == 0 ) {
chrono::time_point<chrono::system_clock> current_time_point;
current_time_point = chrono::system_clock::now();
auto diff = current_time_point - g_last_key_pressed;
LOGD("KEY[%s], type[%d]", ev->keyname, type);
if (g_voice_key_pressed &&
- ev->keyname && strncmp(ev->keyname, VOICE_KEY, strlen(VOICE_KEY)) == 0) {
+ ev->keyname && strncmp(ev->keyname, VOICE_KEY, strlen(VOICE_KEY) + 1) == 0) {
chrono::time_point<chrono::system_clock> current_time_point;
current_time_point = chrono::system_clock::now();
auto diff = current_time_point - g_last_key_pressed;
bundle_get_str(message, "command", &command);
if (command) {
const char *szStartStreamingCommand = "start_streaming_current_utterance";
- if (strncmp(command, szStartStreamingCommand, strlen(szStartStreamingCommand)) == 0) {
+ if (strncmp(command, szStartStreamingCommand, strlen(szStartStreamingCommand) + 1) == 0) {
MAS_LOGE("AP sent start streaming request");
observer->on_ap_start_streaming_audio_data(std::string{remote_app_id},
MA_AUDIO_STREAMING_DATA_TYPE_CURRENT_UTTERANCE);