解决对象重复创建的问题

This commit is contained in:
wangcongtao
2020-12-01 10:04:21 +08:00
parent b472860888
commit 2b84ca6b36

View File

@@ -400,7 +400,7 @@ public class MogoServices implements IMogoMapListener,
*/
private void closeAllPanel() {
if ( mCallProviderResponse != null ) {
if ( mCallProviderResponse == null ) {
mCallProviderResponse = new ICallChatResponse() {
@Override
public void hideUserWindowError(@NotNull String errorMsg) {
@@ -411,9 +411,11 @@ public class MogoServices implements IMogoMapListener,
MogoApisHandler.getInstance().getApis().getOnlineCarPanelApi().hidePanel();
MogoApisHandler.getInstance().getApis().getAdasControllerApi().setSettingStatus(false);
MogoApisHandler.getInstance().getApis().getEventPanelManager().hidePanel();
carsChattingProvider = (ICarsChattingProvider) ARouter.getInstance().build(CallChattingProviderConstant.CAR_CALL_PROVIDER).navigation();
if ( carsChattingProvider == null ) {
carsChattingProvider = (ICarsChattingProvider) ARouter.getInstance().build(CallChattingProviderConstant.CAR_CALL_PROVIDER).navigation();
}
if ( carsChattingProvider != null ) {
carsChattingProvider.hideUserWindow("MOGO_COMMON_SERVICE", mContext, mCallProviderResponse);
carsChattingProvider.hideUserWindow(TAG, mContext, mCallProviderResponse);
}
}