修改 launcher ACC OFF 之后页面偶现被回收,无法重启的问题。

This commit is contained in:
wangcongtao
2020-10-09 19:31:24 +08:00
parent c50d798cdb
commit e1a12cde10
3 changed files with 19 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ package com.zhidao.mogo.module.main.launcher;
import android.content.Intent;
import android.os.Bundle;
import android.os.Process;
import android.text.TextUtils;
import android.view.View;
@@ -82,4 +83,15 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
protected boolean shouldCloseADASPanelWhenPause() {
return !mIsHomeKeyDown;
}
@Override
protected void onDestroy() {
super.onDestroy();
try {
// acc off 之后会出现进程还在,但是页面被杀的情况,这个直接杀掉进程,然后让整个进程重启
Process.killProcess( Process.myPid() );
} catch ( Exception e ) {
e.printStackTrace();
}
}
}

View File

@@ -347,6 +347,10 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
protected void onDestroy() {
super.onDestroy();
mMogoMapService.getHostListenerRegister().unregisterMarkerClickListener();
mMogoMapService.getHostListenerRegister().unregisterHostAimlessModeListener();
mMogoMapService.getHostListenerRegister().unregisterHostNaviListener();
mMogoMapService.getHostListenerRegister().unregisterHostMapListener();
mMogoMapService.getHostListenerRegister().registerMarkerClickListener( this );
mMogoStatusManager.setMainPageLaunchedStatus( TAG, false );
mMogoMapService = null;
mMogoMapUIController = null;

View File

@@ -509,6 +509,9 @@ public class TanluSlideAdapterNew extends RecyclerView.Adapter<TanluSlideViewHol
@Override
public void onMapUiModeChanged(EnumMapUI mapUI) {
if ( mRoundLayout == null ) {
return;
}
switch ( mapUI ) {
case Type_Night:
Log.d("liyz", "Type_Night ---------> ");