diff --git a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/AppsPresenter.java b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/AppsPresenter.java index 53e4c9d5ce..3f2da676e7 100644 --- a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/AppsPresenter.java +++ b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/AppsPresenter.java @@ -45,8 +45,9 @@ public class AppsPresenter extends Presenter { 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; } diff --git a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/applaunch/CardAppLauncher.java b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/applaunch/CardAppLauncher.java index fb0906f4c4..ef97b83c59 100644 --- a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/applaunch/CardAppLauncher.java +++ b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/applaunch/CardAppLauncher.java @@ -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 ); } diff --git a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/applaunch/GuideShowLauncher.java b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/applaunch/GuideShowLauncher.java index 57b57acfd4..9900106230 100644 --- a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/applaunch/GuideShowLauncher.java +++ b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/applaunch/GuideShowLauncher.java @@ -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; }); diff --git a/modules/mogo-module-guide/src/main/java/com/mogo/module/guide/GuideBizManager.kt b/modules/mogo-module-guide/src/main/java/com/mogo/module/guide/GuideBizManager.kt index a16cc90d6b..844c08116a 100644 --- a/modules/mogo-module-guide/src/main/java/com/mogo/module/guide/GuideBizManager.kt +++ b/modules/mogo-module-guide/src/main/java/com/mogo/module/guide/GuideBizManager.kt @@ -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) + } } } \ No newline at end of file