merge
This commit is contained in:
@@ -46,8 +46,7 @@ import java.util.List;
|
||||
*/
|
||||
public class MainActivity extends MvpActivity< MainView, MainPresenter > implements MainView,
|
||||
IMogoLocationListener,
|
||||
IMogoMarkerClickListener,
|
||||
IMogoIntentListener {
|
||||
IMogoMarkerClickListener {
|
||||
|
||||
protected static final String TAG = MainActivity.class.getSimpleName();
|
||||
|
||||
@@ -65,7 +64,6 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
protected View mCoverUpLayout;
|
||||
protected FrameLayout mLeftPanelLayout;
|
||||
protected View mLeftShadowFrame;
|
||||
private boolean mIsHomeKeyDown = false;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@@ -247,7 +245,6 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
if ( mCoverUpLayout.getVisibility() != View.VISIBLE ) {
|
||||
mServiceApis.getAdasControllerApi().showADAS();
|
||||
}
|
||||
getApis().getIntentManagerApi().registerIntentListener( Intent.ACTION_CLOSE_SYSTEM_DIALOGS, this );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -256,24 +253,21 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
mMogoStatusManager.setMainPageResumeStatus( TAG, false );
|
||||
mMogoStatusManager.setMainPageLaunchedStatus( TAG, false );
|
||||
mServiceApis.getAuthManagerApi().dismiss();
|
||||
if ( shouldCloseADASPanel() ) {
|
||||
if ( shouldCloseADASPanelWhenPause() ) {
|
||||
mServiceApis.getAdasControllerApi().closeADAS();
|
||||
}
|
||||
mIsHomeKeyDown = false;
|
||||
}
|
||||
|
||||
private boolean shouldCloseADASPanel(){
|
||||
protected boolean shouldCloseADASPanelWhenPause(){
|
||||
// m4 系列因为按home键会造成页面pause后resume,造成adas panel 闪烁
|
||||
// f 系列加上上滑返回桌面后会走 mIsHomeKeyDown = true,但是不会造成页面pause
|
||||
// 独立 app 任何情况下都需要隐藏 adas
|
||||
return !mIsHomeKeyDown
|
||||
|| !DebugConfig.isLauncher();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
getApis().getIntentManagerApi().unregisterIntentListener( Intent.ACTION_CLOSE_SYSTEM_DIALOGS, this );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -305,13 +299,6 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
return mServiceApis;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onIntentReceived( String intentStr, Intent intent ) {
|
||||
if ( TextUtils.equals( Intent.ACTION_CLOSE_SYSTEM_DIALOGS, intentStr ) ) {
|
||||
mIsHomeKeyDown = intent.getBooleanExtra( "isHomeKeyDown", true );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
Reference in New Issue
Block a user