Merge branch 'feature/v1.0.3' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into feature/v1.0.3
This commit is contained in:
@@ -3,7 +3,10 @@ package com.mogo.module.apps.applaunch;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.map.impl.amap.navi.NaviClient;
|
||||
import com.mogo.module.apps.AppServiceHandler;
|
||||
import com.mogo.module.apps.R;
|
||||
import com.mogo.module.apps.model.AppInfo;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
@@ -17,14 +20,23 @@ public class GuideShowLauncher extends BaseAppLauncher {
|
||||
@Override
|
||||
public void launch(Context context, AppInfo appInfo) {
|
||||
if (appInfo != null && APP_INFO_NAME_GUIDE_SHOW.equals(appInfo.getName())) {
|
||||
AppServiceHandler.getMogoGuideShow().playGuideVideo((Activity) context,(s) -> {
|
||||
Logger.d(TAG, s);
|
||||
return Unit.INSTANCE;
|
||||
});
|
||||
}else{
|
||||
if ( getNext() != null ) {
|
||||
getNext().launch( context, appInfo );
|
||||
if (!NaviClient.getInstance(context).isNaviing()) {
|
||||
AppServiceHandler.getMogoGuideShow().playGuideVideo((Activity) context, (s) -> {
|
||||
Logger.d(TAG, s);
|
||||
return Unit.INSTANCE;
|
||||
});
|
||||
} else {
|
||||
AIAssist.getInstance(context).speakTTSVoice(context.getString(R.string.module_apps_str_guide_warning));
|
||||
processChain(context,appInfo);
|
||||
}
|
||||
} else {
|
||||
processChain(context, appInfo);
|
||||
}
|
||||
}
|
||||
|
||||
private void processChain(Context context, AppInfo appInfo) {
|
||||
if (getNext() != null) {
|
||||
getNext().launch(context, appInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user