[Chat]车聊聊架构升级
This commit is contained in:
@@ -79,7 +79,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
|
||||
} else {
|
||||
compileOnly project(':modules:mogo-module-carchattingprovider')
|
||||
//compileOnly project(':modules:mogo-module-carchattingprovider')
|
||||
|
||||
api project(":libraries:mogo-map")
|
||||
api project(':core:mogo-core-utils')
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
-keep class com.mogo.chat.model.*{*;}
|
||||
-keep class com.mogo.chat.net.*{*;}
|
||||
-keep class com.mogo.chat.service.InvokeDataProxy{*;}
|
||||
-keep class com.mogo.chat.util.audio.IAudioFocus{*;}
|
||||
-keep class com.mogo.eagle.core.function.chat.utils.IAudioFocus{*;}
|
||||
-keep class com.mogo.chat.util.sp.SharedPreferenceUtil{*;}
|
||||
-keep class com.mogo.chat.util.AnalyticsUtilKt{*;}
|
||||
-keep class com.mogo.chat.util.LogUtil{*;}
|
||||
|
||||
@@ -75,8 +75,6 @@ dependencies {
|
||||
api rootProject.ext.dependencies.mogomapapi
|
||||
api rootProject.ext.dependencies.mogocommons
|
||||
api rootProject.ext.dependencies.mogoserviceapi
|
||||
implementation rootProject.ext.dependencies.callchatprovider
|
||||
|
||||
api rootProject.ext.dependencies.mogo_core_utils
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
@@ -85,8 +83,6 @@ dependencies {
|
||||
api project(":libraries:mogo-map-api")
|
||||
api project(":foudations:mogo-commons")
|
||||
api project(':services:mogo-service-api')
|
||||
implementation project(':modules:mogo-module-carchattingprovider')
|
||||
|
||||
api project(':core:mogo-core-utils')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
|
||||
@@ -2,11 +2,7 @@ package com.mogo.module.common.api;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.module.common.entity.MarkerOnlineCar;
|
||||
import com.zhidao.carchattingprovider.ICarsChattingProvider;
|
||||
import com.zhidao.carchattingprovider.MogoDriverInfo;
|
||||
|
||||
public
|
||||
/**
|
||||
@@ -22,7 +18,7 @@ class CallChatApi {
|
||||
private static volatile CallChatApi sInstance;
|
||||
|
||||
private CallChatApi() {
|
||||
mApiProvider = ARouter.getInstance().navigation( ICarsChattingProvider.class );
|
||||
//mApiProvider = ARouter.getInstance().navigation( ICarsChattingProvider.class );
|
||||
}
|
||||
|
||||
public static CallChatApi getInstance() {
|
||||
@@ -45,37 +41,24 @@ class CallChatApi {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public ICarsChattingProvider getApiProvider() {
|
||||
return mApiProvider;
|
||||
}
|
||||
|
||||
private ICarsChattingProvider mApiProvider;
|
||||
|
||||
public void showUserWindow( Context context, MarkerOnlineCar onlineCar ) throws Exception {
|
||||
if ( mApiProvider == null ) {
|
||||
Logger.e( TAG, "no call chat api instance." );
|
||||
return;
|
||||
}
|
||||
MogoDriverInfo driverInfo = new MogoDriverInfo();
|
||||
driverInfo.setAge( onlineCar.getUserInfo().getAgeNumber() );
|
||||
driverInfo.setCarTypeName( onlineCar.getCarInfo().getCarTypeName() );
|
||||
driverInfo.setGender( onlineCar.getUserInfo().getGender() );
|
||||
driverInfo.setLat( onlineCar.getLocation().getLat() );
|
||||
driverInfo.setLon( onlineCar.getLocation().getLon() );
|
||||
driverInfo.setLocationInfo( onlineCar.getLocation().getAddress() );
|
||||
driverInfo.setSn( onlineCar.getUserInfo().getSn() );
|
||||
driverInfo.setUserHead( onlineCar.getUserInfo().getUserHead() );
|
||||
driverInfo.setUserName( onlineCar.getUserInfo().getUserName() );
|
||||
if ( mApiProvider != null ) {
|
||||
mApiProvider.showUserWindow( TAG, driverInfo, context );
|
||||
}
|
||||
// if ( mApiProvider == null ) {
|
||||
// Logger.e( TAG, "no call chat api instance." );
|
||||
// return;
|
||||
// }
|
||||
// MogoDriverInfo driverInfo = new MogoDriverInfo();
|
||||
// driverInfo.setAge( onlineCar.getUserInfo().getAgeNumber() );
|
||||
// driverInfo.setCarTypeName( onlineCar.getCarInfo().getCarTypeName() );
|
||||
// driverInfo.setGender( onlineCar.getUserInfo().getGender() );
|
||||
// driverInfo.setLat( onlineCar.getLocation().getLat() );
|
||||
// driverInfo.setLon( onlineCar.getLocation().getLon() );
|
||||
// driverInfo.setLocationInfo( onlineCar.getLocation().getAddress() );
|
||||
// driverInfo.setSn( onlineCar.getUserInfo().getSn() );
|
||||
// driverInfo.setUserHead( onlineCar.getUserInfo().getUserHead() );
|
||||
// driverInfo.setUserName( onlineCar.getUserInfo().getUserName() );
|
||||
// if ( mApiProvider != null ) {
|
||||
// mApiProvider.showUserWindow( TAG, driverInfo, context );
|
||||
// }
|
||||
}
|
||||
|
||||
public void hideUserWindow( Context context ) {
|
||||
if ( mApiProvider == null ) {
|
||||
Logger.e( TAG, "no call chat api instance." );
|
||||
return;
|
||||
}
|
||||
mApiProvider.hideUserWindow( TAG, context, null );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,14 +22,11 @@ import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.R;
|
||||
import com.mogo.module.common.api.CallChatApi;
|
||||
import com.mogo.module.common.constants.DataTypes;
|
||||
import com.mogo.module.common.utils.Trigonometric;
|
||||
import com.mogo.service.adas.IMogoADASController;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
import com.zhidao.carchattingprovider.ICarsChattingProvider;
|
||||
import com.zhidao.carchattingprovider.MogoDriverInfo;
|
||||
import com.zhjt.service.chain.ChainLog;
|
||||
import com.zhjt.service.chain.TracingConstants;
|
||||
|
||||
@@ -487,7 +484,7 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic
|
||||
*/
|
||||
private void showCarCallPanel(SocketDownData.CloudRoadDataProto data) {
|
||||
|
||||
MogoDriverInfo driverInfo = new MogoDriverInfo();
|
||||
/* MogoDriverInfo driverInfo = new MogoDriverInfo();
|
||||
driverInfo.setLat(data.getLat());
|
||||
driverInfo.setLon(data.getLon());
|
||||
driverInfo.setSn(data.getSn());
|
||||
@@ -499,7 +496,7 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic
|
||||
} catch (Exception e) {
|
||||
Logger.e(TAG, e, "showCarCallPanel");
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
public void changeIconResourceIfNecessary(SocketDownData.CloudRoadDataProto cloudRoadData, IMogoMarker marker) {
|
||||
|
||||
0
modules/mogo-module-main/build.gradle
Normal file
0
modules/mogo-module-main/build.gradle
Normal file
@@ -58,7 +58,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.mogoserviceapi
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
implementation rootProject.ext.dependencies.callchatprovider
|
||||
//implementation rootProject.ext.dependencies.callchatprovider
|
||||
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_res
|
||||
@@ -70,8 +70,6 @@ dependencies {
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':services:mogo-service-api')
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':modules:mogo-module-carchattingprovider')
|
||||
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-res')
|
||||
implementation project(':core:mogo-core-utils')
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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线程处理
|
||||
|
||||
Reference in New Issue
Block a user