[Chat]车聊聊架构升级

This commit is contained in:
renwj
2022-03-09 11:18:30 +08:00
committed by zhongchao
parent b16e7edbd3
commit 9275ed5ff2
178 changed files with 8116 additions and 301 deletions

View File

@@ -26,8 +26,6 @@ import com.mogo.service.map.IMogoMapService;
import com.mogo.service.module.IMogoActionManager;
import com.mogo.service.module.IMogoRegisterCenter;
import com.mogo.service.statusmanager.IMogoStatusManager;
import com.zhidao.carchattingprovider.CallChattingProviderConstant;
import com.zhidao.carchattingprovider.ICarsChattingProvider;
/**
* author : donghongyu
@@ -55,15 +53,10 @@ public class MarkerServiceHandler {
private static IMogoIntentManager sIntentManager;
private static IMogoADASController sADASController;
private static IMogoFragmentManager sFragmentManager;
private static ICarsChattingProvider sCarChatting;
private static IMogoOverlayManager sIMogoOverlayManager;
public static synchronized void init( final Context context ) {
if ( sCarChatting != null ) {
return;
}
sApis = MogoApisHandler.getInstance().getApis();
sMapService = sApis.getMapServiceApi();
sImageloader = sApis.getImageLoaderApi();
@@ -80,8 +73,6 @@ public class MarkerServiceHandler {
sIntentManager = sApis.getIntentManagerApi();
sADASController = sApis.getAdasControllerApi();
sFragmentManager = sApis.getFragmentManagerApi();
sCarChatting = ( ICarsChattingProvider ) ARouter.getInstance().build( CallChattingProviderConstant.CAR_CALL_PROVIDER ).navigation( context );
MapMarkerManager.getInstance().init( context );
}
@@ -149,9 +140,6 @@ public class MarkerServiceHandler {
return sDataManager;
}
public static ICarsChattingProvider getCarChatting() {
return sCarChatting;
}
public static IMogoOverlayManager getsIMogoOverlayManager() {
return sIMogoOverlayManager;

View File

@@ -6,15 +6,10 @@ import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.service.launchercard.LauncherCardRefresher;
import com.mogo.module.service.marker.MapMarkerManager;
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
import com.mogo.service.statusmanager.StatusDescriptor;
import com.zhidao.carchattingprovider.CallChattingProviderConstant;
import com.zhidao.carchattingprovider.ICallChatResponse;
import com.zhidao.carchattingprovider.ICallProviderResponse;
import com.zhidao.carchattingprovider.ICarsChattingProvider;
import org.jetbrains.annotations.NotNull;
import org.json.JSONObject;
@@ -32,8 +27,6 @@ abstract class StatusChangedAdapter implements IMogoStatusChangedListener {
private boolean mIsMainPageFirstResume = true;
private ICallProviderResponse mCallProviderResponse;
private ICarsChattingProvider mCarsChattingProvider;
private boolean mIsFirstAccOn = true;
@@ -99,20 +92,20 @@ abstract class StatusChangedAdapter implements IMogoStatusChangedListener {
* 关闭所有模块的控制面板
*/
private void closeAllPanel() {
if (mCallProviderResponse == null) {
mCallProviderResponse = new ICallChatResponse() {
@Override
public void hideUserWindowError(@NotNull String errorMsg) {
}
};
}
if (mCarsChattingProvider == null) {
mCarsChattingProvider = (ICarsChattingProvider) ARouter.getInstance().build(CallChattingProviderConstant.CAR_CALL_PROVIDER).navigation();
}
if (mCarsChattingProvider != null) {
mCarsChattingProvider.hideUserWindow(TAG, AbsMogoApplication.getApp(), mCallProviderResponse);
}
//
// if (mCallProviderResponse == null) {
// mCallProviderResponse = new ICallChatResponse() {
// @Override
// public void hideUserWindowError(@NotNull String errorMsg) {
// }
// };
// }
// if (mCarsChattingProvider == null) {
// mCarsChattingProvider = (ICarsChattingProvider) ARouter.getInstance().build(CallChattingProviderConstant.CAR_CALL_PROVIDER).navigation();
// }
// if (mCarsChattingProvider != null) {
// mCarsChattingProvider.hideUserWindow(TAG, AbsMogoApplication.getApp(), mCallProviderResponse);
// }
}
public void onSeekHelpingStatusChanged(boolean isSeekingHelping) {

View File

@@ -39,7 +39,6 @@ import com.mogo.realtime.api.MoGoAiCloudRealTime;
import com.mogo.realtime.socket.IMogoCloudOnMsgListener;
import com.mogo.service.adas.IMogoADASControlStatusChangedListener;
import com.mogo.service.module.IMogoBizActionDoneListener;
import com.zhidao.carchattingprovider.ICallChatResponse;
import org.json.JSONArray;
import org.json.JSONException;
@@ -108,26 +107,26 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
MarkerServiceHandler.getActionManager().registerBizActionDoneListener(this);
MarkerServiceHandler.getApis().getRegisterCenterApi().registerADASControlStatusChangedListener(TAG, this);
if (CallChatApi.getInstance().getApiProvider() != null) {
CallChatApi.getInstance().getApiProvider().registerUserWindowStatusListener(TAG, mContext, new ICallChatResponse() {
@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 (CallChatApi.getInstance().getApiProvider() != null) {
// CallChatApi.getInstance().getApiProvider().registerUserWindowStatusListener(TAG, mContext, new ICallChatResponse() {
//
// @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();
// }
// }
//
// });
// }
/*
* 云端下发数据与adas定频传输数据均发送至同一Handler线程处理