opt ADAS show
This commit is contained in:
@@ -21,6 +21,7 @@ import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.zhidao.autopilot.support.api.AutopilotServiceManage;
|
||||
import com.zhidao.autopilot.support.api.IAutopilotServiceStatusListener;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
@@ -69,11 +70,23 @@ public class MogoADASController implements IMogoADASController {
|
||||
public void showADAS() {
|
||||
|
||||
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
|
||||
if ( !isProcessRunning( AbsMogoApplication.getApp(), getPackageUid( AbsMogoApplication.getApp(), "com.zhidiao.autopilot" ) )
|
||||
|| mIsReleased ) {
|
||||
init( AbsMogoApplication.getApp() );
|
||||
}
|
||||
init( AbsMogoApplication.getApp() );
|
||||
AutopilotServiceManage.getInstance().registerAutopilotServiceStatusListener( new IAutopilotServiceStatusListener() {
|
||||
@Override
|
||||
public void onServiceConnected() {
|
||||
invokeShowADASOperation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onServiceDisconnected() {
|
||||
|
||||
}
|
||||
} );
|
||||
invokeShowADASOperation();
|
||||
|
||||
}
|
||||
|
||||
private void invokeShowADASOperation() {
|
||||
int delay = CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ? 0 : 100;
|
||||
|
||||
UiThreadHandler.postDelayed( () -> {
|
||||
|
||||
Reference in New Issue
Block a user