add context Holder and remove guide condition
@@ -2,6 +2,7 @@ package com.mogo.module.authorize.authprovider.launcher
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Looper
|
||||
import com.mogo.commons.context.ContextHolderUtil
|
||||
import com.mogo.module.authorize.authprovider.biz.MogoAuthorizeManagerImpl
|
||||
import com.mogo.module.authorize.authprovider.biz.MogoAuthorizeRegisterHandler
|
||||
import com.mogo.module.authorize.authprovider.invoke.AuthorizeInvokerConstant.Companion.AUTHORIZE_TYPE_LAUNCHER_MAIN
|
||||
@@ -82,7 +83,7 @@ class MogoMainAuthorize private constructor() : MogoAuthorizeManagerImpl(), IMog
|
||||
return
|
||||
}
|
||||
if (authorizeDialog == null) {
|
||||
authorizeDialog = AuthorizeDialog(tag, mContext!!)
|
||||
authorizeDialog = AuthorizeDialog(tag, ContextHolderUtil.getContext() ?: mContext!!)
|
||||
authorizeDialog!!.setOnDismissListener {
|
||||
authorizeDialog = null
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.module.authorize.layout
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.text.Html
|
||||
import android.view.View
|
||||
import android.widget.Button
|
||||
@@ -207,4 +206,9 @@ class AuthorizeDialog : BaseFloatDialog, View.OnClickListener, IVoiceCommandList
|
||||
showAuthorizationError()
|
||||
})
|
||||
}
|
||||
|
||||
override fun dismiss() {
|
||||
super.dismiss()
|
||||
mContext = null
|
||||
}
|
||||
}
|
||||
@@ -5,17 +5,14 @@ import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.map.listener.IMogoMapListener
|
||||
import com.mogo.map.location.IMogoLocationListener
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener
|
||||
import com.mogo.map.navi.IMogoNaviListener
|
||||
import com.mogo.module.guide.GuideConstant.Companion.PATH_GUIDE_FRAGMENT
|
||||
import com.mogo.module.guide.GuideConstant.Companion.PATH_GUIDE_MODULE_NAME
|
||||
import com.mogo.module.guide.util.isDeviceOfD
|
||||
import com.mogo.service.module.IMogoModuleProvider
|
||||
import com.mogo.service.module.ModuleType
|
||||
import com.mogo.utils.UiThreadHandler
|
||||
import com.mogo.utils.logger.Logger
|
||||
|
||||
@Route(path = PATH_GUIDE_FRAGMENT)
|
||||
@@ -58,12 +55,7 @@ class MogoGuideProvider : IMogoModuleProvider {
|
||||
|
||||
override fun init(context: Context?) {
|
||||
Logger.d("MogoGuideProvider", "init====")
|
||||
// if (DebugConfig.isLoadGuideModule()) {
|
||||
GuideBizManager.init()
|
||||
// } else {
|
||||
// Logger.d("MogoGuideProvider", "device type is not D")
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
override fun getAppPackage(): String? {
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</LinearLayout>
|
||||
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 635 B After Width: | Height: | Size: 635 B |
|
Before Width: | Height: | Size: 713 B After Width: | Height: | Size: 713 B |
|
After Width: | Height: | Size: 334 KiB |
|
After Width: | Height: | Size: 309 KiB |
|
After Width: | Height: | Size: 323 KiB |
|
After Width: | Height: | Size: 451 KiB |
|
After Width: | Height: | Size: 419 KiB |
|
After Width: | Height: | Size: 749 B |
|
After Width: | Height: | Size: 820 B |
|
After Width: | Height: | Size: 816 KiB |
|
After Width: | Height: | Size: 757 KiB |
|
After Width: | Height: | Size: 844 KiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
@@ -10,6 +10,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.context.ContextHolderUtil;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.mvp.MvpActivity;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
@@ -131,6 +132,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
@Override
|
||||
protected void onCreate( @Nullable Bundle savedInstanceState ) {
|
||||
super.onCreate( savedInstanceState );
|
||||
ContextHolderUtil.holdContext(this);
|
||||
mPresenter.postLoadModuleMsg();
|
||||
}
|
||||
|
||||
@@ -140,6 +142,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
}
|
||||
mServiceApis.getShareManager().resetContext( this );
|
||||
mServiceApis.getAuthManagerApi().showAuth( this );
|
||||
|
||||
mMogoStatusManager = mServiceApis.getStatusManagerApi();
|
||||
mMogoStatusManager.setMainPageLaunchedStatus( TAG, true );
|
||||
AutopilotServiceManage.getInstance().init( getContext() );
|
||||
@@ -353,5 +356,6 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
mServiceApis.getRefreshStrategyControllerApi().clearAllData();
|
||||
AIAssist.getInstance( this ).release();
|
||||
mServiceApis.getOnlineCarPanelApi().clear();
|
||||
ContextHolderUtil.releaseContext();
|
||||
}
|
||||
}
|
||||
|
||||