新建provider承载抽离免唤醒的逻辑

This commit is contained in:
tongchenfei
2020-10-20 14:57:48 +08:00
parent 2946aa1774
commit d0b0cc1236
3 changed files with 101 additions and 13 deletions

View File

@@ -107,7 +107,6 @@ public class ShareControl implements IMogoShareManager, IMogoIntentListener,
private BaseFloatDialog mShareDialog;
private IMogoAuthorizeModuleManager authorizeModuleManager;
private IMogoIntentManager intentManager;
@Override
public void showShareDialog() {
@@ -197,18 +196,6 @@ public class ShareControl implements IMogoShareManager, IMogoIntentListener,
TipToast.tip("未授权,无法分享");
}
});
intentManager = ServiceApisManager.serviceApis.getIntentManagerApi();
intentManager.registerIntentListener(VOICE_CMD_GO_TO_SHARE, this);
intentManager.registerIntentListener(VOICE_CMD_PUB_TROUBLE_HELP, this);
intentManager.registerIntentListener(VOICE_CMD_PUB_ROAD_CONDITION, this);
intentManager.registerIntentListener(VOICE_CMD_SHARE_DIALOG_CLOSE, this);
intentManager.registerIntentListener(VOICE_CMD_NO_REPLY_SHARE_DIALOG_CLOSE, this);
intentManager.registerIntentListener(UNWAKE_UPLOAD_ROAD_CONDITION, this);
// 免唤醒词注册,全局免唤醒
AIAssist.getInstance(mContext).registerUnWakeupCommand(UNWAKE_UPLOAD_REAL_TIME_TRAFFIC,
UPLOAD_REAL_TIME_TRAFFIC, ShareControl.this);
// if (!DebugConfig.isLauncher()) {
ServiceApisManager.serviceApis.getStatusManagerApi().registerStatusChangedListener(TAG,
StatusDescriptor.MAIN_PAGE_RESUME, new IMogoStatusChangedListener() {