Merge branch 'feature/v1.0.3' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into feature/v1.0.3

This commit is contained in:
wangcongtao
2020-03-30 16:51:21 +08:00
7 changed files with 16 additions and 17 deletions

View File

@@ -45,8 +45,9 @@ public class AppsPresenter extends Presenter<AppsView> {
super(view);
mCardManager = (IMogoCardManager) ARouter.getInstance().build(MogoServicePaths.PATH_CARD_MANAGER).navigation(getContext());
CardAppLauncher cardAppLauncher = new CardAppLauncher(this, mCardManager);
cardAppLauncher.setNext(new GuideShowLauncher());
cardAppLauncher.setNext(new AppLauncher());
GuideShowLauncher guideShowLauncher = new GuideShowLauncher();
cardAppLauncher.setNext(guideShowLauncher);
guideShowLauncher.setNext(new AppLauncher());
mLauncher = cardAppLauncher;
}

View File

@@ -37,8 +37,8 @@ public class CardAppLauncher extends BaseAppLauncher {
public void launch( Context context, AppInfo appInfo ) {
if ( sCardApps.containsKey( appInfo.getPackageName() ) ) {
mCardManager.switch2( sCardApps.get( appInfo.getPackageName() ) );
mAppsPresenter.exit();
} else {
} else { mAppsPresenter.exit();
if ( getNext() != null ) {
getNext().launch( context, appInfo );
}

View File

@@ -1,5 +1,6 @@
package com.mogo.module.apps.applaunch;
import android.app.Activity;
import android.content.Context;
import com.mogo.module.apps.AppServiceHandler;
@@ -16,7 +17,7 @@ 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((s) -> {
AppServiceHandler.getMogoGuideShow().playGuideVideo((Activity) context,(s) -> {
Logger.d(TAG, s);
return Unit.INSTANCE;
});

View File

@@ -80,6 +80,7 @@ class AuthorizePresenter : Presenter<AuthorizeContract.View>, AuthorizeContract.
}
private fun closeAuthorizeView() {
invokeTag = null
mogoAuthShow.hideAuthorizeView()
}
@@ -89,7 +90,7 @@ class AuthorizePresenter : Presenter<AuthorizeContract.View>, AuthorizeContract.
mogoAuthShow.resetShowStatus()
invokeTag?.let {
MogoAuthorizeRegisterHandler.getAuthorizeContentListener(it)?.requestContentFailed("user exit authorize --- onDestroy")
MogoAuthorizeRegisterHandler.getAuthorizeListener(it)?.authorizeFailed("user exit authorize by back press")
MogoAuthorizeRegisterHandler.getAuthorizeListener(it)?.authorizeFailed("user exit authorize --- onDestroy")
}
}
}

View File

@@ -316,7 +316,7 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
@Override
public void authorizeFailed( String errorMsg ) {
Log.e( TAG, "authorizeFailed --------> errorMsg = " + errorMsg );
Log.e( TAG, "authorizeFailed --------> errorMsg = " + errorMsg + " >> isClickShare = " + isClickShare);
}
@Override

View File

@@ -37,7 +37,7 @@ public class EntrancePresenter extends Presenter<EntranceView> {
private Context mContext;
private IMogoAnalytics mAnalytics;
private static final String TAG = "EntrancePresenter";
private static final String TAG = "EntranceFragment";
private IMogoIntentManager mogoIntentManager;
private IMogoAuthorizeModuleManager mIMogoAuthorizeModuleManager;
private String mVoiceCmdType; //一级命令

View File

@@ -2,7 +2,6 @@ package com.mogo.module.guide
import com.alibaba.android.arouter.launcher.ARouter
import com.mogo.module.authorize.authprovider.invoke.AuthorizeConstant
import com.mogo.module.authorize.authprovider.invoke.AuthorizeInvokerConstant
import com.mogo.module.authorize.authprovider.invoke.AuthorizeInvokerConstant.Companion.AUTHORIZE_TYPE_LAUNCHER_MAIN
import com.mogo.module.authorize.authprovider.module.IMogoAuthorizeModuleManager
import com.mogo.module.guide.fragment.GuideFragment
@@ -11,7 +10,6 @@ import com.mogo.module.guide.util.SharedPreferenceUtil.setGuideFinish
import com.mogo.service.IMogoServiceApis
import com.mogo.service.MogoServicePaths
import com.mogo.service.fragmentmanager.FragmentDescriptor
import com.mogo.utils.UiThreadHandler
import com.mogo.utils.logger.Logger
object GuideBizManager {
@@ -49,14 +47,12 @@ object GuideBizManager {
}
fun invokeAuthorize() {
UiThreadHandler.postDelayed({
val authorizeInvoke = ARouter.getInstance().build(AuthorizeConstant.PROVIDER_MODULE).navigation()
if (authorizeInvoke is IMogoAuthorizeModuleManager) {
if (authorizeInvoke.needAuthorize(AUTHORIZE_TYPE_LAUNCHER_MAIN)) {
authorizeInvoke.invokeAuthorizeForShow()
}
val authorizeInvoke = ARouter.getInstance().build(AuthorizeConstant.PROVIDER_MODULE).navigation()
if (authorizeInvoke is IMogoAuthorizeModuleManager) {
if (authorizeInvoke.needAuthorize(AUTHORIZE_TYPE_LAUNCHER_MAIN)) {
authorizeInvoke.invokeAuthorizeForShow()
}
}, 3000L)
}
}
}