fix bug
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user