Merge branch 'feature/v1.0.3' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into feature/v1.0.3
This commit is contained in:
@@ -12,11 +12,11 @@ import com.mogo.module.authorize.util.AnalyticsUtil
|
||||
import com.mogo.module.authorize.util.AnalyticsUtil.INVOKE_TRACK_AUTHORIZE_CLICK
|
||||
import com.mogo.module.authorize.util.AnalyticsUtil.INVOKE_TRACK_AUTHORIZE_SHOW
|
||||
import com.mogo.module.authorize.voice.IVoiceCommandListener
|
||||
import com.mogo.module.authorize.voice.IVoiceIntentListener
|
||||
import com.mogo.module.authorize.voice.IVoiceAuthorizeIntentListener
|
||||
import com.mogo.module.authorize.voice.VoiceUtil
|
||||
import com.mogo.utils.logger.Logger
|
||||
|
||||
class AuthorizeFragment : MvpFragment<AuthorizeContract.View, AuthorizePresenter>(), AuthorizeContract.View, View.OnClickListener, IVoiceCommandListener, IVoiceIntentListener {
|
||||
class AuthorizeFragment : MvpFragment<AuthorizeContract.View, AuthorizePresenter>(), AuthorizeContract.View, View.OnClickListener, IVoiceCommandListener, IVoiceAuthorizeIntentListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "AuthorizeFragment"
|
||||
|
||||
@@ -4,9 +4,9 @@ import android.content.Intent
|
||||
import com.mogo.service.intent.IMogoIntentListener
|
||||
import com.mogo.utils.logger.Logger
|
||||
|
||||
private const val IVoiceIntentTAG = "IVoiceIntentListener"
|
||||
private const val IVoiceIntentTAG = "IVoiceAuthorizeIntentListener"
|
||||
|
||||
interface IVoiceIntentListener : IMogoIntentListener, IVoiceBusinessListener {
|
||||
interface IVoiceAuthorizeIntentListener : IMogoIntentListener, IVoiceBusinessListener {
|
||||
|
||||
override fun onIntentReceived(cmd: String?, intent: Intent?) {
|
||||
Logger.i(IVoiceIntentTAG, "cmd -> $cmd")
|
||||
@@ -25,7 +25,7 @@ object VoiceManager {
|
||||
}
|
||||
}
|
||||
|
||||
fun handleOnIntentCmd(cmd: String, intent: Intent, listener: IVoiceIntentListener) {
|
||||
fun handleOnIntentCmd(cmd: String, intent: Intent, listener: IVoiceAuthorizeIntentListener) {
|
||||
Logger.i(TAG, "handleOnIntentCmd: cmd -> $cmd")
|
||||
when (cmd) {
|
||||
VOICE_INTENT_AGREE -> {
|
||||
|
||||
@@ -41,7 +41,7 @@ object VoiceUtil {
|
||||
fun registerAll(
|
||||
context: Context,
|
||||
voiceCommand: IVoiceCommandListener,
|
||||
intentCommand: IVoiceIntentListener
|
||||
intentCommand: IVoiceAuthorizeIntentListener
|
||||
) {
|
||||
if (!hasRegister) {
|
||||
hasRegister = true
|
||||
@@ -53,7 +53,7 @@ object VoiceUtil {
|
||||
private fun registerAgree(
|
||||
context: Context,
|
||||
voiceCommand: IVoiceCommandListener,
|
||||
intentCommand: IVoiceIntentListener
|
||||
intentCommand: IVoiceAuthorizeIntentListener
|
||||
) {
|
||||
Logger.i(TAG, "registerAgree")
|
||||
AIAssist.getInstance(context)
|
||||
@@ -67,7 +67,7 @@ object VoiceUtil {
|
||||
private fun registerDisAgree(
|
||||
context: Context,
|
||||
voiceCommand: IVoiceCommandListener,
|
||||
intentCommand: IVoiceIntentListener
|
||||
intentCommand: IVoiceAuthorizeIntentListener
|
||||
) {
|
||||
Logger.i(TAG, "registerDisAgree")
|
||||
AIAssist.getInstance(context)
|
||||
@@ -78,7 +78,7 @@ object VoiceUtil {
|
||||
intentRegister?.registerIntentListener(VOICE_INTENT_DISAGREE, intentCommand)
|
||||
}
|
||||
|
||||
fun unregisterAll(context: Context, listener: IVoiceIntentListener) {
|
||||
fun unregisterAll(context: Context, listener: IVoiceAuthorizeIntentListener) {
|
||||
Logger.i(TAG, "unregister All")
|
||||
AIAssist.getInstance(context).unregisterUnWakeupCommand(VOICE_REGISTER_AUTHORIZE_AGREE)
|
||||
AIAssist.getInstance(context).unregisterUnWakeupCommand(VOICE_REGISTER_AUTHORIZE_DISAGREE)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#000000">
|
||||
android:background="#CC000000">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clLoadingAuthorizeContainer"
|
||||
|
||||
Reference in New Issue
Block a user