优化代码
This commit is contained in:
@@ -412,7 +412,9 @@ public class MogoServices implements IMogoMapListener,
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().setSettingStatus(false);
|
||||
MogoApisHandler.getInstance().getApis().getEventPanelManager().hidePanel();
|
||||
carsChattingProvider = (ICarsChattingProvider) ARouter.getInstance().build(CallChattingProviderConstant.CAR_CALL_PROVIDER).navigation();
|
||||
carsChattingProvider.hideUserWindow("MOGO_COMMON_SERVICE", mContext, mCallProviderResponse);
|
||||
if ( carsChattingProvider != null ) {
|
||||
carsChattingProvider.hideUserWindow("MOGO_COMMON_SERVICE", mContext, mCallProviderResponse);
|
||||
}
|
||||
}
|
||||
|
||||
public void init(Context context) {
|
||||
|
||||
@@ -113,24 +113,26 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
MarkerServiceHandler.getActionManager().registerBizActionDoneListener( this );
|
||||
MarkerServiceHandler.getApis().getRegisterCenterApi().registerADASControlStatusChangedListener( TAG, this );
|
||||
|
||||
CallChatApi.getInstance().getApiProvider().registerUserWindowStatusListener( TAG, mContext, new ICallChatResponse() {
|
||||
if ( CallChatApi.getInstance().getApiProvider() != null ) {
|
||||
CallChatApi.getInstance().getApiProvider().registerUserWindowStatusListener( TAG, mContext, new ICallChatResponse() {
|
||||
|
||||
@Override
|
||||
public void userWindowStatus( boolean show ) {
|
||||
try {
|
||||
if ( mLastCheckMarker == null ) {
|
||||
return;
|
||||
@Override
|
||||
public void userWindowStatus( boolean show ) {
|
||||
try {
|
||||
if ( mLastCheckMarker == null ) {
|
||||
return;
|
||||
}
|
||||
if ( TextUtils.equals( mLastCheckMarker.getOwner(), ModuleNames.CARD_TYPE_USER_DATA )
|
||||
&& !show ) {
|
||||
closeMarker( mLastCheckMarker );
|
||||
}
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if ( TextUtils.equals( mLastCheckMarker.getOwner(), ModuleNames.CARD_TYPE_USER_DATA )
|
||||
&& !show ) {
|
||||
closeMarker( mLastCheckMarker );
|
||||
}
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
} );
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -194,7 +194,9 @@ public class UserDataMarkerInfoWindowAdapter implements IMogoInfoWindowAdapter {
|
||||
params.put( CallChattingProviderConstant.CCPROVIDER_LON, location.getLon() + "" );
|
||||
}
|
||||
Logger.d( TAG, "call parameters: %s", params );
|
||||
MarkerServiceHandler.getCarChatting().call( params );
|
||||
if ( MarkerServiceHandler.getCarChatting() != null ) {
|
||||
MarkerServiceHandler.getCarChatting().call( params );
|
||||
}
|
||||
}
|
||||
|
||||
protected void loadImageHeader( final MarkerShowEntity markerShowEntity ) {
|
||||
|
||||
@@ -78,7 +78,9 @@ class OnlineCarPanelAdapter extends RecyclerView.Adapter<OnlineCarPanelAdapter.V
|
||||
params.put(CallChattingProviderConstant.CCPROVIDER_LAT, location.getLat() + "");
|
||||
params.put(CallChattingProviderConstant.CCPROVIDER_LON, location.getLon() + "");
|
||||
ICarsChattingProvider carChatting = MarkerServiceHandler.getCarChatting();
|
||||
carChatting.call(params);
|
||||
if ( carChatting != null ) {
|
||||
carChatting.call(params);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user