opt
This commit is contained in:
@@ -6,11 +6,9 @@ import android.widget.FrameLayout;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.map.CustomNaviInterrupter;
|
||||
import com.mogo.module.main.MainActivity;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
|
||||
/**
|
||||
* 针对独立应用形式,做单独定制
|
||||
@@ -18,6 +16,7 @@ import com.mogo.service.MogoServicePaths;
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class MainIndependentActivity extends MainActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate( @Nullable Bundle savedInstanceState ) {
|
||||
super.onCreate( savedInstanceState );
|
||||
@@ -55,4 +54,17 @@ public class MainIndependentActivity extends MainActivity {
|
||||
super.onPause();
|
||||
mServiceApis.getAdasControllerApi().setUseAlgorithm( false );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean doWhenBackPressed() {
|
||||
return exitCustomNaviIfNecessary();
|
||||
}
|
||||
|
||||
private boolean exitCustomNaviIfNecessary() {
|
||||
if ( CustomNaviInterrupter.getInstance().interrupt() ) {
|
||||
return false;
|
||||
}
|
||||
mServiceApis.getMapServiceApi().getNavi( this ).stopNavi();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user