diff --git a/.idea/misc.xml b/.idea/misc.xml
index 75870e9c9a..5d572339ef 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -13,64 +13,62 @@
-
+
\ No newline at end of file
diff --git a/app/src/main/java/com/mogo/launcher/MogoApplication.java b/app/src/main/java/com/mogo/launcher/MogoApplication.java
index 8c355bb789..b79437d81e 100644
--- a/app/src/main/java/com/mogo/launcher/MogoApplication.java
+++ b/app/src/main/java/com/mogo/launcher/MogoApplication.java
@@ -5,6 +5,7 @@ import android.content.Intent;
import android.os.Process;
import android.util.Log;
+import com.alibaba.android.arouter.launcher.ARouter;
import com.auto.zhidao.logsdk.CrashSystem;
import com.bytedance.boost_multidex.BoostMultiDex;
import com.mogo.cloud.httpdns.MogoHttpDnsConfig;
@@ -32,6 +33,9 @@ import com.mogo.module.share.constant.ShareConstants;
import com.mogo.module.v2x.V2XConst;
import com.mogo.module.v2x.utils.ObuConfig;
import com.mogo.service.IMogoServiceApis;
+import com.mogo.service.cloud.socket.IMogoLifecycleListener;
+import com.mogo.test.crashreport.ITestCrashReportProvider;
+import com.mogo.test.crashreport.upgrade.UpgradeReportProvider;
import com.mogo.test.crashreport.CrashReportConstants;
import com.mogo.test.crashreport.upgrade.UpgradeReportConstants;
import com.mogo.utils.ProcessUtils;
@@ -249,6 +253,22 @@ public class MogoApplication extends AbsMogoApplication {
IMogoServiceApis apis = MogoApisHandler.getInstance().getApis();
// 关闭长链服务
apis.getSocketManagerApi(getApplicationContext()).destroy();
+ apis.getSocketManagerApi(this).registerLifecycleListener(10020, new IMogoLifecycleListener() {
+ @Override
+ public void onConnectFailure() {
+ DebugConfig.setDownloadSnapshot(false);
+ }
+
+ @Override
+ public void onConnectSuccess() {
+ DebugConfig.setDownloadSnapshot(true);
+ }
+
+ @Override
+ public void onConnectLost() {
+ DebugConfig.setDownloadSnapshot(false);
+ }
+ });
// 开启Socket长链服务
apis.getSocketManagerApi(getApplicationContext()).init(getApplicationContext(), DebugConfig.getSocketAppId());
}
diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java
index a12050ef61..1fb9240bab 100644
--- a/foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java
+++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java
@@ -310,6 +310,26 @@ public class DebugConfig {
return sProductFlavor != null && sProductFlavor.startsWith("foch");
}
+ public static int sSelfCarSpeedYOffset = 20;
+
+ public static void setSelfCarSpeedYOffset(int sSelfCarSpeedYOffset) {
+ DebugConfig.sSelfCarSpeedYOffset = sSelfCarSpeedYOffset;
+ }
+
+ public static int getSelfCarSpeedYOffset() {
+ return sSelfCarSpeedYOffset;
+ }
+
+ private static boolean downloadSnapshot = false;
+
+ public static boolean isDownloadSnapshot() {
+ return downloadSnapshot;
+ }
+
+ public static void setDownloadSnapshot(boolean downloadSnapshot) {
+ DebugConfig.downloadSnapshot = downloadSnapshot;
+ }
+
// 环境状态
public static final int sLocation = 0;
public static final int sAdasRecognized = 1;
diff --git a/modules/mogo-module-carchatting/src/main/AndroidManifest.xml b/modules/mogo-module-carchatting/src/main/AndroidManifest.xml
index c7222743b9..1641da03d7 100644
--- a/modules/mogo-module-carchatting/src/main/AndroidManifest.xml
+++ b/modules/mogo-module-carchatting/src/main/AndroidManifest.xml
@@ -1,2 +1,14 @@
+ package="com.mogo.module.carchatting" >
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/CallChatCenter.kt b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/CallChatCenter.kt
index 82f2381bb5..db5a88ac08 100644
--- a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/CallChatCenter.kt
+++ b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/CallChatCenter.kt
@@ -7,7 +7,9 @@ import com.google.gson.Gson
import com.mogo.chat.constant.CALL_TYPE_VEHICLE_TEAM
import com.mogo.chat.model.bean.TeammateInfo
import com.mogo.chat.service.IMService
+import com.mogo.chat.util.UserInfoHelper
import com.mogo.chat.util.UserInfoHelper.currentCallType
+import com.mogo.chat.util.log
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.eagle.core.data.constants.MogoServicePaths.PATH_SERVICE_APIS
import com.mogo.module.carchatting.R
@@ -30,7 +32,7 @@ import com.mogo.utils.logger.Logger
import com.zhidao.carchattingprovider.MogoDriverInfo
class CallChatCenter private constructor() : IBizCallChat.IBizCallBack, IVoiceCommandListener,
- IVoiceIntentListener {
+ IVoiceIntentListener {
companion object {
const val TAG: String = "CallChatCenter"
@@ -87,14 +89,14 @@ class CallChatCenter private constructor() : IBizCallChat.IBizCallBack, IVoiceCo
this.serviceApi = mogoService
}
serviceApi?.statusManagerApi?.registerStatusChangedListener(
- MODULE_NAME,
- StatusDescriptor.MAIN_PAGE_RESUME,
- statusChangedListener
+ MODULE_NAME,
+ StatusDescriptor.MAIN_PAGE_RESUME,
+ statusChangedListener
)
serviceApi?.statusManagerApi?.registerStatusChangedListener(
- MODULE_NAME,
- StatusDescriptor.VR_MODE,
- statusChangedListener
+ MODULE_NAME,
+ StatusDescriptor.VR_MODE,
+ statusChangedListener
)
}
@@ -105,7 +107,10 @@ class CallChatCenter private constructor() : IBizCallChat.IBizCallBack, IVoiceCo
if (status) {
VoiceUtil.registerAll(context!!, this, this)
syncInitStatus()
- Logger.i(TAG, "MAIN_PAGE_RESUME callType: $currentCallType , status : ${callChatManager.isCalling()}")
+ Logger.i(
+ TAG,
+ "MAIN_PAGE_RESUME callType: $currentCallType , status : ${callChatManager.isCalling()}"
+ )
if (currentCallType == CALL_TYPE_VEHICLE_TEAM && callChatManager.isCalling()) {
callWindowShowCallBack()
callingWindowManager.showVehicleTeamView()
@@ -122,7 +127,10 @@ class CallChatCenter private constructor() : IBizCallChat.IBizCallBack, IVoiceCo
}
}
StatusDescriptor.VR_MODE -> {
- Logger.i(TAG, "VR_MODE callType: $currentCallType , status : ${callChatManager.isCalling()}")
+ Logger.i(
+ TAG,
+ "VR_MODE callType: $currentCallType , status : ${callChatManager.isCalling()}"
+ )
updateCallingWindowInVRMode()
}
else -> {
@@ -217,8 +225,8 @@ class CallChatCenter private constructor() : IBizCallChat.IBizCallBack, IVoiceCo
private fun match(matchType: Int, from: Int = 1) {
LogUtil.i(TAG, "startMatch")
AnalyticsUtil.track(
- INVOKE_TRACK_MATCH_SHOW,
- mutableMapOf("matchatype" to matchType, "source" to 2, "from" to from)
+ INVOKE_TRACK_MATCH_SHOW,
+ mutableMapOf("matchatype" to matchType, "source" to 2, "from" to from)
)
callChatManager.match()
}
@@ -234,8 +242,8 @@ class CallChatCenter private constructor() : IBizCallChat.IBizCallBack, IVoiceCo
LogUtil.i(TAG, "CARD_MATCH_FAILED matchFailed")
val type = if (isTTS) 1 else 2
AnalyticsUtil.track(
- INVOKE_TRACK_MATCH_FAIL_CLOSE_CLICK,
- hashMapOf("type" to type)
+ INVOKE_TRACK_MATCH_FAIL_CLOSE_CLICK,
+ hashMapOf("type" to type)
)
cancelMatchToDefault(isTTS)
}
@@ -244,19 +252,24 @@ class CallChatCenter private constructor() : IBizCallChat.IBizCallBack, IVoiceCo
private fun showVehicleTeamFragment() {
LogUtil.i(TAG, "showVehicleTeamFragment")
activity?.supportFragmentManager
- ?.beginTransaction()
- ?.replace(containerId!!, VehicleTeamFragment.newInstance(), VehicleTeamFragment::class.simpleName)
- ?.commitNowAllowingStateLoss()
+ ?.beginTransaction()
+ ?.replace(
+ containerId!!,
+ VehicleTeamFragment.newInstance(),
+ VehicleTeamFragment::class.simpleName
+ )
+ ?.commitNowAllowingStateLoss()
}
fun closeVehicleTeamFragment() {
activity?.let {
it.supportFragmentManager.let { fragmentManager ->
- fragmentManager.findFragmentByTag(VehicleTeamFragment::class.simpleName)?.let { fragment ->
- fragmentManager.beginTransaction()
+ fragmentManager.findFragmentByTag(VehicleTeamFragment::class.simpleName)
+ ?.let { fragment ->
+ fragmentManager.beginTransaction()
.remove(fragment)
.commitNowAllowingStateLoss()
- }
+ }
}
}
}
@@ -390,6 +403,20 @@ class CallChatCenter private constructor() : IBizCallChat.IBizCallBack, IVoiceCo
refreshViewByType()
}
+ override fun answerCall() {
+ Logger.d(TAG, "answerCall")
+ taskMainLaunch {
+ callingWindowManager.hideIncomingView()
+ }
+ }
+
+ override fun answerCallError(errorMsg: String) {
+ Logger.d(TAG, "answerCallError")
+ taskMainLaunch {
+ TipToast.shortTip(errorMsg)
+ }
+ }
+
override fun call(userInfo: UserInfo?) {
Logger.d(TAG, "call===userInfo: $userInfo")
if (userInfo != null) {
@@ -450,7 +477,7 @@ class CallChatCenter private constructor() : IBizCallChat.IBizCallBack, IVoiceCo
private fun resetCallingView() {
showCallWindowFromDefault = false
hideLauncherCallingView()
- mapViewManager.resetMarkerStatus()
+ mapViewManager.resetMarkerStatus(serviceApi)
}
override fun callInvokeError(msg: String) {
@@ -458,6 +485,25 @@ class CallChatCenter private constructor() : IBizCallChat.IBizCallBack, IVoiceCo
resetCallingView()
}
+ /**
+ * 收到来电消息
+ * 1.如果当前已经打来电话,再次接收到,则拒绝
+ * 2.如果当前正在打电话中,则拒绝
+ */
+ override fun showIncomingCall(userInfo: UserInfo) {
+ if (callChatManager.isCalling() || callingWindowManager.isIncomingWindowShow()) {
+ log(TAG, "已在通话进程中,准备拒绝他 ---> ")
+ refuseCall(userInfo.sn)
+ } else {
+ log(TAG, "有人打来电话,准备显示 ---> ${UserInfoHelper.currentRoomId}")
+ callingWindowManager.showIncomingView({
+ callChatManager.answerInvoke(userInfo.sn)
+ }, {
+ refuseCall(userInfo.sn)
+ })
+ }
+ }
+
override fun match(userInfo: UserInfo) {
Logger.d(TAG, "match===userInfo: $userInfo")
currentUserInfo = userInfo
@@ -465,7 +511,10 @@ class CallChatCenter private constructor() : IBizCallChat.IBizCallBack, IVoiceCo
}
override fun matchInvokeResult(invokeResult: Boolean, userInfo: UserInfo?, errorMsg: String) {
- Logger.d(TAG, "matchInvokeResult===$invokeResult, msg: $errorMsg, callStatus: ${callChatManager.getStatusName()}")
+ Logger.d(
+ TAG,
+ "matchInvokeResult===$invokeResult, msg: $errorMsg, callStatus: ${callChatManager.getStatusName()}"
+ )
if (invokeResult) {
// 开始匹配成功
currentUserInfo = userInfo
@@ -526,7 +575,10 @@ class CallChatCenter private constructor() : IBizCallChat.IBizCallBack, IVoiceCo
*/
override fun vehicleTeamMemberChange(teamMember: List?) {
try {
- Logger.d(TAG, "vehicleTeamMemberChange:" + teamMember?.size + ":" + teamMember.toString())
+ Logger.d(
+ TAG,
+ "vehicleTeamMemberChange:" + teamMember?.size + ":" + teamMember.toString()
+ )
this.teamMember = teamMember
callingWindowManager.updateVehicleTeamHeadView(teamMember)
mapViewManager.updateTeamMarker(context!!, teamMember)
@@ -600,11 +652,11 @@ class CallChatCenter private constructor() : IBizCallChat.IBizCallBack, IVoiceCo
teamInvitationWindowManager.hideTeamInvitationView()
AnalyticsUtil.track(INVOKE_TRACK_CHATTING)
mapViewManager.showLocationOnMap(
- context!!,
- serviceApi,
- currentUserInfo?.lat?.toDouble(),
- currentUserInfo?.lon?.toDouble(),
- currentUserInfo?.userHead
+ context!!,
+ serviceApi,
+ currentUserInfo?.lat?.toDouble(),
+ currentUserInfo?.lon?.toDouble(),
+ currentUserInfo?.userHead
)
refreshViewByType()
}
@@ -625,7 +677,10 @@ class CallChatCenter private constructor() : IBizCallChat.IBizCallBack, IVoiceCo
* 邀请加入车队
*/
fun inviteJoinVehicleTeam(sn: String) {
- Logger.i(TAG, "isCalling():" + callChatManager.isCalling() + ",currentCallType:" + currentCallType)
+ Logger.i(
+ TAG,
+ "isCalling():" + callChatManager.isCalling() + ",currentCallType:" + currentCallType
+ )
if (callChatManager.isCalling() && currentCallType != CALL_TYPE_VEHICLE_TEAM) {
toast(R.string.module_car_chat_in_call)
return
@@ -654,7 +709,10 @@ class CallChatCenter private constructor() : IBizCallChat.IBizCallBack, IVoiceCo
}
private fun onPause() {
- Logger.i(TAG, "onPause currentCallType : $currentCallType , status: ${callChatManager.isCalling()}")
+ Logger.i(
+ TAG,
+ "onPause currentCallType : $currentCallType , status: ${callChatManager.isCalling()}"
+ )
userWindowManager.hideUserView()
callWindowHideCallBack()
if (currentCallType == CALL_TYPE_VEHICLE_TEAM && callChatManager.isCalling()) {
@@ -668,14 +726,14 @@ class CallChatCenter private constructor() : IBizCallChat.IBizCallBack, IVoiceCo
fun onDestroy() {
serviceApi?.statusManagerApi?.unregisterStatusChangedListener(
- MODULE_NAME,
- StatusDescriptor.MAIN_PAGE_RESUME,
- statusChangedListener
+ MODULE_NAME,
+ StatusDescriptor.MAIN_PAGE_RESUME,
+ statusChangedListener
)
serviceApi?.statusManagerApi?.unregisterStatusChangedListener(
- MODULE_NAME,
- StatusDescriptor.VR_MODE,
- statusChangedListener
+ MODULE_NAME,
+ StatusDescriptor.VR_MODE,
+ statusChangedListener
)
teamInvitationWindowManager.onDestroy()
flag = null
diff --git a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/CallChatManager.kt b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/CallChatManager.kt
index f546df788c..5947485aa0 100644
--- a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/CallChatManager.kt
+++ b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/CallChatManager.kt
@@ -8,7 +8,9 @@ import com.mogo.chat.callcenter.CallTypeManager.Companion.callTypeManager
import com.mogo.chat.constant.CALL_TYPE_MATCHING
import com.mogo.chat.constant.CALL_TYPE_VEHICLE_TEAM
import com.mogo.chat.constant.CALL_TYPE_VOICE
+import com.mogo.chat.model.bean.Message
import com.mogo.chat.model.bean.TeammateInfo
+import com.mogo.chat.model.bean.toSns
import com.mogo.chat.util.CallTimer.Companion.callTimer
import com.mogo.chat.util.UserInfoHelper.currentCallType
import com.mogo.chat.util.UserInfoHelper.tmpSenderInfo
@@ -18,6 +20,7 @@ import com.mogo.module.carchatting.bean.EnthusiasmIndex
import com.mogo.module.carchatting.bean.Result
import com.mogo.module.carchatting.bean.UserInfo
import com.mogo.module.carchatting.bean.toUserInfo
+import com.mogo.module.carchatting.card.CallChatConstant.Companion.TAG
import com.mogo.module.carchatting.net.Repository
import com.mogo.module.carchatting.net.request
import com.mogo.utils.logger.Logger
@@ -27,7 +30,6 @@ class CallChatManager(iBizCallChat: IBizCallChat.IBizCallBack) : ICallResponse {
companion object {
- const val TAG: String = "CallChatManager"
const val METHOD_FLAG = "CAR_CALL_TO_DEFAULT"
}
@@ -47,6 +49,16 @@ class CallChatManager(iBizCallChat: IBizCallChat.IBizCallBack) : ICallResponse {
iBizCallBack?.invokeCallData(toUserInfo(tmpSenderInfo))
}
+ override fun receiverCalling(message: Message) {
+ super.receiverCalling(message)
+ iBizCallBack?.showIncomingCall(toUserInfo(message.toSns()))
+ }
+
+ override fun refuseMatchToShowCalling(message: Message) {
+ super.refuseMatchToShowCalling(message)
+ iBizCallBack?.showIncomingCall(toUserInfo(message.toSns()))
+ }
+
override fun receiverCallingAgree() {
super.receiverCallingAgree()
iBizCallBack?.call(toUserInfo(tmpSenderInfo))
@@ -142,6 +154,11 @@ class CallChatManager(iBizCallChat: IBizCallChat.IBizCallBack) : ICallResponse {
})
}
+ fun answerInvoke(sn: String) {
+ Logger.i(TAG, "answerInvoke")
+ IMCallManager.answer(sn, this)
+ }
+
fun callToSomeone(sn: String) {
Logger.i(TAG, "callToSomeone")
IMCallManager.call(METHOD_FLAG, sn, this)
@@ -204,9 +221,9 @@ class CallChatManager(iBizCallChat: IBizCallChat.IBizCallBack) : ICallResponse {
}
fun getEnthusiasmIndex(
- sn: String,
- onSuccess: (EnthusiasmIndex) -> Unit,
- onError: (String) -> Unit
+ sn: String,
+ onSuccess: (EnthusiasmIndex) -> Unit,
+ onError: (String) -> Unit
) {
request> {
loader {
@@ -238,7 +255,7 @@ class CallChatManager(iBizCallChat: IBizCallChat.IBizCallBack) : ICallResponse {
override fun invokeCallData(invokeData: String) {
super.invokeCallData(invokeData)
- if (!invokeData.isBlank()) {
+ if (invokeData.isNotBlank()) {
val userInfo = Gson().fromJson(invokeData, UserInfo::class.java)
iBizCallBack?.invokeCallData(userInfo)
} else {
@@ -246,10 +263,22 @@ class CallChatManager(iBizCallChat: IBizCallChat.IBizCallBack) : ICallResponse {
}
}
+ override fun answer() {
+ super.answer()
+ Logger.i(TAG, "answer")
+ iBizCallBack?.answerCall()
+ }
+
+ override fun answerCallError(errorMsg: String) {
+ super.answerCallError(errorMsg)
+ Logger.i(TAG, "answerCallError errorMsg : $errorMsg")
+ iBizCallBack?.answerCallError(errorMsg)
+ }
+
override fun call(data: String) {
super.call(data)
Logger.i(TAG, "call data: $data")
- if (!data.isBlank()) {
+ if (data.isNotBlank()) {
val userInfo = Gson().fromJson(data, UserInfo::class.java)
iBizCallBack?.call(userInfo)
} else {
@@ -271,7 +300,11 @@ class CallChatManager(iBizCallChat: IBizCallChat.IBizCallBack) : ICallResponse {
override fun matchInvokeResult(invokeResult: Boolean, msg: String) {
super.matchInvokeResult(invokeResult, msg)
if (invokeResult) {
- iBizCallBack?.matchInvokeResult(invokeResult, Gson().fromJson(msg, UserInfo::class.java), msg)
+ iBizCallBack?.matchInvokeResult(
+ invokeResult,
+ Gson().fromJson(msg, UserInfo::class.java),
+ msg
+ )
} else {
iBizCallBack?.matchInvokeResult(invokeResult, null, msg)
}
diff --git a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/IBizCallChat.kt b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/IBizCallChat.kt
index 3c41b324ba..fa63f750f8 100644
--- a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/IBizCallChat.kt
+++ b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/IBizCallChat.kt
@@ -9,12 +9,18 @@ interface IBizCallChat {
fun callTypeInit()
+ fun answerCall()
+
+ fun answerCallError(errorMsg: String)
+
fun call(userInfo: UserInfo?)
fun invokeCallData(userInfo: UserInfo?)
fun callInvokeError(msg: String)
+ fun showIncomingCall(userInfo: UserInfo)
+
fun match(userInfo: UserInfo)
fun matchInvokeResult(invokeResult: Boolean, userInfo: UserInfo?, errorMsg: String)
diff --git a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/IMCallManager.kt b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/IMCallManager.kt
index 23238d8a5b..cee5f56e03 100644
--- a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/IMCallManager.kt
+++ b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/IMCallManager.kt
@@ -1,6 +1,7 @@
package com.mogo.module.carchatting.biz
import com.google.gson.Gson
+import com.mogo.chat.callcenter.CallController
import com.mogo.chat.callcenter.CallTypeManager.Companion.callTypeManager
import com.mogo.chat.callcenter.IMType
import com.mogo.chat.callcenter.SocketClientFactory
@@ -8,6 +9,7 @@ import com.mogo.chat.callcenter.isInit
import com.mogo.chat.common.gme.GMEApi
import com.mogo.chat.constant.OFFLINE_STATUS
import com.mogo.chat.constant.ONLINE_STATUS
+import com.mogo.chat.model.control.ChatController
import com.mogo.chat.service.ChatServiceHandler
import com.mogo.chat.service.InvokeDataProxy
import com.mogo.chat.util.UserInfoHelper
@@ -15,6 +17,7 @@ import com.mogo.chat.util.UserInfoHelper.currentCallType
import com.mogo.chat.util.UserInfoHelper.tmpSenderInfo
import com.mogo.chat.util.log
import com.mogo.module.carchatting.card.CallChatConstant.Companion.PARAM_SN
+import com.mogo.module.carchatting.card.CallChatConstant.Companion.TAG
import com.zhidao.carchattingprovider.ICallProviderResponse
import com.zhidao.carchattingprovider.ICallResponse
import kotlinx.coroutines.Dispatchers
@@ -24,17 +27,30 @@ import kotlinx.coroutines.launch
class IMCallManager private constructor() {
companion object {
- const val TAG = "IMCallManager"
fun canCall(flag: String, response: ICallProviderResponse) {
log(TAG, "是否能拨打电话 flag --->: $flag")
response.canCall(callTypeManager.callStatus.isInit() && SocketClientFactory.socketClient.isOpen)
}
+ fun answer(sn: String, response: ICallResponse) {
+ ChatServiceHandler.answer(sn, UserInfoHelper.currentRoomId, {
+ log(TAG, "接听电话成功 ---> ")
+ response.answer()
+ ChatController.enterRoom(UserInfoHelper.currentRoomId)
+ CallController.callController.callingReceiver()
+ }, {
+ val errorMsg =
+ if (it.message != null) it.message else "answer call is error ,please try again"
+ response.answerCallError(errorMsg!!)
+ log(TAG, " answer call is error ,please try again")
+ })
+ }
+
fun call(
- flag: String,
- snReceiver: String,
- response: ICallResponse
+ flag: String,
+ snReceiver: String,
+ response: ICallResponse
) {
log(TAG, "拨打电话 sn --->: $snReceiver , flag: $flag")
if (callTypeManager.callStatus.isInit() && SocketClientFactory.socketClient.isOpen) {
@@ -45,15 +61,17 @@ class IMCallManager private constructor() {
response.callInvokeError(exception.message!!)
})
} else {
- log(TAG, "拨打电话出现异常 能否拨打 :${callTypeManager.callStatus.isInit()} " +
- "长连状态:${SocketClientFactory.socketClient.isOpen}")
+ log(
+ TAG, "拨打电话出现异常 能否拨打 :${callTypeManager.callStatus.isInit()} " +
+ "长连状态:${SocketClientFactory.socketClient.isOpen}"
+ )
response.error("call: 正在通话中,请稍后再试")
}
}
fun match(
- flag: String,
- response: ICallResponse
+ flag: String,
+ response: ICallResponse
) {
log(TAG, "开始匹配 ---> flag: $flag ")
ChatServiceHandler.startMatch(flag, {
@@ -101,9 +119,9 @@ class IMCallManager private constructor() {
}
fun hangUp(
- flag: String,
- snReceiver: String,
- response: ICallResponse
+ flag: String,
+ snReceiver: String,
+ response: ICallResponse
) {
log(TAG, "挂断电话 ---> flag: $flag , snReceiver : $snReceiver")
ChatServiceHandler.hangUp(snReceiver, {
@@ -114,9 +132,11 @@ class IMCallManager private constructor() {
})
}
- fun refuseCall(flag: String,
- snSender: String,
- response: ICallResponse) {
+ fun refuseCall(
+ flag: String,
+ snSender: String,
+ response: ICallResponse
+ ) {
log(TAG, "拒绝电话 / 取消打电话 ---> flag: $flag")
ChatServiceHandler.refuseCall(snSender, {
response.refuse(true, currentCallType)
@@ -164,9 +184,9 @@ class IMCallManager private constructor() {
}
fun invisibleUser(
- flag: String,
- visible: Boolean,
- response: ICallResponse
+ flag: String,
+ visible: Boolean,
+ response: ICallResponse
) {
log(TAG, "用户隐身 ---> flag: $flag , visible : $visible")
val status: Int = if (visible) {
@@ -182,9 +202,9 @@ class IMCallManager private constructor() {
}
fun isOnLine(
- flag: String,
- sn: String,
- response: ICallResponse
+ flag: String,
+ sn: String,
+ response: ICallResponse
) {
log(TAG, "车机是否在线 ---> flag: $flag , sn : $sn")
ChatServiceHandler.isOnLine(sn, { onLine: Boolean ->
@@ -195,9 +215,9 @@ class IMCallManager private constructor() {
}
fun getUserInfoForCall(
- flag: String,
- sn: String?,
- response: ICallResponse
+ flag: String,
+ sn: String?,
+ response: ICallResponse
) {
val tmpSn = sn ?: ""
log(TAG, "获取用户信息 ---> flag: $flag , sn : $sn")
diff --git a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/Test.kt b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/Test.kt
new file mode 100644
index 0000000000..3bdc4f8dcb
--- /dev/null
+++ b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/Test.kt
@@ -0,0 +1,13 @@
+package com.mogo.module.carchatting.biz
+
+import android.content.BroadcastReceiver
+import android.content.Context
+import android.content.Intent
+import com.mogo.module.carchatting.bean.UserInfo
+
+class Test:BroadcastReceiver() {
+
+ override fun onReceive(context: Context?, intent: Intent?) {
+ CallChatCenter.callChatCenter.showIncomingCall(UserInfo("123",123,"","","","","","","",""))
+ }
+}
\ No newline at end of file
diff --git a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/card/CallChatConstant.kt b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/card/CallChatConstant.kt
index 91206990e0..a8d2d935f0 100644
--- a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/card/CallChatConstant.kt
+++ b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/card/CallChatConstant.kt
@@ -26,5 +26,7 @@ class CallChatConstant {
const val PARAM_MUTE = "PARAM_MUTE"
const val PARAM_VISIBLE = "PARAM_VISIBLE"
const val PARAM_END_TYPE = "PARAM_END_TYPE"
+
+ const val TAG = "CALL_CHATTING"
}
}
\ No newline at end of file
diff --git a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/CallUserView.java b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/CallUserView.java
deleted file mode 100644
index ebfcc46d60..0000000000
--- a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/CallUserView.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package com.mogo.module.carchatting.view;
-
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.TextView;
-
-import com.mogo.module.carchatting.R;
-import com.mogo.module.common.utils.CarSeries;
-
-import java.util.ArrayList;
-
-public
-/*
- * @author congtaowang
- * @since 2020/12/1
- *
- * 描述
- */
-class CallUserView {
-
- private CallUserView(){
-
- }
-
- private static ArrayList sBitmaps;
-
- public synchronized static ArrayList inflateCallingBitmap(Context context) {
- if (!CarSeries.isF8xxSeries()) {
- return null;
- }
- if (sBitmaps != null && !sBitmaps.isEmpty()) {
- return sBitmaps;
- }
- sBitmaps = new ArrayList<>();
- for (int i = 0; i < calling.length; i++) {
- sBitmaps.add(inflateView(context, i));
- }
- return sBitmaps;
- }
-
- private static final int[] calling = {
- R.mipmap.module_callchat_green_cycle_00020,
-// R.mipmap.module_callchat_green_cycle_00021,
-// R.mipmap.module_callchat_green_cycle_00022,
- R.mipmap.module_callchat_green_cycle_00023,
-// R.mipmap.module_callchat_green_cycle_00024,
-// R.mipmap.module_callchat_green_cycle_00025,
- R.mipmap.module_callchat_green_cycle_00026,
-// R.mipmap.module_callchat_green_cycle_00027,
-// R.mipmap.module_callchat_green_cycle_00028,
- R.mipmap.module_callchat_green_cycle_00029,
-// R.mipmap.module_callchat_green_cycle_00030,
-// R.mipmap.module_callchat_green_cycle_00031,
- R.mipmap.module_callchat_green_cycle_00032,
-// R.mipmap.module_callchat_green_cycle_00033,
-// R.mipmap.module_callchat_green_cycle_00034,
- R.mipmap.module_callchat_green_cycle_00035,
-// R.mipmap.module_callchat_green_cycle_00036,
-// R.mipmap.module_callchat_green_cycle_00037,
- R.mipmap.module_callchat_green_cycle_00038,
-// R.mipmap.module_callchat_green_cycle_00039,
-// R.mipmap.module_callchat_green_cycle_00040,
- R.mipmap.module_callchat_green_cycle_00041,
-// R.mipmap.module_callchat_green_cycle_00042,
-// R.mipmap.module_callchat_green_cycle_00043,
- R.mipmap.module_callchat_green_cycle_00044,
-// R.mipmap.module_callchat_green_cycle_00045,
-// R.mipmap.module_callchat_green_cycle_00046,
- R.mipmap.module_callchat_green_cycle_00047,
- R.mipmap.module_callchat_green_cycle_00048
- };
-
- public static Bitmap inflateView(Context context, int index) {
- View view = LayoutInflater.from(context).inflate(R.layout.module_car_chatting_calling_user_view, null);
- view.setBackgroundResource(calling[index]);
- return fromView(view);
- }
-
- private static Bitmap fromView(View view) {
- view.setDrawingCacheEnabled(true);
- processChildView(view);
- view.destroyDrawingCache();
- view.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED), View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
- view.layout(0, 0, view.getMeasuredWidth(), view.getMeasuredHeight());
- Bitmap bitmap;
- return (bitmap = view.getDrawingCache()) != null ? bitmap.copy(Bitmap.Config.ARGB_8888, false) : null;
- }
-
- private static void processChildView(View view) {
- if (!(view instanceof ViewGroup)) {
- if (view instanceof TextView) {
- ((TextView) view).setHorizontallyScrolling(false);
- }
-
- } else {
- for (int var1 = 0; var1 < ((ViewGroup) view).getChildCount(); ++var1) {
- processChildView(((ViewGroup) view).getChildAt(var1));
- }
-
- }
- }
-}
diff --git a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/CallingWindowManager.kt b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/CallingWindowManager.kt
index f6c8c149e9..d2f28bd6f7 100644
--- a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/CallingWindowManager.kt
+++ b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/CallingWindowManager.kt
@@ -2,7 +2,10 @@ package com.mogo.module.carchatting.view
import android.annotation.SuppressLint
import android.content.Context
+import android.media.AudioManager
+import android.view.LayoutInflater
import android.view.View
+import android.widget.FrameLayout
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView
@@ -10,9 +13,12 @@ import androidx.constraintlayout.widget.ConstraintLayout
import com.bumptech.glide.request.RequestOptions
import com.mogo.chat.constant.TAG
import com.mogo.chat.model.bean.TeammateInfo
+import com.mogo.chat.util.MediaController
+import com.mogo.chat.util.log
+import com.mogo.chat.voice.IMVoiceClient
+import com.mogo.chat.voice.IVoiceIntentListener
import com.mogo.commons.debug.DebugConfig
import com.mogo.commons.debug.DebugConfig.CAR_MACHINE_TYPE_BYD
-import com.mogo.commons.debug.DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE
import com.mogo.module.carchatting.R
import com.mogo.module.carchatting.bean.UserInfo
import com.mogo.module.carchatting.biz.CallChatCenter
@@ -24,8 +30,9 @@ import com.mogo.utils.glide.GlideApp
import com.mogo.utils.glide.GlideRoundedCornersTransform
import com.mogo.utils.logger.Logger
import de.hdodenhof.circleimageview.CircleImageView
+import kotlin.let as let
-class CallingWindowManager private constructor() {
+class CallingWindowManager private constructor() : IVoiceIntentListener {
companion object {
@@ -39,12 +46,19 @@ class CallingWindowManager private constructor() {
@Volatile
private var isLauncherCallingViewShown = false
+ @Volatile
+ private var isLauncherIncomingViewShown = false
+
+ private var launcherIncomingView: View? = null
private var launcherCallingView: View? = null
private var matchView: ConstraintLayout? = null
private var matchingView: ConstraintLayout? = null
private var callingView: ConstraintLayout? = null
+ private var callIncomingAnswer: ImageView? = null
+ private var callIncomingRefuse: ImageView? = null
+
private var cancelMatch: TextView? = null
private var callingHead: ImageView? = null
private var callingNickName: TextView? = null
@@ -68,14 +82,18 @@ class CallingWindowManager private constructor() {
private var showVehicleTeamView: (() -> Unit)? = null
private var quitVehicleTeam: (() -> Unit)? = null
private var moveToCenter: (() -> Unit)? = null
+ private var agreeIncomingBack: (() -> Unit)? = null
+ private var hangUpIncomingBack: (() -> Unit)? = null
@SuppressLint("InflateParams")
- fun init(context: Context, serviceApi: IMogoServiceApis,
- match: () -> Unit,
- cancelMatch: () -> Unit,
- showVehicleTeamView: () -> Unit,
- quitVehicleTeam: () -> Unit,
- moveToCenter: () -> Unit) {
+ fun init(
+ context: Context, serviceApi: IMogoServiceApis,
+ match: () -> Unit,
+ cancelMatch: () -> Unit,
+ showVehicleTeamView: () -> Unit,
+ quitVehicleTeam: () -> Unit,
+ moveToCenter: () -> Unit
+ ) {
Logger.d(CallChatCenter.TAG, "CallingWindowManager init --->")
this.mContext = context
this.serviceApi = serviceApi
@@ -84,11 +102,7 @@ class CallingWindowManager private constructor() {
this.showVehicleTeamView = showVehicleTeamView
this.quitVehicleTeam = quitVehicleTeam
this.moveToCenter = moveToCenter
- if (DebugConfig.getCarMachineType() == CAR_MACHINE_TYPE_BYD) {
- Logger.d(CallChatCenter.TAG, "CallingWindowManager 展示匹配 addLeftFeatureView--->")
- initView()
- serviceApi.entranceButtonController?.addLeftFeatureView(launcherCallingView)
- }
+ hideIncomingView()
}
private fun initView() {
@@ -119,8 +133,6 @@ class CallingWindowManager private constructor() {
matchView?.visibility = View.VISIBLE
}
-
-
matchView?.setOnClickListener {
match?.invoke()
matchView?.visibility = View.GONE
@@ -147,11 +159,15 @@ class CallingWindowManager private constructor() {
if (isLauncherCallingViewShown) {
return
}
- if (DebugConfig.getCarMachineType() != CAR_MACHINE_TYPE_BYD) {
- serviceApi?.windowManagerApi?.addView(launcherCallingView, vrModeHelper.getCallingWindowLayoutPosition(mContext!!), true)
- } else {
- serviceApi?.entranceButtonController?.addLeftFeatureView(launcherCallingView)
- }
+ serviceApi?.windowManagerApi?.addView(
+ launcherCallingView,
+ vrModeHelper.getCallingWindowLayoutPosition(mContext!!),
+ true
+ )
+ }
+
+ fun isIncomingWindowShow(): Boolean {
+ return isLauncherIncomingViewShown
}
fun isCallingWindowShow(): Boolean {
@@ -184,9 +200,66 @@ class CallingWindowManager private constructor() {
}
}
+ fun showIncomingView(
+ agreeIncomingBack: () -> Unit,
+ hangUpIncomingBack: () -> Unit
+ ) {
+ Logger.d(
+ CallChatCenter.TAG,
+ "展示Launcher来电浮窗 showIncomingView===$isLauncherCallingViewShown"
+ )
+ this.agreeIncomingBack = agreeIncomingBack
+ this.hangUpIncomingBack = hangUpIncomingBack
+ if (!isLauncherCallingViewShown) {
+ IMVoiceClient.speakAndRegisterCall({ _ ->
+ if (isLauncherCallingViewShown) {
+ log(TAG, "speakAndRegisterCall")
+ releaseAudioAndVoice()
+ }
+ }, {
+ log(TAG, "playFinish")
+ playAudioCall()
+ registerIntentInComingCall()
+ })
+ if (launcherIncomingView == null) {
+ launcherIncomingView = LayoutInflater.from(mContext)
+ .inflate(R.layout.module_car_chatting_launcher_incoming_hawk_eye_view, null)
+ launcherIncomingView?.setOnClickListener { }
+ launcherIncomingView?.let { view ->
+ callIncomingAnswer = view.findViewById(R.id.module_carchatting_incoming_answer)
+ callIncomingRefuse = view.findViewById(R.id.module_carchatting_incoming_hangUp)
+ callIncomingAnswer?.setOnClickListener {
+ releaseAudioAndVoice()
+ agreeIncomingBack.invoke()
+ }
+ callIncomingRefuse?.setOnClickListener {
+ releaseAudioAndVoice()
+ hangUpIncomingBack.invoke()
+ }
+ }
+ }
+ if (isLauncherIncomingViewShown) {
+ return
+ }
+ val params = FrameLayout.LayoutParams(
+ mContext!!.resources.getDimension(R.dimen.module_call_chat_state_incoming_hawk_eye_width)
+ .toInt(),
+ mContext!!.resources.getDimension(R.dimen.module_call_chat_state_incoming_hawk_eye_height)
+ .toInt()
+ )
+ val x = mContext!!.resources.getDimension(R.dimen.module_call_chat_state_location_hawk_eye_x)
+ val y = mContext!!.resources.getDimension(R.dimen.module_call_chat_state_location_hawk_eye_y)
+ params.leftMargin = x.toInt()
+ params.topMargin = y.toInt()
+ serviceApi?.windowManagerApi?.addView(launcherIncomingView, params, true)
+ isLauncherIncomingViewShown = true
+ Logger.d(CallChatCenter.TAG, "添加浮窗成功 addIncomingView===$isLauncherCallingViewShown")
+ }
+ }
+
fun showCallingView(
- currentUserInfo: UserInfo?,
- hangUpCallBack: () -> Unit
+ currentUserInfo: UserInfo?,
+ hangUpCallBack: () -> Unit
) {
Logger.d(CallChatCenter.TAG, "展示Launcher浮窗 showCallingView===$isLauncherCallingViewShown")
if (!isLauncherCallingViewShown) {
@@ -194,15 +267,18 @@ class CallingWindowManager private constructor() {
refreshCallWindowData(currentUserInfo)
}
} else {
- Logger.d(CallChatCenter.TAG, "刷新Launcher浮窗数据 showCallingView===currentUserInfo :$currentUserInfo")
+ Logger.d(
+ CallChatCenter.TAG,
+ "刷新Launcher浮窗数据 showCallingView===currentUserInfo :$currentUserInfo"
+ )
refreshCallWindowData(currentUserInfo)
}
}
@SuppressLint("InflateParams")
private inline fun addCallWindowView(
- crossinline hangUpCallBack: () -> Unit,
- refreshData: (() -> Unit)
+ crossinline hangUpCallBack: () -> Unit,
+ refreshData: (() -> Unit)
) {
if (launcherCallingView == null) {
initView()
@@ -218,30 +294,51 @@ class CallingWindowManager private constructor() {
showCallingWindow()
refreshData.invoke()
isLauncherCallingViewShown = true
- Logger.d(CallChatCenter.TAG, "添加浮窗成功 showCallingView===$isLauncherCallingViewShown")
+ Logger.d(CallChatCenter.TAG, "添加浮窗成功 addCallWindowView===$isLauncherCallingViewShown")
}
private fun refreshCallWindowData(currentUserInfo: UserInfo?) {
mContext?.let {
if (MogoApisHandler.getInstance().apis.statusManagerApi.isVrMode) {
GlideApp.with(it).load(currentUserInfo?.userHead)
- .apply(RequestOptions.bitmapTransform(
- GlideRoundedCornersTransform(20f, GlideRoundedCornersTransform.CornerType.LEFT)))
- .placeholder(R.mipmap.module_carchatting_hawk_eye_default_head_img).into(callingHead!!)
+ .apply(
+ RequestOptions.bitmapTransform(
+ GlideRoundedCornersTransform(
+ 20f,
+ GlideRoundedCornersTransform.CornerType.LEFT
+ )
+ )
+ )
+ .placeholder(R.mipmap.module_carchatting_hawk_eye_default_head_img)
+ .into(callingHead!!)
} else {
val options: RequestOptions =
- RequestOptions()
- .placeholder(R.mipmap.module_carchatting_default_head_img)
- .error(R.mipmap.module_carchatting_default_head_img)
+ RequestOptions()
+ .placeholder(R.mipmap.module_carchatting_default_head_img)
+ .error(R.mipmap.module_carchatting_default_head_img)
GlideApp.with(it).asBitmap().load(currentUserInfo?.userHead)
- .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop()
- .into(SkinAbleBitmapTarget(callingHead, options))
+ .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop()
+ .into(SkinAbleBitmapTarget(callingHead, options))
}
}
// callingNickName?.text = currentUserInfo?.userName ?: "蘑菇车主"
callingNickName?.text = "云平台" //todo 需要产品后面更改逻辑,避免写死造成困扰
}
+ fun hideIncomingView() {
+ if (!isLauncherIncomingViewShown) {
+ return
+ }
+ Logger.d(CallChatCenter.TAG, "隐藏Launcher来电浮窗===$isLauncherCallingViewShown")
+ releaseAudioAndVoice()
+ if (isLauncherIncomingViewShown) {
+ isLauncherIncomingViewShown = false
+ }
+ launcherIncomingView?.let {
+ serviceApi?.windowManagerApi?.removeView(it)
+ }
+ }
+
fun hideCallingView() {
Logger.d(CallChatCenter.TAG, "隐藏Launcher浮窗===$isLauncherCallingViewShown")
if (isLauncherCallingViewShown) {
@@ -259,9 +356,7 @@ class CallingWindowManager private constructor() {
}
private fun removeView() {
- if (DebugConfig.getCarMachineType() != CAR_MACHINE_TYPE_BYD) {
- serviceApi?.windowManagerApi?.removeView(launcherCallingView)
- }
+ serviceApi?.windowManagerApi?.removeView(launcherCallingView)
}
fun updateTimer(timeStr: String) {
@@ -270,7 +365,10 @@ class CallingWindowManager private constructor() {
}
fun showVehicleTeamView() {
- Logger.d(CallChatCenter.TAG, "showVehicleTeamView isLauncherCallingViewShown ===$isLauncherCallingViewShown")
+ Logger.d(
+ CallChatCenter.TAG,
+ "showVehicleTeamView isLauncherCallingViewShown ===$isLauncherCallingViewShown"
+ )
if (!isLauncherCallingViewShown) {
if (launcherCallingView == null) {
initView()
@@ -287,7 +385,10 @@ class CallingWindowManager private constructor() {
}
fun hideVehicleTeamView() {
- Logger.d(CallChatCenter.TAG, "hideVehicleTeamView isLauncherCallingViewShown ===$isLauncherCallingViewShown")
+ Logger.d(
+ CallChatCenter.TAG,
+ "hideVehicleTeamView isLauncherCallingViewShown ===$isLauncherCallingViewShown"
+ )
callingView?.visibility = View.GONE
matchingView?.visibility = View.GONE
moduleCarchattingTeamRlView?.visibility = View.GONE
@@ -321,70 +422,90 @@ class CallingWindowManager private constructor() {
2 -> {
moduleCarchattingCivHead0?.visibility = View.VISIBLE
GlideApp.with(mContext!!).load(teamMember[0].headImgUrl)
- .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop().into(moduleCarchattingCivHead0!!)
+ .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop()
+ .into(moduleCarchattingCivHead0!!)
moduleCarchattingCivHead1?.visibility = View.VISIBLE
GlideApp.with(mContext!!).load(teamMember[1].headImgUrl)
- .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop().into(moduleCarchattingCivHead1!!)
+ .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop()
+ .into(moduleCarchattingCivHead1!!)
moduleCarchattingCivHead2?.visibility = View.GONE
moduleCarchattingCivHead3?.visibility = View.GONE
moduleCarchattingCivHead4?.visibility = View.GONE
- val layoutParams: ConstraintLayout.LayoutParams = moduleCarchattingTeamLlHead?.layoutParams as ConstraintLayout.LayoutParams
+ val layoutParams: ConstraintLayout.LayoutParams =
+ moduleCarchattingTeamLlHead?.layoutParams as ConstraintLayout.LayoutParams
layoutParams.bottomMargin = 0
moduleCarchattingTeamLlHead?.layoutParams = layoutParams
}
3 -> {
moduleCarchattingCivHead0?.visibility = View.VISIBLE
GlideApp.with(mContext!!).load(teamMember[0].headImgUrl)
- .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop().into(moduleCarchattingCivHead0!!)
+ .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop()
+ .into(moduleCarchattingCivHead0!!)
moduleCarchattingCivHead1?.visibility = View.VISIBLE
GlideApp.with(mContext!!).load(teamMember[1].headImgUrl)
- .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop().into(moduleCarchattingCivHead1!!)
+ .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop()
+ .into(moduleCarchattingCivHead1!!)
moduleCarchattingCivHead2?.visibility = View.VISIBLE
GlideApp.with(mContext!!).load(teamMember[2].headImgUrl)
- .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop().into(moduleCarchattingCivHead2!!)
+ .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop()
+ .into(moduleCarchattingCivHead2!!)
moduleCarchattingCivHead3?.visibility = View.GONE
moduleCarchattingCivHead4?.visibility = View.GONE
- val layoutParams: ConstraintLayout.LayoutParams = moduleCarchattingTeamLlHead?.layoutParams as ConstraintLayout.LayoutParams
+ val layoutParams: ConstraintLayout.LayoutParams =
+ moduleCarchattingTeamLlHead?.layoutParams as ConstraintLayout.LayoutParams
layoutParams.bottomMargin = 0
moduleCarchattingTeamLlHead?.layoutParams = layoutParams
}
4 -> {
moduleCarchattingCivHead0?.visibility = View.VISIBLE
GlideApp.with(mContext!!).load(teamMember[0].headImgUrl)
- .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop().into(moduleCarchattingCivHead0!!)
+ .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop()
+ .into(moduleCarchattingCivHead0!!)
moduleCarchattingCivHead1?.visibility = View.VISIBLE
GlideApp.with(mContext!!).load(teamMember[1].headImgUrl)
- .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop().into(moduleCarchattingCivHead1!!)
+ .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop()
+ .into(moduleCarchattingCivHead1!!)
moduleCarchattingCivHead2?.visibility = View.VISIBLE
GlideApp.with(mContext!!).load(teamMember[2].headImgUrl)
- .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop().into(moduleCarchattingCivHead2!!)
+ .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop()
+ .into(moduleCarchattingCivHead2!!)
moduleCarchattingCivHead3?.visibility = View.VISIBLE
GlideApp.with(mContext!!).load(teamMember[3].headImgUrl)
- .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop().into(moduleCarchattingCivHead3!!)
+ .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop()
+ .into(moduleCarchattingCivHead3!!)
moduleCarchattingCivHead4?.visibility = View.INVISIBLE
- val layoutParams: ConstraintLayout.LayoutParams = moduleCarchattingTeamLlHead?.layoutParams as ConstraintLayout.LayoutParams
- val margin = mContext!!.resources.getDimension(R.dimen.module_call_chat_team_head_view_top_margin)
+ val layoutParams: ConstraintLayout.LayoutParams =
+ moduleCarchattingTeamLlHead?.layoutParams as ConstraintLayout.LayoutParams
+ val margin =
+ mContext!!.resources.getDimension(R.dimen.module_call_chat_team_head_view_top_margin)
layoutParams.bottomMargin = margin.toInt()
moduleCarchattingTeamLlHead?.layoutParams = layoutParams
}
else -> {
moduleCarchattingCivHead0?.visibility = View.VISIBLE
GlideApp.with(mContext!!).load(teamMember[0].headImgUrl)
- .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop().into(moduleCarchattingCivHead0!!)
+ .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop()
+ .into(moduleCarchattingCivHead0!!)
moduleCarchattingCivHead1?.visibility = View.VISIBLE
GlideApp.with(mContext!!).load(teamMember[1].headImgUrl)
- .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop().into(moduleCarchattingCivHead1!!)
+ .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop()
+ .into(moduleCarchattingCivHead1!!)
moduleCarchattingCivHead2?.visibility = View.VISIBLE
GlideApp.with(mContext!!).load(teamMember[2].headImgUrl)
- .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop().into(moduleCarchattingCivHead2!!)
+ .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop()
+ .into(moduleCarchattingCivHead2!!)
moduleCarchattingCivHead3?.visibility = View.VISIBLE
GlideApp.with(mContext!!).load(teamMember[3].headImgUrl)
- .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop().into(moduleCarchattingCivHead3!!)
+ .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop()
+ .into(moduleCarchattingCivHead3!!)
moduleCarchattingCivHead4?.visibility = View.VISIBLE
GlideApp.with(mContext!!).load(teamMember[4].headImgUrl)
- .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop().into(moduleCarchattingCivHead4!!)
- val layoutParams: ConstraintLayout.LayoutParams = moduleCarchattingTeamLlHead?.layoutParams as ConstraintLayout.LayoutParams
- val margin = mContext!!.resources.getDimension(R.dimen.module_call_chat_team_head_view_top_margin)
+ .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop()
+ .into(moduleCarchattingCivHead4!!)
+ val layoutParams: ConstraintLayout.LayoutParams =
+ moduleCarchattingTeamLlHead?.layoutParams as ConstraintLayout.LayoutParams
+ val margin =
+ mContext!!.resources.getDimension(R.dimen.module_call_chat_team_head_view_top_margin)
layoutParams.bottomMargin = margin.toInt()
moduleCarchattingTeamLlHead?.layoutParams = layoutParams
}
@@ -407,4 +528,37 @@ class CallingWindowManager private constructor() {
}
launcherCallingView = null
}
+
+ private fun releaseAudioAndVoice() {
+ stopAudioCall()
+ unRegisterVoice()
+ }
+
+ private fun playAudioCall() {
+ MediaController.startPlay(mContext!!, R.raw.call, true, AudioManager.STREAM_RING)
+ }
+
+ private fun stopAudioCall() {
+ log(TAG, "停止播放来电铃声======")
+ MediaController.release()
+ }
+
+ private fun registerIntentInComingCall() {
+ IMVoiceClient.registerIntentInComingCall(this)
+ }
+
+ private fun unRegisterVoice() {
+ IMVoiceClient.releaseSpeakAndRegisterCallback()
+ IMVoiceClient.unRegisterIntentInComingCall(this)
+ }
+
+ override fun onVoiceAnswerCall() {
+ releaseAudioAndVoice()
+ agreeIncomingBack?.invoke()
+ }
+
+ override fun onVoiceRefuseCall() {
+ releaseAudioAndVoice()
+ hangUpIncomingBack?.invoke()
+ }
}
\ No newline at end of file
diff --git a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/MapViewManager.kt b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/MapViewManager.kt
index 74285285cd..3524bd5b98 100644
--- a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/MapViewManager.kt
+++ b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/MapViewManager.kt
@@ -3,15 +3,12 @@ package com.mogo.module.carchatting.view
import android.content.Context
import android.graphics.Rect
import android.graphics.drawable.BitmapDrawable
-import android.widget.ImageView
import com.mogo.chat.model.bean.TeammateInfo
-import com.mogo.chat.provider.ServiceApi
import com.mogo.commons.AbsMogoApplication
import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.map.marker.MogoMarkerOptions
import com.mogo.module.carchatting.R
import com.mogo.module.common.ModuleNames
-import com.mogo.module.common.MogoApisHandler
import com.mogo.module.common.entity.MarkerLocation
import com.mogo.module.common.entity.MarkerShowEntity
import com.mogo.service.IMogoServiceApis
@@ -51,11 +48,11 @@ class MapViewManager private constructor() {
}
fun showLocationOnMap(
- context: Context,
- serviceApi: IMogoServiceApis?,
- lat: Double?,
- lon: Double?,
- userHead: String?
+ context: Context,
+ serviceApi: IMogoServiceApis?,
+ lat: Double?,
+ lon: Double?,
+ userHead: String?
) {
if (!hasMarked) {
hasMarked = true
@@ -65,23 +62,23 @@ class MapViewManager private constructor() {
private fun showLocation(
- context: Context,
- serviceApi: IMogoServiceApis?,
- lat: Double?,
- lon: Double?,
- userHead: String?
+ context: Context,
+ serviceApi: IMogoServiceApis?,
+ lat: Double?,
+ lon: Double?,
+ userHead: String?
) {
//延时一分钟后获取大而全数据
serviceApi?.statusManagerApi?.setUserInteractionStatus(
- CallChattingProviderConstant.CAR_CALL_PROVIDER,
- true,
- true
+ CallChattingProviderConstant.CAR_CALL_PROVIDER,
+ true,
+ true
)
//清除地图上所有Marker
serviceApi?.mapServiceApi?.getMarkerManager(context)?.removeMarkers()
//获取需要打点的经纬度
val userLoc =
- serviceApi?.mapServiceApi?.getSingletonLocationClient(context)?.lastKnowLocation
+ serviceApi?.mapServiceApi?.getSingletonLocationClient(context)?.lastKnowLocation
val latlonList = mutableListOf()
var currentLatLng: MogoLatLng? = null
userLoc?.let {
@@ -91,31 +88,31 @@ class MapViewManager private constructor() {
//打点传入type为在线车辆 并缩小地图区域
getMarkerEntity(context, lat, lon, userHead) { _: String, options: MogoMarkerOptions ->
val mapMarker =
- serviceApi?.mapServiceApi?.getMarkerManager(context)?.addMarker(CALLING, options)
+ serviceApi?.mapServiceApi?.getMarkerManager(context)?.addMarker(CALLING, options)
mapMarker?.setClickable(false)
}
val mapUIController = serviceApi?.mapServiceApi?.mapUIController
mapUIController?.showBounds(
- CallChattingProviderConstant.CAR_CALL_PROVIDER,
- currentLatLng,
- latlonList,
- Rect(
- context.resources.getDimension(R.dimen.dp_736).toInt(),
- context.resources.getDimension(R.dimen.dp_198).toInt(),
- context.resources.getDimension(R.dimen.dp_59).toInt(),
- context.resources.getDimension(R.dimen.dp_59).toInt()
- ),
- true
+ CallChattingProviderConstant.CAR_CALL_PROVIDER,
+ currentLatLng,
+ latlonList,
+ Rect(
+ context.resources.getDimension(R.dimen.dp_736).toInt(),
+ context.resources.getDimension(R.dimen.dp_198).toInt(),
+ context.resources.getDimension(R.dimen.dp_59).toInt(),
+ context.resources.getDimension(R.dimen.dp_59).toInt()
+ ),
+ true
)
}
@Suppress("DEPRECATION")
private fun getMarkerEntity(
- context: Context,
- lat: Double?,
- lon: Double?,
- userHead: String?,
- callBack: (markerType: String, options: MogoMarkerOptions) -> Unit
+ context: Context,
+ lat: Double?,
+ lon: Double?,
+ userHead: String?,
+ callBack: (markerType: String, options: MogoMarkerOptions) -> Unit
) {
val markerEntity = MarkerShowEntity()
val markerLoc = MarkerLocation()
@@ -129,16 +126,17 @@ class MapViewManager private constructor() {
markerLocation = markerLoc
}
val options = MogoMarkerOptions()
- .`object`(markerEntity)
- .icon((context.resources.getDrawable(R.mipmap.module_carchatting_caller) as BitmapDrawable).bitmap)
- .latitude(markerEntity.markerLocation.lat)
- .longitude(markerEntity.markerLocation.lon)
+ .`object`(markerEntity)
+ .icon((context.resources.getDrawable(R.mipmap.module_carchatting_caller) as BitmapDrawable).bitmap)
+ .latitude(markerEntity.markerLocation.lat)
+ .longitude(markerEntity.markerLocation.lon)
callBack.invoke(markerEntity.markerType, options)
}
- fun resetMarkerStatus() {
+ fun resetMarkerStatus(serviceApi: IMogoServiceApis?) {
Logger.d(TAG, "resetMarkerStatus")
hasMarked = false
- ServiceApi.mapService()?.getMarkerManager(AbsMogoApplication.getApp().applicationContext)?.removeMarkers(CALLING)
+ serviceApi?.mapServiceApi?.getMarkerManager(AbsMogoApplication.getApp().applicationContext)
+ ?.removeMarkers(CALLING)
}
}
\ No newline at end of file
diff --git a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/UnSupportSkinFrameLayout.java b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/UnSupportSkinFrameLayout.java
deleted file mode 100644
index 663994cf1d..0000000000
--- a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/UnSupportSkinFrameLayout.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.mogo.module.carchatting.view;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.widget.FrameLayout;
-
-import androidx.annotation.Nullable;
-
-public
-/**
- * @author congtaowang
- * @since 2020/12/1
- *
- * 描述
- */
-class UnSupportSkinFrameLayout extends FrameLayout {
-
- public UnSupportSkinFrameLayout( Context context ) {
- this( context, null );
- }
-
- public UnSupportSkinFrameLayout( Context context, @Nullable AttributeSet attrs ) {
- this( context, attrs, 0 );
- }
-
- public UnSupportSkinFrameLayout( Context context, @Nullable AttributeSet attrs, int defStyleAttr ) {
- super( context, attrs, defStyleAttr );
- }
-}
diff --git a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/UnSupportSkinImageView.java b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/UnSupportSkinImageView.java
deleted file mode 100644
index 835a7f7d8e..0000000000
--- a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/UnSupportSkinImageView.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.mogo.module.carchatting.view;
-
-import android.content.Context;
-import android.util.AttributeSet;
-
-import androidx.annotation.Nullable;
-import androidx.appcompat.widget.AppCompatImageView;
-
-public
-/**
- * @author congtaowang
- * @since 2020/12/1
- *
- * 描述
- */
-class UnSupportSkinImageView extends AppCompatImageView {
-
- public UnSupportSkinImageView( Context context ) {
- this( context, null );
- }
-
- public UnSupportSkinImageView( Context context, @Nullable AttributeSet attrs ) {
- this( context, attrs, 0 );
- }
-
- public UnSupportSkinImageView( Context context, @Nullable AttributeSet attrs, int defStyleAttr ) {
- super( context, attrs, defStyleAttr );
- }
-}
diff --git a/modules/mogo-module-carchatting/src/main/res/drawable/module_carchatting_aicloud_incoming.png b/modules/mogo-module-carchatting/src/main/res/drawable/module_carchatting_aicloud_incoming.png
new file mode 100644
index 0000000000..a6aef500e9
Binary files /dev/null and b/modules/mogo-module-carchatting/src/main/res/drawable/module_carchatting_aicloud_incoming.png differ
diff --git a/modules/mogo-module-carchatting/src/main/res/layout/module_car_chatting_calling_user_view.xml b/modules/mogo-module-carchatting/src/main/res/layout/module_car_chatting_calling_user_view.xml
deleted file mode 100644
index 45caaf0fcf..0000000000
--- a/modules/mogo-module-carchatting/src/main/res/layout/module_car_chatting_calling_user_view.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/mogo-module-carchatting/src/main/res/layout/module_car_chatting_launcher_incoming_hawk_eye_view.xml b/modules/mogo-module-carchatting/src/main/res/layout/module_car_chatting_launcher_incoming_hawk_eye_view.xml
new file mode 100644
index 0000000000..799bc5faec
--- /dev/null
+++ b/modules/mogo-module-carchatting/src/main/res/layout/module_car_chatting_launcher_incoming_hawk_eye_view.xml
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00020.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00020.png
deleted file mode 100644
index 221c4f84e4..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00020.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00021.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00021.png
deleted file mode 100644
index f57118a65f..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00021.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00022.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00022.png
deleted file mode 100644
index 3723dd856e..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00022.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00023.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00023.png
deleted file mode 100644
index 49f1e30557..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00023.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00024.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00024.png
deleted file mode 100644
index 8422ee93b1..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00024.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00025.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00025.png
deleted file mode 100644
index 333602ee67..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00025.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00026.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00026.png
deleted file mode 100644
index 6ae8b7f032..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00026.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00027.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00027.png
deleted file mode 100644
index b35a54cd53..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00027.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00028.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00028.png
deleted file mode 100644
index 210bc01b09..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00028.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00029.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00029.png
deleted file mode 100644
index 3826aa06b6..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00029.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00030.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00030.png
deleted file mode 100644
index de338f3aed..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00030.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00031.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00031.png
deleted file mode 100644
index 84979dc88e..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00031.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00032.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00032.png
deleted file mode 100644
index 60b6c47498..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00032.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00033.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00033.png
deleted file mode 100644
index f67a0e4947..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00033.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00034.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00034.png
deleted file mode 100644
index 8e84cc7c8f..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00034.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00035.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00035.png
deleted file mode 100644
index f5d2a7b270..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00035.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00036.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00036.png
deleted file mode 100644
index b177529fb9..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00036.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00037.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00037.png
deleted file mode 100644
index 386c292b7f..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00037.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00038.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00038.png
deleted file mode 100644
index bf291f3c80..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00038.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00039.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00039.png
deleted file mode 100644
index b87ee8efaa..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00039.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00040.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00040.png
deleted file mode 100644
index dbee4f4f16..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00040.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00041.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00041.png
deleted file mode 100644
index cb3376a2e2..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00041.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00042.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00042.png
deleted file mode 100644
index 522f3f348c..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00042.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00043.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00043.png
deleted file mode 100644
index 8813889936..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00043.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00044.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00044.png
deleted file mode 100644
index 6a1d8677ba..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00044.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00045.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00045.png
deleted file mode 100644
index e1149e00ac..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00045.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00046.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00046.png
deleted file mode 100644
index 010fc65ac9..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00046.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00047.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00047.png
deleted file mode 100644
index d42027923d..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00047.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00048.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00048.png
deleted file mode 100644
index b4fcd0489b..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_green_cycle_00048.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_online_car.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_online_car.png
deleted file mode 100644
index d4266a6bc5..0000000000
Binary files a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchat_online_car.png and /dev/null differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchatting_launcher_incoming_answer.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchatting_launcher_incoming_answer.png
new file mode 100644
index 0000000000..ab8a1f46ef
Binary files /dev/null and b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchatting_launcher_incoming_answer.png differ
diff --git a/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchatting_launcher_incoming_hangup.png b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchatting_launcher_incoming_hangup.png
new file mode 100644
index 0000000000..3bc95a36d5
Binary files /dev/null and b/modules/mogo-module-carchatting/src/main/res/mipmap-xhdpi/module_callchatting_launcher_incoming_hangup.png differ
diff --git a/modules/mogo-module-carchatting/src/main/res/values-xhdpi-2560x1440/dimens.xml b/modules/mogo-module-carchatting/src/main/res/values-xhdpi-2560x1440/dimens.xml
index 1b637fe69f..e264311f06 100644
--- a/modules/mogo-module-carchatting/src/main/res/values-xhdpi-2560x1440/dimens.xml
+++ b/modules/mogo-module-carchatting/src/main/res/values-xhdpi-2560x1440/dimens.xml
@@ -4,11 +4,16 @@
1160px
460px
144px
+ 560px
+ 142px
+ 20px
+ 30px
30px
28px
24px
144px
88px
+ 86px
20px
26px
24px
@@ -20,4 +25,5 @@
24px
27px
34px
+ 139px
\ No newline at end of file
diff --git a/modules/mogo-module-carchatting/src/main/res/values/dimens.xml b/modules/mogo-module-carchatting/src/main/res/values/dimens.xml
index 47be1d5445..98243747e2 100644
--- a/modules/mogo-module-carchatting/src/main/res/values/dimens.xml
+++ b/modules/mogo-module-carchatting/src/main/res/values/dimens.xml
@@ -1,6 +1,14 @@
+
+ 560px
+ 142px
+ 139px
+ 20px
+ 30px
+ 86px
+
467px
573px
338px
diff --git a/modules/mogo-module-carchattingprovider/src/main/java/com/zhidao/carchattingprovider/ICallChatResponse.java b/modules/mogo-module-carchattingprovider/src/main/java/com/zhidao/carchattingprovider/ICallChatResponse.java
index 150b268120..3317a38bf8 100644
--- a/modules/mogo-module-carchattingprovider/src/main/java/com/zhidao/carchattingprovider/ICallChatResponse.java
+++ b/modules/mogo-module-carchattingprovider/src/main/java/com/zhidao/carchattingprovider/ICallChatResponse.java
@@ -1,10 +1,22 @@
package com.zhidao.carchattingprovider;
+import androidx.annotation.NonNull;
+
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public interface ICallChatResponse extends ICallProviderResponse {
+ @Override
+ default void answer() {
+
+ }
+
+ @Override
+ default void answerCallError(@NonNull String errorMsg) {
+
+ }
+
@Override
default void canCall(boolean canCall) {
diff --git a/modules/mogo-module-carchattingprovider/src/main/java/com/zhidao/carchattingprovider/ICallProviderResponse.kt b/modules/mogo-module-carchattingprovider/src/main/java/com/zhidao/carchattingprovider/ICallProviderResponse.kt
index f0b4d26381..14cfa583bc 100644
--- a/modules/mogo-module-carchattingprovider/src/main/java/com/zhidao/carchattingprovider/ICallProviderResponse.kt
+++ b/modules/mogo-module-carchattingprovider/src/main/java/com/zhidao/carchattingprovider/ICallProviderResponse.kt
@@ -3,6 +3,14 @@ package com.zhidao.carchattingprovider
interface ICallProviderResponse : ICallResponse {
+ override fun answer() {
+ super.answer()
+ }
+
+ override fun answerCallError(errorMsg: String) {
+ super.answerCallError(errorMsg)
+ }
+
override fun hangUp(hangUp: Boolean, type: Int) {
super.hangUp(hangUp, type)
}
diff --git a/modules/mogo-module-carchattingprovider/src/main/java/com/zhidao/carchattingprovider/ICallResponse.kt b/modules/mogo-module-carchattingprovider/src/main/java/com/zhidao/carchattingprovider/ICallResponse.kt
index fd2375181f..263d195258 100644
--- a/modules/mogo-module-carchattingprovider/src/main/java/com/zhidao/carchattingprovider/ICallResponse.kt
+++ b/modules/mogo-module-carchattingprovider/src/main/java/com/zhidao/carchattingprovider/ICallResponse.kt
@@ -2,6 +2,12 @@ package com.zhidao.carchattingprovider
interface ICallResponse {
+ fun answer(){
+ }
+
+ fun answerCallError(errorMsg: String){
+ }
+
fun hangUp(hangUp: Boolean, type: Int) {
}
diff --git a/modules/mogo-module-chat/build.gradle b/modules/mogo-module-chat/build.gradle
index 1302eb19ae..3f23219e72 100644
--- a/modules/mogo-module-chat/build.gradle
+++ b/modules/mogo-module-chat/build.gradle
@@ -74,7 +74,6 @@ dependencies {
compileOnly rootProject.ext.dependencies.aspectj
- implementation rootProject.ext.dependencies.circleimageview
implementation rootProject.ext.dependencies.strategy
implementation rootProject.ext.dependencies.mogowebsocket
diff --git a/modules/mogo-module-chat/consumer-rules.pro b/modules/mogo-module-chat/consumer-rules.pro
index d03759cd05..5fd8969570 100644
--- a/modules/mogo-module-chat/consumer-rules.pro
+++ b/modules/mogo-module-chat/consumer-rules.pro
@@ -11,7 +11,6 @@
-keep class com.mogo.chat.util.AnalyticsUtilKt{*;}
-keep class com.mogo.chat.util.LogUtil{*;}
-keep class com.mogo.chat.voice.*{*;}
--keep class com.mogo.chat.window.IWindowCallActionListener{*;}
#公司SDK
-keep class com.zhidao.auto.micstrategy.*{*;}
diff --git a/modules/mogo-module-chat/src/main/java/com/mogo/chat/aspect/ExceptionAspectj.kt b/modules/mogo-module-chat/src/main/java/com/mogo/chat/aspect/ExceptionAspectj.kt
deleted file mode 100644
index 68d1343a05..0000000000
--- a/modules/mogo-module-chat/src/main/java/com/mogo/chat/aspect/ExceptionAspectj.kt
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.mogo.chat.aspect
-
-import org.aspectj.lang.ProceedingJoinPoint
-import org.aspectj.lang.annotation.Around
-import org.aspectj.lang.annotation.Aspect
-import org.aspectj.lang.annotation.Pointcut
-import java.util.concurrent.TimeUnit
-
-@Aspect
-class ExceptionAspectj : BaseAspectj() {
-
- @Pointcut("execution(* com.tencent.sharp.jni.TraeAudioManager\$2.run(..))")
- fun gmeTrack() {
- }
-
- @Around("gmeTrack()")
- fun logExecute(joinPoint: ProceedingJoinPoint) {
- try {
- enterMethod(joinPoint)
- val startNanos = System.nanoTime()
- val result = joinPoint.proceed()
- val stopNanos = System.nanoTime()
- val lengthMill = TimeUnit.NANOSECONDS.toMillis(stopNanos - startNanos)
- exitMethod(joinPoint, result, lengthMill)
- } catch (e: Exception) {
- e.printStackTrace()
- }
- }
-
-}
\ No newline at end of file
diff --git a/modules/mogo-module-chat/src/main/java/com/mogo/chat/aspect/PushMsg.java b/modules/mogo-module-chat/src/main/java/com/mogo/chat/aspect/PushMsg.java
deleted file mode 100644
index 4c37b85d6c..0000000000
--- a/modules/mogo-module-chat/src/main/java/com/mogo/chat/aspect/PushMsg.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.mogo.chat.aspect;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-@Target({TYPE, METHOD, CONSTRUCTOR})
-@Retention(RUNTIME)
-public @interface PushMsg {
-}
diff --git a/modules/mogo-module-chat/src/main/java/com/mogo/chat/aspect/TrackAspectj.kt b/modules/mogo-module-chat/src/main/java/com/mogo/chat/aspect/TrackAspectj.kt
deleted file mode 100644
index 002944b62c..0000000000
--- a/modules/mogo-module-chat/src/main/java/com/mogo/chat/aspect/TrackAspectj.kt
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.mogo.chat.aspect
-
-import android.util.Log
-import android.view.View
-import com.mogo.chat.constant.PUSH_MSG_AGREE_ENTER
-import com.mogo.chat.constant.PUSH_MSG_HANG_UP
-import com.mogo.chat.model.bean.Message
-import com.mogo.chat.util.isDoubleClick
-import com.mogo.chat.util.sp.recordCallTime
-import com.mogo.chat.util.trackHangUp
-import org.aspectj.lang.JoinPoint
-import org.aspectj.lang.annotation.Aspect
-import org.aspectj.lang.annotation.Before
-import org.aspectj.lang.annotation.Pointcut
-
-@Aspect
-class TrackAspectj {
-
- companion object {
- const val TAG = "TrackAspectj"
- }
-
- @Pointcut("execution(* android.view.View.OnClickListener.onClick(..))")
- fun trackOnClick() {
-
- }
-
- @Before("trackOnClick()")
- fun trackClick(joinPoint: JoinPoint) {
- val view = joinPoint.args[0] as View
- if (isDoubleClick(view.id)) {
- Log.i("trackClick", "重复点击,已过滤")
- return
- }
- }
-
-
- @Pointcut("within(@com.mogo.chat.aspect.PushMsg *)")
- fun withinPushClass() {
- }
-
- @Pointcut("execution(!synthetic * *(..))&& withinPushClass()")
- fun methodInsidePushType() {
- }
-
- @Pointcut("execution(@com.mogo.chat.aspect.PushMsg * *(..))|| methodInsidePushType()")
- fun pushMethod() {
- }
-
- @Before("pushMethod()")
- fun trackPushMsg(joinPoint: JoinPoint) {
- val msg = joinPoint.args[0] as Message
- when (msg.status) {
- PUSH_MSG_AGREE_ENTER -> {
- recordCallTime()
- }
- PUSH_MSG_HANG_UP -> {
- trackHangUp(msg.type)
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/modules/mogo-module-chat/src/main/java/com/mogo/chat/constant/HttpConstants.kt b/modules/mogo-module-chat/src/main/java/com/mogo/chat/constant/HttpConstants.kt
index f6e72b6398..231743cfa1 100644
--- a/modules/mogo-module-chat/src/main/java/com/mogo/chat/constant/HttpConstants.kt
+++ b/modules/mogo-module-chat/src/main/java/com/mogo/chat/constant/HttpConstants.kt
@@ -6,12 +6,12 @@ class HttpConstants {
companion object {
- const val DEV_BASE_URL_OWNER = "http://dzt-show.zhidaohulian.com/"
- const val DEV_CONFIG_URL = "http://dzt-test.zhidaohulian.com/"
- const val RELEASE_BASE_URL_OWNER = "http://dzt.zhidaohulian.com/"
+ private const val DEV_BASE_URL_OWNER = "http://dzt-show.zhidaohulian.com/"
+ private const val DEV_CONFIG_URL = "http://dzt-test.zhidaohulian.com/"
+ private const val RELEASE_BASE_URL_OWNER = "http://dzt.zhidaohulian.com/"
- const val SOCKET_SERVER = "ws://62.234.196.121:4001/ws"
- const val DEV_SOCKET_SERVER = "ws://dzt-test.zhidaohulian.com/ws"
+ private const val SOCKET_SERVER = "ws://62.234.196.121:4001/ws"
+ private const val DEV_SOCKET_SERVER = "ws://dzt-test.zhidaohulian.com/ws"
fun getBaseUrl(): String {
return when (getNetMode()) {
diff --git a/modules/mogo-module-chat/src/main/java/com/mogo/chat/constant/RequestCode.kt b/modules/mogo-module-chat/src/main/java/com/mogo/chat/constant/RequestCode.kt
deleted file mode 100644
index 349826cc74..0000000000
--- a/modules/mogo-module-chat/src/main/java/com/mogo/chat/constant/RequestCode.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.mogo.chat.constant
-
-enum class RequestCode {
-
- MATCH_ACTIVITY,
- PERSONAL_CENTER_ACTIVITY
-}
\ No newline at end of file
diff --git a/modules/mogo-module-chat/src/main/java/com/mogo/chat/constant/ResultCode.kt b/modules/mogo-module-chat/src/main/java/com/mogo/chat/constant/ResultCode.kt
deleted file mode 100644
index 129ebecc34..0000000000
--- a/modules/mogo-module-chat/src/main/java/com/mogo/chat/constant/ResultCode.kt
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.mogo.chat.constant
-
-enum class ResultCode {
-
- MATCH_CANCEL,
- MATCH_ENTRY_ROOM,
- MATCH_FAIL,
- PERSONAL_CENTER_CALL
-}
\ No newline at end of file
diff --git a/modules/mogo-module-chat/src/main/java/com/mogo/chat/provider/ServiceApi.kt b/modules/mogo-module-chat/src/main/java/com/mogo/chat/provider/ServiceApi.kt
index 15847b13cc..4ffb041223 100644
--- a/modules/mogo-module-chat/src/main/java/com/mogo/chat/provider/ServiceApi.kt
+++ b/modules/mogo-module-chat/src/main/java/com/mogo/chat/provider/ServiceApi.kt
@@ -3,21 +3,11 @@ package com.mogo.chat.provider
import com.mogo.commons.AbsMogoApplication
import com.mogo.map.location.IMogoLocationClient
import com.mogo.module.common.MogoApisHandler
-import com.mogo.service.map.IMogoMapService
-import com.mogo.service.statusmanager.IMogoStatusManager
class ServiceApi {
companion object {
- fun mapService(): IMogoMapService?{
- return MogoApisHandler.getInstance().apis.mapServiceApi
- }
-
- fun statusManager(): IMogoStatusManager? {
- return MogoApisHandler.getInstance().apis.statusManagerApi
- }
-
fun locationClient(): IMogoLocationClient? {
return MogoApisHandler.getInstance().apis.mapServiceApi.getSingletonLocationClient(AbsMogoApplication.getApp().applicationContext)
}
diff --git a/modules/mogo-module-chat/src/main/java/com/mogo/chat/service/IMService.kt b/modules/mogo-module-chat/src/main/java/com/mogo/chat/service/IMService.kt
index f02f09c50c..2dc33919fe 100644
--- a/modules/mogo-module-chat/src/main/java/com/mogo/chat/service/IMService.kt
+++ b/modules/mogo-module-chat/src/main/java/com/mogo/chat/service/IMService.kt
@@ -16,18 +16,11 @@ import com.mogo.chat.constant.HttpConstants
import com.mogo.chat.constant.SOCKET_HAND_SHAKE
import com.mogo.chat.constant.SOCKET_HEART_BEAT
import com.mogo.chat.constant.TAG
-import com.mogo.chat.model.bean.Message
-import com.mogo.chat.model.bean.Sns
import com.mogo.chat.model.bean.SocketMsg
-import com.mogo.chat.model.bean.toSns
import com.mogo.chat.model.control.ChatController
-import com.mogo.chat.util.UserInfoHelper.currentRoomId
import com.mogo.chat.util.audio.AudioFocusUtil
import com.mogo.chat.util.log
import com.mogo.chat.util.sp.getRoomId
-import com.mogo.chat.util.trackAppEnter
-import com.mogo.chat.window.CallingWindowManager
-import com.mogo.chat.window.IWindowCallActionListener
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.websocket.ISocketMsgCallBack
import com.mogo.websocket.ISocketMsgSetting
@@ -36,7 +29,7 @@ import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
-class IMService : Service(), ICallMessage, IWindowCallActionListener {
+class IMService : Service(), ICallMessage {
companion object {
@@ -45,8 +38,6 @@ class IMService : Service(), ICallMessage, IWindowCallActionListener {
}
}
- private lateinit var callingWindowManager: CallingWindowManager
-
override fun onBind(intent: Intent): IBinder? {
return null
}
@@ -72,7 +63,6 @@ class IMService : Service(), ICallMessage, IWindowCallActionListener {
ChatController.getUserInfo()
callController.addCallBack(this.javaClass.simpleName, this)
- callingWindowManager = CallingWindowManager(this, this)
// 注册状态回调,用来处理音频焦点
callTypeManager.addCallTypeChangedListener(object : ICallTypeChangedListener {
override fun onCallTypeChanged(callType: IMType) {
@@ -101,7 +91,8 @@ class IMService : Service(), ICallMessage, IWindowCallActionListener {
override fun getHeartBeatMsg(): String {
log(TAG, "getHeartBeatMsg")
- val socketMsg = SocketMsg(SOCKET_HEART_BEAT, MoGoAiCloudClientConfig.getInstance().sn, getRoomId())
+ val socketMsg =
+ SocketMsg(SOCKET_HEART_BEAT, MoGoAiCloudClientConfig.getInstance().sn, getRoomId())
return Gson().toJson(socketMsg)
}
}
@@ -133,57 +124,6 @@ class IMService : Service(), ICallMessage, IWindowCallActionListener {
}
}
-
- override fun initStatus() {
- super.initStatus()
- callingWindowManager.hideIncomingCall()
- }
-
- /**
- * 浮窗点击接听电话
- */
- override fun windowAnswerCall(userReceiver: Sns) {
- trackAppEnter("7")
- ChatServiceHandler.answer(userReceiver.sn, currentRoomId, {
- log(TAG, "接听电话成功 ---> ")
- callingWindowManager.hideIncomingCall()
- ChatController.enterRoom(currentRoomId)
- callController.callingReceiver()
- }, {
- log(TAG, "IMService answer call is error ,please try again")
- })
- }
-
- /**
- * 浮窗显示拒绝接听电话
- */
- override fun windowRefuseCall(sns: Sns) {
- ChatServiceHandler.refuseCall(sns.sn, {}, {})
- callingWindowManager.hideIncomingCall()
- }
-
- /**
- * 收到来电消息
- * 1.如果当前已经进房,则拒绝
- * 2.如果当前已经收到邀请信息,则拒绝
- * 3.如果当前正在打电话中,则拒绝
- */
- override fun receiverCalling(message: Message) {
- super.receiverCalling(message)
- if (callingWindowManager.isWindowShow) {
- log(TAG, "已在通话进程中,准备拒绝他 ---> ")
- ChatServiceHandler.refuseCall(message.snSender, {}, {}, message.roomId)
- } else {
- log(TAG, "有人打来电话,准备显示 ---> $currentRoomId")
- callingWindowManager.showIncomingCall(message.toSns())
- }
- }
-
- override fun refuseMatchToShowCalling(message: Message) {
- super.refuseMatchToShowCalling(message)
- callingWindowManager.showIncomingCall(message.toSns())
- }
-
override fun onTrimMemory(level: Int) {
super.onTrimMemory(level)
log(TAG, "onTrimMemory ---> ")
diff --git a/modules/mogo-module-chat/src/main/java/com/mogo/chat/util/AnalyticsUtil.kt b/modules/mogo-module-chat/src/main/java/com/mogo/chat/util/AnalyticsUtil.kt
index e5792ec2db..061946314e 100644
--- a/modules/mogo-module-chat/src/main/java/com/mogo/chat/util/AnalyticsUtil.kt
+++ b/modules/mogo-module-chat/src/main/java/com/mogo/chat/util/AnalyticsUtil.kt
@@ -43,21 +43,7 @@ private fun track(eventType: String, data: MutableMap? = hashMapOf(
trackRouter!!.track(eventType, data)
}
-@DebugLog
-fun trackAppEnter(type: String, context: Context = AbsMogoApplication.getApp().applicationContext) {
- trackNormalEvent(
- TRACK_APP_ENTER,
- mutableMapOf(
- "from" to type,
- "appname" to context.getString(R.string.app_name),
- "appversion" to context.packageManager.getPackageInfo(
- context.packageName,
- 0
- ).versionName
- )
- )
-}
-//todo
+
@DebugLog
fun trackCall(callType: Int, type: Int) {
//记录开始语音、直播时间
diff --git a/modules/mogo-module-chat/src/main/java/com/mogo/chat/util/sp/SharedPreferenceUtil.kt b/modules/mogo-module-chat/src/main/java/com/mogo/chat/util/sp/SharedPreferenceUtil.kt
index 6526d8dc10..6707cfce6b 100644
--- a/modules/mogo-module-chat/src/main/java/com/mogo/chat/util/sp/SharedPreferenceUtil.kt
+++ b/modules/mogo-module-chat/src/main/java/com/mogo/chat/util/sp/SharedPreferenceUtil.kt
@@ -2,10 +2,7 @@
package com.mogo.chat.util.sp
-import com.mogo.chat.aspect.DebugLog
-
const val TEMPORARY_FILE_NAME = "temporary_im_data"
-const val CONFIG_FILE_NAME = "configs_im_data"
const val FILE_NAME = "settings_im_data"
const val PARAM_ROOM_ID = "PARAM_ROOM_ID"
@@ -14,20 +11,7 @@ const val PARAM_NEW_FOCUS = "PARAM_NEW_FOCUS"
const val PARAM_VOICE_TYPE = "PARAM_VOICE_TYPE"
const val PARAM_CALL_TIME = "PARAM_CALL_TIME"
-const val PARAM_INIT_TIP = "PARAM_INIT_TIP"
const val PARAM_CAR_ONLINE_STATUS = "PARAM_CAR_ONLINE_STATUS"
-const val PARAM_GUIDE_SHOW_STATUS = "PARAM_GUIDE_SHOW_STATUS"
-
-const val PARAM_CONFIG_EXPIRY_TIME = "PARAM_CONFIG_EXPIRY_TIME"
-const val PARAM_CONFIG_COUNT_DOWN_TIME = "PARAM_CONFIG_COUNT_DOWN_TIME"
-const val PARAM_CONFIG_VOICE_CONTENT = "PARAM_CONFIG_VOICE_CONTENT"
-const val PARAM_CONFIG_IMAGE_IS_SAVED = "PARAM_CONFIG_IMAGE_IS_SAVED"
-const val PARAM_CONFIG_TOPIC_GUIDE = "PARAM_CONFIG_TOPIC_GUIDE"
-
-const val PARAM_CONFIG_FOCUS_NOTICE_TIMES = "PARAM_CONFIG_FOCUS_NOTICE_TIMES"
-
-const val PARAM_CONFIG_OWN_NICK_NAME = "PARAM_CONFIG_OWN_NICK_NAME"
-const val PARAM_CONFIG_OWN_HEAD_IMG = "PARAM_CONFIG_OWN_HEAD_IMG"
fun saveRoomId(roomId: Int) {
getCommitSP(TEMPORARY_FILE_NAME) {
@@ -86,15 +70,6 @@ fun getCarOnLineStatus(): Boolean {
return getSP(FILE_NAME).getBoolean(PARAM_CAR_ONLINE_STATUS, true)
}
-fun initTip(initType: Int) {
- getApplySp(FILE_NAME) {
- putBoolean(PARAM_INIT_TIP + initType, true)
- }
-}
-
-fun getInitStatus(initType: Int): Boolean {
- return getSP(FILE_NAME).getBoolean(PARAM_INIT_TIP + initType, false)
-}
fun recordCallTime() {
getApplySp(FILE_NAME) {
@@ -111,77 +86,3 @@ fun getTalkTime(): Long {
}
}
-fun guideHasShown() {
- getApplySp(FILE_NAME) {
- putBoolean(PARAM_GUIDE_SHOW_STATUS, true).apply()
- }
-}
-
-fun getGuideShowStatus(): Boolean {
- return getSP(FILE_NAME).getBoolean(PARAM_GUIDE_SHOW_STATUS, false)
-}
-
-
-/**********************************************配置Data*****************************************************/
-
-fun setExpiryTime(expiryTime: Long) {
- getApplySp(CONFIG_FILE_NAME) {
- putLong(PARAM_CONFIG_EXPIRY_TIME, expiryTime)
- }
-}
-
-fun isExpiryTime(requestTime: Long): Boolean {
- return getSP(CONFIG_FILE_NAME).getLong(PARAM_CONFIG_EXPIRY_TIME, 0) != requestTime
-}
-
-fun setCountDownTime(countDownTime: Int) {
- getApplySp(CONFIG_FILE_NAME) {
- putInt(PARAM_CONFIG_COUNT_DOWN_TIME, countDownTime)
- }
-}
-
-fun getCountDownTime(): Int {
- return getSP(CONFIG_FILE_NAME).getInt(PARAM_CONFIG_COUNT_DOWN_TIME, 0)
-}
-
-fun setConfigVoiceContent(voiceContent: String) {
- getApplySp(CONFIG_FILE_NAME) {
- putString(PARAM_CONFIG_VOICE_CONTENT, voiceContent)
- }
-}
-
-fun getConfigVoiceContent(): String {
- return getSP(CONFIG_FILE_NAME).getString(PARAM_CONFIG_VOICE_CONTENT, "")!!
-}
-
-fun setImageSaveStatus(saveStatus: Boolean) {
- getApplySp(CONFIG_FILE_NAME) {
- putBoolean(PARAM_CONFIG_IMAGE_IS_SAVED, saveStatus)
- }
-}
-
-fun getImageSaveStatus(): Boolean {
- return getSP(CONFIG_FILE_NAME).getBoolean(PARAM_CONFIG_IMAGE_IS_SAVED, false)
-}
-
-fun setFocusNoticeTimes(times: Int) {
- getApplySp(CONFIG_FILE_NAME) {
- putInt(PARAM_CONFIG_FOCUS_NOTICE_TIMES, times)
- }
-}
-
-fun getFocusNoticeTimes(): Int {
- return getSP(CONFIG_FILE_NAME).getInt(PARAM_CONFIG_FOCUS_NOTICE_TIMES, 0)
-}
-
-@DebugLog
-fun setTopicGuideContent(content: String) {
- getApplySp(CONFIG_FILE_NAME) {
- putString(PARAM_CONFIG_TOPIC_GUIDE, content)
- }
-}
-
-fun getTopicGuideContent(): Array {
- val content = getSP(CONFIG_FILE_NAME).getString(PARAM_CONFIG_TOPIC_GUIDE, "")
- return if (content.isNullOrEmpty()) emptyArray() else content.split("/").toTypedArray()
-}
\ No newline at end of file
diff --git a/modules/mogo-module-chat/src/main/java/com/mogo/chat/window/CallingWindowManager.kt b/modules/mogo-module-chat/src/main/java/com/mogo/chat/window/CallingWindowManager.kt
deleted file mode 100644
index ea2aeaed6d..0000000000
--- a/modules/mogo-module-chat/src/main/java/com/mogo/chat/window/CallingWindowManager.kt
+++ /dev/null
@@ -1,252 +0,0 @@
-package com.mogo.chat.window
-
-import android.content.Context
-import android.graphics.PixelFormat
-import android.media.AudioManager
-import android.os.Build
-import android.os.Handler
-import android.view.Gravity
-import android.view.LayoutInflater
-import android.view.View
-import android.view.WindowManager
-import android.view.WindowManager.LayoutParams
-import android.widget.ImageButton
-import android.widget.ImageView
-import android.widget.TextView
-import com.mogo.chat.R
-import com.mogo.chat.constant.TAG
-import com.mogo.chat.model.bean.Sns
-import com.mogo.chat.util.MediaController
-import com.mogo.chat.util.log
-import com.mogo.chat.voice.IMVoiceClient
-import com.mogo.chat.voice.IVoiceIntentListener
-import com.mogo.utils.WindowUtils
-import com.mogo.utils.glide.GlideApp
-
-/**
- * 来电界面管理
- */
-class CallingWindowManager(
- val context: Context,
- private val callActionListener: IWindowCallActionListener
-) : IVoiceIntentListener {
-
- companion object {
- const val MSG_DIALING_TIME_OUT = 1001
- const val DEFAULT_MAX_DIALING_TIME = 30 * 1000L
- }
-
- private var windowManager: WindowManager? = null
- var isWindowShow = false
- private var isShowBig = false
- private var bodyView: View? = null
- private var layoutParams: LayoutParams = LayoutParams()
- private lateinit var userInfo: Sns
-
- private lateinit var btnScale: ImageButton
- private lateinit var ivHeadImg: ImageView
- private lateinit var tvNickName: TextView
- private lateinit var tvBigAnswer: TextView
- private lateinit var tvBigCancel: TextView
- private lateinit var ibSmallAnswer: ImageButton
- private lateinit var ibSmallCancel: ImageButton
-
- private val handler = Handler(context.mainLooper) {
- log(TAG, "times up ,ready to refuse call ")
- when (it.what) {
- MSG_DIALING_TIME_OUT -> callActionListener.windowRefuseCall(userInfo)
- }
- true
- }
-
- fun showIncomingCall(userInfo: Sns) {
- if (!isWindowShow) {
- log(TAG, "显示来电浮窗======")
- broadCastVoicePrompt()
- handler.sendEmptyMessageDelayed(MSG_DIALING_TIME_OUT, DEFAULT_MAX_DIALING_TIME)
- isWindowShow = true
- this.userInfo = userInfo
- windowManager = context.getSystemService(Context.WINDOW_SERVICE) as WindowManager
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
- layoutParams.type = LayoutParams.TYPE_APPLICATION_OVERLAY
- } else {
- layoutParams.type = LayoutParams.TYPE_PHONE
- }
- layoutParams.flags = LayoutParams.FLAG_NOT_FOCUSABLE
- layoutParams.gravity = Gravity.START or Gravity.TOP
- layoutParams.format = PixelFormat.RGBA_8888
- exchangeToBig()
- }
- }
-
- private fun exchangeToBig() {
- windowManager?.let {
- if (bodyView != null) {
- // 如果bodyView不为空,需要先清除掉,然后重新添加,因为如果不为空,则说明是从小界面切换回大界面,而不是初始化展示大界面
- it.removeView(bodyView)
- }
- bodyView =
- LayoutInflater.from(context).inflate(R.layout.window_incomming_call_big, null)
- layoutParams.width = LayoutParams.MATCH_PARENT
- layoutParams.height = LayoutParams.MATCH_PARENT
- layoutParams.x = 0
- layoutParams.y = 0
- initBigView()
- it.addView(bodyView, layoutParams)
- isShowBig = true
- }
- }
-
- private fun initBigView() {
- bodyView?.let {
- btnScale = it.findViewById(R.id.btnScale)
- ivHeadImg = it.findViewById(R.id.ivHead)
- tvNickName = it.findViewById(R.id.tvUserName)
- tvBigAnswer = it.findViewById(R.id.tvBigAnswer)
- tvBigCancel = it.findViewById(R.id.tvBigCancel)
-
- it.setOnClickListener(null)
- GlideApp.with(context).load(userInfo.headImgUrl)
- .placeholder(R.mipmap.icon_avator_big).circleCrop()
- .into(ivHeadImg)
-// tvNickName.text = userInfo.nickName
- tvNickName.text = "云平台" //todo 需要产品后面更改逻辑,避免写死造成困扰
-
- btnScale.setOnClickListener {
- exchangeToSmall()
- }
-
- tvBigAnswer.setOnClickListener {
- // 接听电话
- clickDialingCall(true)
- }
-
- tvBigCancel.setOnClickListener {
- // 拒绝接听电话
- clickDialingCall(false)
- }
- }
- }
-
- private fun exchangeToSmall() {
- windowManager?.let {
- it.removeViewImmediate(bodyView)
- bodyView =
- LayoutInflater.from(context).inflate(R.layout.window_incomming_call_small, null)
- val sWidth = WindowUtils.getScreenWidth(context)
- val sHeight = WindowUtils.getScreenHeight(context)
- val x =
- sWidth - context.resources.getDimension(R.dimen.dp_580) - context.resources.getDimension(
- R.dimen.dp_310
- )
- val y =
- sHeight - context.resources.getDimension(R.dimen.dp_120) - context.resources.getDimension(
- R.dimen.dp_60
- ) - WindowUtils.getStatusBarHeight(context)
- layoutParams.width = context.resources.getDimension(R.dimen.dp_768).toInt()
- layoutParams.height = context.resources.getDimension(R.dimen.dp_212).toInt()
- layoutParams.gravity = Gravity.START or Gravity.TOP
- layoutParams.x = x.toInt()
- layoutParams.y = y.toInt()
- initSmallView()
- it.addView(bodyView, layoutParams)
- isShowBig = false
- }
- }
-
- private fun initSmallView() {
- bodyView?.let {
- tvNickName = it.findViewById(R.id.tvSmallUserName)
- ibSmallAnswer = it.findViewById(R.id.ibSmallAnswer)
- ibSmallCancel = it.findViewById(R.id.ibSmallCancel)
-
- tvNickName.text = userInfo.nickName
-
- it.setOnClickListener {
- exchangeToBig()
- }
- ibSmallAnswer.setOnClickListener {
- // 接听电话
- callActionListener.windowAnswerCall(userInfo)
- }
- ibSmallCancel.setOnClickListener {
- // 拒绝接听电话
- callActionListener.windowRefuseCall(userInfo)
- }
- }
- }
-
- fun hideIncomingCall() {
- log(TAG,"hideIncomingCall")
- if (isWindowShow && windowManager != null) {
- handler.removeMessages(MSG_DIALING_TIME_OUT)
- log(TAG,"removeView : windowManager")
- windowManager!!.removeView(bodyView)
- windowManager = null
- bodyView = null
- isWindowShow = false
- }
- releaseAudioAndVoice()
- }
-
- /**
- * 来电语音播报,现在只有语音来电,暂时不报别的
- */
- private fun broadCastVoicePrompt() {
- IMVoiceClient.speakAndRegisterCall({ agree ->
- if (isWindowShow) {
- log(TAG, "speakAndRegisterCall")
- clickDialingCall(agree)
- }
- }, {
- log(TAG, "playFinish")
- playAudioCall()
- registerIntentInComingCall()
- })
- }
-
- private fun clickDialingCall(agree: Boolean) {
- if (agree) {
- callActionListener.windowAnswerCall(userInfo)
- } else {
- callActionListener.windowRefuseCall(userInfo)
- }
- releaseAudioAndVoice()
- }
-
- override fun onVoiceAnswerCall() {
- callActionListener.windowAnswerCall(userInfo)
- releaseAudioAndVoice()
- }
-
- override fun onVoiceRefuseCall() {
- callActionListener.windowRefuseCall(userInfo)
- releaseAudioAndVoice()
- }
-
- private fun releaseAudioAndVoice() {
- stopAudioCall()
- unRegisterVoice()
- }
-
- private fun playAudioCall() {
- log(TAG, "播放来电铃声=====$isWindowShow")
- if (isWindowShow) {
- MediaController.startPlay(context, R.raw.call, true, AudioManager.STREAM_RING)
- }
- }
-
- private fun stopAudioCall() {
- log(TAG, "停止播放来电铃声======")
- MediaController.release()
- }
-
- private fun registerIntentInComingCall() {
- IMVoiceClient.registerIntentInComingCall(this)
- }
-
- private fun unRegisterVoice() {
- IMVoiceClient.releaseSpeakAndRegisterCallback()
- IMVoiceClient.unRegisterIntentInComingCall(this)
- }
-}
\ No newline at end of file
diff --git a/modules/mogo-module-chat/src/main/java/com/mogo/chat/window/IWindowCallActionListener.kt b/modules/mogo-module-chat/src/main/java/com/mogo/chat/window/IWindowCallActionListener.kt
deleted file mode 100644
index 46aec94b81..0000000000
--- a/modules/mogo-module-chat/src/main/java/com/mogo/chat/window/IWindowCallActionListener.kt
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.mogo.chat.window
-
-import com.mogo.chat.model.bean.Sns
-
-
-/**
- * 浮窗通话状态通知
- */
-interface IWindowCallActionListener {
- /**
- * 浮窗点击接听电话
- */
- fun windowAnswerCall(userReceiver: Sns)
-
- /**
- * 浮窗显示拒绝接听电话
- */
- fun windowRefuseCall(sns: Sns)
-}
\ No newline at end of file
diff --git a/modules/mogo-module-chat/src/main/res/drawable/selector_btn_hangup.xml b/modules/mogo-module-chat/src/main/res/drawable/selector_btn_hangup.xml
deleted file mode 100644
index 3ac2e3780a..0000000000
--- a/modules/mogo-module-chat/src/main/res/drawable/selector_btn_hangup.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/mogo-module-chat/src/main/res/drawable/selector_btn_scale_dialing.xml b/modules/mogo-module-chat/src/main/res/drawable/selector_btn_scale_dialing.xml
deleted file mode 100644
index 9403c1350d..0000000000
--- a/modules/mogo-module-chat/src/main/res/drawable/selector_btn_scale_dialing.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/mogo-module-chat/src/main/res/drawable/voice_answer_selector.xml b/modules/mogo-module-chat/src/main/res/drawable/voice_answer_selector.xml
deleted file mode 100644
index 8292e94703..0000000000
--- a/modules/mogo-module-chat/src/main/res/drawable/voice_answer_selector.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/mogo-module-chat/src/main/res/layout/window_incomming_call_big.xml b/modules/mogo-module-chat/src/main/res/layout/window_incomming_call_big.xml
deleted file mode 100644
index b875718b27..0000000000
--- a/modules/mogo-module-chat/src/main/res/layout/window_incomming_call_big.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/modules/mogo-module-chat/src/main/res/layout/window_incomming_call_small.xml b/modules/mogo-module-chat/src/main/res/layout/window_incomming_call_small.xml
deleted file mode 100644
index 6cf63df39c..0000000000
--- a/modules/mogo-module-chat/src/main/res/layout/window_incomming_call_small.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/modules/mogo-module-chat/src/main/res/mipmap-ldpi/answer_normal.webp b/modules/mogo-module-chat/src/main/res/mipmap-ldpi/answer_normal.webp
deleted file mode 100644
index 2d2167444f..0000000000
Binary files a/modules/mogo-module-chat/src/main/res/mipmap-ldpi/answer_normal.webp and /dev/null differ
diff --git a/modules/mogo-module-chat/src/main/res/mipmap-ldpi/answer_press.webp b/modules/mogo-module-chat/src/main/res/mipmap-ldpi/answer_press.webp
deleted file mode 100644
index 54df8be4d1..0000000000
Binary files a/modules/mogo-module-chat/src/main/res/mipmap-ldpi/answer_press.webp and /dev/null differ
diff --git a/modules/mogo-module-chat/src/main/res/mipmap-ldpi/dialing_big_bg.webp b/modules/mogo-module-chat/src/main/res/mipmap-ldpi/dialing_big_bg.webp
deleted file mode 100644
index c62be37746..0000000000
Binary files a/modules/mogo-module-chat/src/main/res/mipmap-ldpi/dialing_big_bg.webp and /dev/null differ
diff --git a/modules/mogo-module-chat/src/main/res/mipmap-ldpi/hangup_normal.webp b/modules/mogo-module-chat/src/main/res/mipmap-ldpi/hangup_normal.webp
deleted file mode 100644
index 197eb6372c..0000000000
Binary files a/modules/mogo-module-chat/src/main/res/mipmap-ldpi/hangup_normal.webp and /dev/null differ
diff --git a/modules/mogo-module-chat/src/main/res/mipmap-ldpi/hangup_press.webp b/modules/mogo-module-chat/src/main/res/mipmap-ldpi/hangup_press.webp
deleted file mode 100644
index 644278ba39..0000000000
Binary files a/modules/mogo-module-chat/src/main/res/mipmap-ldpi/hangup_press.webp and /dev/null differ
diff --git a/modules/mogo-module-chat/src/main/res/mipmap-ldpi/scale_dialing_normal.webp b/modules/mogo-module-chat/src/main/res/mipmap-ldpi/scale_dialing_normal.webp
deleted file mode 100644
index b415d68623..0000000000
Binary files a/modules/mogo-module-chat/src/main/res/mipmap-ldpi/scale_dialing_normal.webp and /dev/null differ
diff --git a/modules/mogo-module-chat/src/main/res/mipmap-ldpi/scale_dialing_press.webp b/modules/mogo-module-chat/src/main/res/mipmap-ldpi/scale_dialing_press.webp
deleted file mode 100644
index 3ec2736944..0000000000
Binary files a/modules/mogo-module-chat/src/main/res/mipmap-ldpi/scale_dialing_press.webp and /dev/null differ
diff --git a/modules/mogo-module-chat/src/main/res/mipmap-mdpi/icon_avator_big.webp b/modules/mogo-module-chat/src/main/res/mipmap-mdpi/icon_avator_big.webp
deleted file mode 100644
index 63dedc5390..0000000000
Binary files a/modules/mogo-module-chat/src/main/res/mipmap-mdpi/icon_avator_big.webp and /dev/null differ
diff --git a/modules/mogo-module-chat/src/main/res/mipmap-mdpi/main_small_bg.webp b/modules/mogo-module-chat/src/main/res/mipmap-mdpi/main_small_bg.webp
deleted file mode 100644
index a9458cc499..0000000000
Binary files a/modules/mogo-module-chat/src/main/res/mipmap-mdpi/main_small_bg.webp and /dev/null differ
diff --git a/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/answer_normal.webp b/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/answer_normal.webp
deleted file mode 100644
index 83b58a4099..0000000000
Binary files a/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/answer_normal.webp and /dev/null differ
diff --git a/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/answer_press.webp b/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/answer_press.webp
deleted file mode 100644
index c4c55bb9aa..0000000000
Binary files a/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/answer_press.webp and /dev/null differ
diff --git a/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/dialing_big_bg.webp b/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/dialing_big_bg.webp
deleted file mode 100644
index c62be37746..0000000000
Binary files a/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/dialing_big_bg.webp and /dev/null differ
diff --git a/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/hangup_normal.webp b/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/hangup_normal.webp
deleted file mode 100644
index d40accaba6..0000000000
Binary files a/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/hangup_normal.webp and /dev/null differ
diff --git a/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/hangup_press.webp b/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/hangup_press.webp
deleted file mode 100644
index fc50f9b667..0000000000
Binary files a/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/hangup_press.webp and /dev/null differ
diff --git a/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/scale_dialing_normal.webp b/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/scale_dialing_normal.webp
deleted file mode 100644
index e9d1d3e69d..0000000000
Binary files a/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/scale_dialing_normal.webp and /dev/null differ
diff --git a/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/scale_dialing_press.webp b/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/scale_dialing_press.webp
deleted file mode 100644
index 51749ccd63..0000000000
Binary files a/modules/mogo-module-chat/src/main/res/mipmap-xhdpi/scale_dialing_press.webp and /dev/null differ
diff --git a/modules/mogo-module-chat/src/main/res/values-xhdpi-v4/dimens.xml b/modules/mogo-module-chat/src/main/res/values-xhdpi-v4/dimens.xml
deleted file mode 100644
index 8d5a2ba392..0000000000
--- a/modules/mogo-module-chat/src/main/res/values-xhdpi-v4/dimens.xml
+++ /dev/null
@@ -1,1050 +0,0 @@
-
-
-
-
-
- -60px
- -30px
- -20px
- -12px
- -10px
- -8px
- -5px
- -2px
- -1px
- 0px
- 0.1px
- 0.5px
- 1px
- 1.5px
- 2px
- 2.5px
- 3px
- 3.5px
- 4px
- 4.5px
- 5px
- 6px
- 7px
- 7.5px
- 8px
- 9px
- 10px
- 11px
- 12px
- 13px
- 14px
- 15px
- 16px
- 17px
- 18px
- 19px
- 20px
- 21px
- 22px
- 23px
- 24px
- 25px
- 26px
- 27px
- 28px
- 29px
- 30px
- 31px
- 32px
- 33px
- 34px
- 35px
- 36px
- 37px
- 38px
- 39px
- 40px
- 41px
- 42px
- 43px
- 44px
- 45px
- 46px
- 47px
- 48px
- 49px
- 50px
- 51px
- 52px
- 53px
- 54px
- 55px
- 56px
- 57px
- 58px
- 59px
- 60px
- 61px
- 62px
- 63px
- 64px
- 65px
- 66px
- 67px
- 68px
- 69px
- 70px
- 71px
- 72px
- 73px
- 74px
- 75px
- 76px
- 77px
- 78px
- 79px
- 80px
- 81px
- 82px
- 83px
- 84px
- 85px
- 86px
- 87px
- 88px
- 89px
- 90px
- 91px
- 92px
- 93px
- 94px
- 95px
- 96px
- 97px
- 98px
- 99px
- 100px
- 101px
- 102px
- 103px
- 104px
- 104.5px
- 105px
- 106px
- 107px
- 108px
- 109px
- 110px
- 111px
- 112px
- 113px
- 114px
- 115px
- 116px
- 117px
- 118px
- 119px
- 120px
- 121px
- 122px
- 123px
- 124px
- 125px
- 126px
- 127px
- 128px
- 129px
- 130px
- 131px
- 132px
- 133px
- 134px
- 134.5px
- 135px
- 136px
- 137px
- 138px
- 139px
- 140px
- 141px
- 142px
- 143px
- 144px
- 145px
- 146px
- 147px
- 148px
- 149px
- 150px
- 151px
- 152px
- 153px
- 154px
- 155px
- 156px
- 157px
- 158px
- 159px
- 160px
- 161px
- 162px
- 163px
- 164px
- 165px
- 166px
- 167px
- 168px
- 169px
- 170px
- 171px
- 172px
- 173px
- 174px
- 175px
- 176px
- 177px
- 178px
- 179px
- 180px
- 181px
- 182px
- 183px
- 184px
- 185px
- 186px
- 187px
- 188px
- 189px
- 190px
- 191px
- 191.25px
- 192px
- 193px
- 194px
- 195px
- 196px
- 197px
- 198px
- 199px
- 200px
- 201px
- 202px
- 203px
- 204px
- 205px
- 206px
- 207px
- 208px
- 209px
- 210px
- 211px
- 212px
- 213px
- 214px
- 215px
- 216px
- 217px
- 218px
- 219px
- 220px
- 221px
- 222px
- 223px
- 224px
- 225px
- 226px
- 227px
- 228px
- 229px
- 230px
- 231px
- 232px
- 233px
- 234px
- 235px
- 236px
- 237px
- 238px
- 239px
- 240px
- 241px
- 242px
- 243px
- 244px
- 245px
- 246px
- 247px
- 248px
- 249px
- 250px
- 251px
- 252px
- 253px
- 254px
- 255px
- 256px
- 257px
- 258px
- 259px
- 260px
- 261px
- 262px
- 263px
- 264px
- 265px
- 266px
- 267px
- 268px
- 269px
- 270px
- 271px
- 272px
- 273px
- 274px
- 275px
- 276px
- 277px
- 278px
- 279px
- 280px
- 281px
- 282px
- 283px
- 284px
- 285px
- 286px
- 287px
- 288px
- 289px
- 290px
- 291px
- 292px
- 293px
- 294px
- 295px
- 296px
- 297px
- 298px
- 299px
- 300px
- 301px
- 302px
- 303px
- 304px
- 305px
- 306px
- 307px
- 308px
- 309px
- 310px
- 311px
- 312px
- 313px
- 314px
- 315px
- 316px
- 317px
- 318px
- 319px
- 320px
- 321px
- 322px
- 323px
- 324px
- 325px
- 326px
- 327px
- 328px
- 329px
- 330px
- 331px
- 332px
- 333px
- 334px
- 335px
- 336px
- 337px
- 338px
- 339px
- 340px
- 341px
- 342px
- 343px
- 344px
- 345px
- 346px
- 347px
- 348px
- 349px
- 350px
- 351px
- 352px
- 353px
- 354px
- 355px
- 356px
- 357px
- 358px
- 359px
- 366px
- 367px
- 368px
- 369px
- 370px
- 371px
- 372px
- 373px
- 374px
- 375px
- 376px
- 377px
- 378px
- 379px
- 380px
- 381px
- 382px
- 383px
- 384px
- 385px
- 386px
- 387px
- 388px
- 389px
- 390px
- 391px
- 392px
- 393px
- 394px
- 395px
- 396px
- 397px
- 398px
- 399px
- 400px
- 401px
- 402px
- 403px
- 404px
- 405px
- 406px
- 407px
- 408px
- 409px
- 410px
- 411px
- 412px
- 413px
- 414px
- 415px
- 416px
- 417px
- 418px
- 419px
- 420px
- 421px
- 422px
- 423px
- 424px
- 425px
- 426px
- 427px
- 428px
- 429px
- 430px
- 431px
- 432px
- 433px
- 434px
- 435px
- 436px
- 437px
- 438px
- 439px
- 440px
- 441px
- 442px
- 443px
- 444px
- 445px
- 446px
- 447px
- 448px
- 449px
- 450px
- 451px
- 452px
- 453px
- 454px
- 455px
- 456px
- 457px
- 458px
- 459px
- 460px
- 461px
- 462px
- 463px
- 464px
- 465px
- 466px
- 467px
- 468px
- 469px
- 470px
- 471px
- 472px
- 473px
- 474px
- 475px
- 476px
- 477px
- 478px
- 479px
- 480px
- 481px
- 482px
- 483px
- 484px
- 485px
- 486px
- 487px
- 488px
- 489px
- 490px
- 491px
- 492px
- 493px
- 494px
- 495px
- 496px
- 497px
- 498px
- 499px
- 500px
- 501px
- 502px
- 503px
- 504px
- 505px
- 506px
- 507px
- 508px
- 509px
- 510px
- 511px
- 512px
- 513px
- 514px
- 515px
- 516px
- 517px
- 518px
- 519px
- 520px
- 521px
- 522px
- 523px
- 524px
- 525px
- 526px
- 527px
- 528px
- 529px
- 530px
- 531px
- 532px
- 533px
- 534px
- 535px
- 536px
- 537px
- 538px
- 539px
- 540px
- 541px
- 542px
- 543px
- 544px
- 545px
- 546px
- 547px
- 548px
- 549px
- 550px
- 551px
- 552px
- 553px
- 554px
- 555px
- 556px
- 557px
- 558px
- 559px
- 560px
- 561px
- 562px
- 563px
- 564px
- 565px
- 566px
- 567px
- 568px
- 569px
- 570px
- 571px
- 572px
- 573px
- 574px
- 575px
- 576px
- 577px
- 578px
- 579px
- 580px
- 581px
- 582px
- 583px
- 584px
- 585px
- 586px
- 587px
- 588px
- 589px
- 590px
- 591px
- 592px
- 593px
- 594px
- 595px
- 596px
- 597px
- 598px
- 599px
- 600px
- 601px
- 602px
- 603px
- 604px
- 605px
- 606px
- 607px
- 608px
- 609px
- 610px
- 611px
- 612px
- 613px
- 614px
- 615px
- 616px
- 617px
- 618px
- 619px
- 620px
- 621px
- 622px
- 623px
- 624px
- 625px
- 626px
- 627px
- 628px
- 629px
- 630px
- 631px
- 632px
- 633px
- 634px
- 635px
- 636px
- 637px
- 638px
- 639px
- 640px
- 641px
- 642px
- 643px
- 644px
- 645px
- 646px
- 647px
- 648px
- 649px
- 650px
- 651px
- 652px
- 653px
- 654px
- 655px
- 656px
- 657px
- 658px
- 659px
- 660px
- 661px
- 662px
- 663px
- 664px
- 665px
- 666px
- 667px
- 668px
- 669px
- 670px
- 671px
- 672px
- 673px
- 674px
- 675px
- 676px
- 677px
- 678px
- 679px
- 680px
- 681px
- 682px
- 683px
- 684px
- 685px
- 686px
- 687px
- 688px
- 689px
- 690px
- 691px
- 692px
- 693px
- 694px
- 695px
- 696px
- 697px
- 698px
- 699px
- 700px
- 701px
- 702px
- 703px
- 704px
- 705px
- 706px
- 707px
- 708px
- 709px
- 710px
- 711px
- 712px
- 713px
- 714px
- 715px
- 716px
- 717px
- 718px
- 719px
- 720px
- 721px
- 722px
- 723px
- 724px
- 725px
- 726px
- 727px
- 728px
- 729px
- 730px
- 731px
- 732px
- 733px
- 734px
- 735px
- 736px
- 737px
- 738px
- 739px
- 740px
- 741px
- 742px
- 743px
- 744px
- 745px
- 746px
- 747px
- 748px
- 749px
- 750px
- 751px
- 752px
- 753px
- 754px
- 755px
- 756px
- 757px
- 758px
- 759px
- 760px
- 761px
- 762px
- 763px
- 764px
- 765px
- 766px
- 767px
- 768px
- 769px
- 770px
- 771px
- 772px
- 773px
- 774px
- 775px
- 776px
- 777px
- 778px
- 779px
- 780px
- 781px
- 782px
- 783px
- 784px
- 785px
- 786px
- 787px
- 788px
- 789px
- 790px
- 791px
- 792px
- 793px
- 794px
- 795px
- 796px
- 797px
- 798px
- 799px
- 800px
- 801px
- 802px
- 803px
- 804px
- 805px
- 806px
- 807px
- 808px
- 809px
- 810px
- 811px
- 812px
- 813px
- 814px
- 815px
- 816px
- 817px
- 818px
- 819px
- 820px
- 821px
- 822px
- 823px
- 824px
- 825px
- 826px
- 827px
- 828px
- 829px
- 830px
- 831px
- 832px
- 833px
- 834px
- 835px
- 836px
- 837px
- 838px
- 839px
- 840px
- 841px
- 842px
- 843px
- 844px
- 845px
- 846px
- 847px
- 848px
- 849px
- 850px
- 851px
- 852px
- 853px
- 854px
- 855px
- 856px
- 857px
- 858px
- 859px
- 860px
- 861px
- 862px
- 863px
- 864px
- 865px
- 866px
- 867px
- 868px
- 869px
- 870px
- 871px
- 872px
- 873px
- 874px
- 875px
- 876px
- 877px
- 878px
- 879px
- 880px
- 881px
- 882px
- 883px
- 884px
- 885px
- 886px
- 887px
- 888px
- 889px
- 890px
- 891px
- 892px
- 893px
- 894px
- 895px
- 896px
- 897px
- 898px
- 899px
- 900px
- 901px
- 902px
- 903px
- 904px
- 905px
- 906px
- 907px
- 908px
- 909px
- 910px
- 911px
- 912px
- 913px
- 914px
- 915px
- 916px
- 917px
- 918px
- 919px
- 920px
- 921px
- 922px
- 923px
- 924px
- 925px
- 926px
- 927px
- 928px
- 929px
- 930px
- 931px
- 932px
- 933px
- 934px
- 935px
- 936px
- 937px
- 938px
- 939px
- 940px
- 941px
- 942px
- 943px
- 944px
- 945px
- 946px
- 947px
- 948px
- 949px
- 950px
- 951px
- 952px
- 953px
- 954px
- 955px
- 956px
- 957px
- 958px
- 959px
- 960px
- 961px
- 962px
- 963px
- 964px
- 965px
- 966px
- 967px
- 968px
- 969px
- 970px
- 971px
- 972px
- 973px
- 974px
- 975px
- 976px
- 977px
- 978px
- 979px
- 980px
- 981px
- 982px
- 983px
- 984px
- 985px
- 986px
- 987px
- 988px
- 989px
- 990px
- 991px
- 992px
- 993px
- 994px
- 995px
- 996px
- 997px
- 998px
- 999px
- 1300px
- 6px
- 7px
- 8px
- 9px
- 10px
- 11px
- 12px
- 13px
- 14px
- 15px
- 16px
- 17px
- 18px
- 19px
- 20px
- 21px
- 22px
- 23px
- 24px
- 25px
- 28px
- 30px
- 32px
- 34px
- 36px
- 38px
- 40px
- 42px
- 48px
-
-
diff --git a/modules/mogo-module-chat/src/main/res/values/colors.xml b/modules/mogo-module-chat/src/main/res/values/colors.xml
deleted file mode 100644
index 55344e5192..0000000000
--- a/modules/mogo-module-chat/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/modules/mogo-module-chat/src/main/res/values/dimens.xml b/modules/mogo-module-chat/src/main/res/values/dimens.xml
deleted file mode 100644
index 86faec4c01..0000000000
--- a/modules/mogo-module-chat/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,1046 +0,0 @@
-
-
- -32.8125px
- -16.4062px
- -10.9375px
- -6.5625px
- -5.4688px
- -4.3750px
- -2.7344px
- -1.0938px
- -0.5469px
- 0.0000px
- 0.0547px
- 0.2734px
- 0.5469px
- 0.8203px
- 1.0938px
- 1.3672px
- 1.6406px
- 1.9141px
- 2.1875px
- 2.4609px
- 2.7344px
- 3.2812px
- 3.8281px
- 4.1016px
- 4.3750px
- 4.9219px
- 5.4688px
- 6.0156px
- 6.5625px
- 7.1094px
- 7.6562px
- 8.2031px
- 8.7500px
- 9.2969px
- 9.8438px
- 10.3906px
- 10.9375px
- 11.4844px
- 12.0312px
- 12.5781px
- 13.1250px
- 13.6719px
- 14.2188px
- 14.7656px
- 15.3125px
- 15.8594px
- 16.4062px
- 16.9531px
- 17.5000px
- 18.0469px
- 18.5938px
- 19.1406px
- 19.6875px
- 20.2344px
- 20.7812px
- 21.3281px
- 21.8750px
- 22.4219px
- 22.9688px
- 23.5156px
- 24.0625px
- 24.6094px
- 25.1562px
- 25.7031px
- 26.2500px
- 26.7969px
- 27.3438px
- 27.8906px
- 28.4375px
- 28.9844px
- 29.5312px
- 30.0781px
- 30.6250px
- 31.1719px
- 31.7188px
- 32.2656px
- 32.8125px
- 33.3594px
- 33.9062px
- 34.4531px
- 35.0000px
- 35.5469px
- 36.0938px
- 36.6406px
- 37.1875px
- 37.7344px
- 38.2812px
- 38.8281px
- 39.3750px
- 39.9219px
- 40.4688px
- 41.0156px
- 41.5625px
- 42.1094px
- 42.6562px
- 43.2031px
- 43.7500px
- 44.2969px
- 44.8438px
- 45.3906px
- 45.9375px
- 46.4844px
- 47.0312px
- 47.5781px
- 48.1250px
- 48.6719px
- 49.2188px
- 49.7656px
- 50.3125px
- 50.8594px
- 51.4062px
- 51.9531px
- 52.5000px
- 53.0469px
- 53.5938px
- 54.1406px
- 54.6875px
- 55.2344px
- 55.7812px
- 56.3281px
- 56.8750px
- 57.1484px
- 57.4219px
- 57.9688px
- 58.5156px
- 59.0625px
- 59.6094px
- 60.1562px
- 60.7031px
- 61.2500px
- 61.7969px
- 62.3438px
- 62.8906px
- 63.4375px
- 63.9844px
- 64.5312px
- 65.0781px
- 65.6250px
- 66.1719px
- 66.7188px
- 67.2656px
- 67.8125px
- 68.3594px
- 68.9062px
- 69.4531px
- 70.0000px
- 70.5469px
- 71.0938px
- 71.6406px
- 72.1875px
- 72.7344px
- 73.2812px
- 73.5547px
- 73.8281px
- 74.3750px
- 74.9219px
- 75.4688px
- 76.0156px
- 76.5625px
- 77.1094px
- 77.6562px
- 78.2031px
- 78.7500px
- 79.2969px
- 79.8438px
- 80.3906px
- 80.9375px
- 81.4844px
- 82.0312px
- 82.5781px
- 83.1250px
- 83.6719px
- 84.2188px
- 84.7656px
- 85.3125px
- 85.8594px
- 86.4062px
- 86.9531px
- 87.5000px
- 88.0469px
- 88.5938px
- 89.1406px
- 89.6875px
- 90.2344px
- 90.7812px
- 91.3281px
- 91.8750px
- 92.4219px
- 92.9688px
- 93.5156px
- 94.0625px
- 94.6094px
- 95.1562px
- 95.7031px
- 96.2500px
- 96.7969px
- 97.3438px
- 97.8906px
- 98.4375px
- 98.9844px
- 99.5312px
- 100.0781px
- 100.6250px
- 101.1719px
- 101.7188px
- 102.2656px
- 102.8125px
- 103.3594px
- 103.9062px
- 104.4531px
- 104.5898px
- 105.0000px
- 105.5469px
- 106.0938px
- 106.6406px
- 107.1875px
- 107.7344px
- 108.2812px
- 108.8281px
- 109.3750px
- 109.9219px
- 110.4688px
- 111.0156px
- 111.5625px
- 112.1094px
- 112.6562px
- 113.2031px
- 113.7500px
- 114.2969px
- 114.8438px
- 115.3906px
- 115.9375px
- 116.4844px
- 117.0312px
- 117.5781px
- 118.1250px
- 118.6719px
- 119.2188px
- 119.7656px
- 120.3125px
- 120.8594px
- 121.4062px
- 121.9531px
- 122.5000px
- 123.0469px
- 123.5938px
- 124.1406px
- 124.6875px
- 125.2344px
- 125.7812px
- 126.3281px
- 126.8750px
- 127.4219px
- 127.9688px
- 128.5156px
- 129.0625px
- 129.6094px
- 130.1562px
- 130.7031px
- 131.2500px
- 131.7969px
- 132.3438px
- 132.8906px
- 133.4375px
- 133.9844px
- 134.5312px
- 135.0781px
- 135.6250px
- 136.1719px
- 136.7188px
- 137.2656px
- 137.8125px
- 138.3594px
- 138.9062px
- 139.4531px
- 140.0000px
- 140.5469px
- 141.0938px
- 141.6406px
- 142.1875px
- 142.7344px
- 143.2812px
- 143.8281px
- 144.3750px
- 144.9219px
- 145.4688px
- 146.0156px
- 146.5625px
- 147.1094px
- 147.6562px
- 148.2031px
- 148.7500px
- 149.2969px
- 149.8438px
- 150.3906px
- 150.9375px
- 151.4844px
- 152.0312px
- 152.5781px
- 153.1250px
- 153.6719px
- 154.2188px
- 154.7656px
- 155.3125px
- 155.8594px
- 156.4062px
- 156.9531px
- 157.5000px
- 158.0469px
- 158.5938px
- 159.1406px
- 159.6875px
- 160.2344px
- 160.7812px
- 161.3281px
- 161.8750px
- 162.4219px
- 162.9688px
- 163.5156px
- 164.0625px
- 164.6094px
- 165.1562px
- 165.7031px
- 166.2500px
- 166.7969px
- 167.3438px
- 167.8906px
- 168.4375px
- 168.9844px
- 169.5312px
- 170.0781px
- 170.6250px
- 171.1719px
- 171.7188px
- 172.2656px
- 172.8125px
- 173.3594px
- 173.9062px
- 174.4531px
- 175.0000px
- 175.5469px
- 176.0938px
- 176.6406px
- 177.1875px
- 177.7344px
- 178.2812px
- 178.8281px
- 179.3750px
- 179.9219px
- 180.4688px
- 181.0156px
- 181.5625px
- 182.1094px
- 182.6562px
- 183.2031px
- 183.7500px
- 184.2969px
- 184.8438px
- 185.3906px
- 185.9375px
- 186.4844px
- 187.0312px
- 187.5781px
- 188.1250px
- 188.6719px
- 189.2188px
- 189.7656px
- 190.3125px
- 190.8594px
- 191.4062px
- 191.9531px
- 192.5000px
- 193.0469px
- 193.5938px
- 194.1406px
- 194.6875px
- 195.2344px
- 195.7812px
- 196.3281px
- 200.1562px
- 200.7031px
- 201.2500px
- 201.7969px
- 202.3438px
- 202.8906px
- 203.4375px
- 203.9844px
- 204.5312px
- 205.0781px
- 205.6250px
- 206.1719px
- 206.7188px
- 207.2656px
- 207.8125px
- 208.3594px
- 208.9062px
- 209.4531px
- 210.0000px
- 210.5469px
- 211.0938px
- 211.6406px
- 212.1875px
- 212.7344px
- 213.2812px
- 213.8281px
- 214.3750px
- 214.9219px
- 215.4688px
- 216.0156px
- 216.5625px
- 217.1094px
- 217.6562px
- 218.2031px
- 218.7500px
- 219.2969px
- 219.8438px
- 220.3906px
- 220.9375px
- 221.4844px
- 222.0312px
- 222.5781px
- 223.1250px
- 223.6719px
- 224.2188px
- 224.7656px
- 225.3125px
- 225.8594px
- 226.4062px
- 226.9531px
- 227.5000px
- 228.0469px
- 228.5938px
- 229.1406px
- 229.6875px
- 230.2344px
- 230.7812px
- 231.3281px
- 231.8750px
- 232.4219px
- 232.9688px
- 233.5156px
- 234.0625px
- 234.6094px
- 235.1562px
- 235.7031px
- 236.2500px
- 236.7969px
- 237.3438px
- 237.8906px
- 238.4375px
- 238.9844px
- 239.5312px
- 240.0781px
- 240.6250px
- 241.1719px
- 241.7188px
- 242.2656px
- 242.8125px
- 243.3594px
- 243.9062px
- 244.4531px
- 245.0000px
- 245.5469px
- 246.0938px
- 246.6406px
- 247.1875px
- 247.7344px
- 248.2812px
- 248.8281px
- 249.3750px
- 249.9219px
- 250.4688px
- 251.0156px
- 251.5625px
- 252.1094px
- 252.6562px
- 253.2031px
- 253.7500px
- 254.2969px
- 254.8438px
- 255.3906px
- 255.9375px
- 256.4844px
- 257.0312px
- 257.5781px
- 258.1250px
- 258.6719px
- 259.2188px
- 259.7656px
- 260.3125px
- 260.8594px
- 261.4062px
- 261.9531px
- 262.5000px
- 263.0469px
- 263.5938px
- 264.1406px
- 264.6875px
- 265.2344px
- 265.7812px
- 266.3281px
- 266.8750px
- 267.4219px
- 267.9688px
- 268.5156px
- 269.0625px
- 269.6094px
- 270.1562px
- 270.7031px
- 271.2500px
- 271.7969px
- 272.3438px
- 272.8906px
- 273.4375px
- 273.9844px
- 274.5312px
- 275.0781px
- 275.6250px
- 276.1719px
- 276.7188px
- 277.2656px
- 277.8125px
- 278.3594px
- 278.9062px
- 279.4531px
- 280.0000px
- 280.5469px
- 281.0938px
- 281.6406px
- 282.1875px
- 282.7344px
- 283.2812px
- 283.8281px
- 284.3750px
- 284.9219px
- 285.4688px
- 286.0156px
- 286.5625px
- 287.1094px
- 287.6562px
- 288.2031px
- 288.7500px
- 289.2969px
- 289.8438px
- 290.3906px
- 290.9375px
- 291.4844px
- 292.0312px
- 292.5781px
- 293.1250px
- 293.6719px
- 294.2188px
- 294.7656px
- 295.3125px
- 295.8594px
- 296.4062px
- 296.9531px
- 297.5000px
- 298.0469px
- 298.5938px
- 299.1406px
- 299.6875px
- 300.2344px
- 300.7812px
- 301.3281px
- 301.8750px
- 302.4219px
- 302.9688px
- 303.5156px
- 304.0625px
- 304.6094px
- 305.1562px
- 305.7031px
- 306.2500px
- 306.7969px
- 307.3438px
- 307.8906px
- 308.4375px
- 308.9844px
- 309.5312px
- 310.0781px
- 310.6250px
- 311.1719px
- 311.7188px
- 312.2656px
- 312.8125px
- 313.3594px
- 313.9062px
- 314.4531px
- 315.0000px
- 315.5469px
- 316.0938px
- 316.6406px
- 317.1875px
- 317.7344px
- 318.2812px
- 318.8281px
- 319.3750px
- 319.9219px
- 320.4688px
- 321.0156px
- 321.5625px
- 322.1094px
- 322.6562px
- 323.2031px
- 323.7500px
- 324.2969px
- 324.8438px
- 325.3906px
- 325.9375px
- 326.4844px
- 327.0312px
- 327.5781px
- 328.1250px
- 328.6719px
- 329.2188px
- 329.7656px
- 330.3125px
- 330.8594px
- 331.4062px
- 331.9531px
- 332.5000px
- 333.0469px
- 333.5938px
- 334.1406px
- 334.6875px
- 335.2344px
- 335.7812px
- 336.3281px
- 336.8750px
- 337.4219px
- 337.9688px
- 338.5156px
- 339.0625px
- 339.6094px
- 340.1562px
- 340.7031px
- 341.2500px
- 341.7969px
- 342.3438px
- 342.8906px
- 343.4375px
- 343.9844px
- 344.5312px
- 345.0781px
- 345.6250px
- 346.1719px
- 346.7188px
- 347.2656px
- 347.8125px
- 348.3594px
- 348.9062px
- 349.4531px
- 350.0000px
- 350.5469px
- 351.0938px
- 351.6406px
- 352.1875px
- 352.7344px
- 353.2812px
- 353.8281px
- 354.3750px
- 354.9219px
- 355.4688px
- 356.0156px
- 356.5625px
- 357.1094px
- 357.6562px
- 358.2031px
- 358.7500px
- 359.2969px
- 359.8438px
- 360.3906px
- 360.9375px
- 361.4844px
- 362.0312px
- 362.5781px
- 363.1250px
- 363.6719px
- 364.2188px
- 364.7656px
- 365.3125px
- 365.8594px
- 366.4062px
- 366.9531px
- 367.5000px
- 368.0469px
- 368.5938px
- 369.1406px
- 369.6875px
- 370.2344px
- 370.7812px
- 371.3281px
- 371.8750px
- 372.4219px
- 372.9688px
- 373.5156px
- 374.0625px
- 374.6094px
- 375.1562px
- 375.7031px
- 376.2500px
- 376.7969px
- 377.3438px
- 377.8906px
- 378.4375px
- 378.9844px
- 379.5312px
- 380.0781px
- 380.6250px
- 381.1719px
- 381.7188px
- 382.2656px
- 382.8125px
- 383.3594px
- 383.9062px
- 384.4531px
- 385.0000px
- 385.5469px
- 386.0938px
- 386.6406px
- 387.1875px
- 387.7344px
- 388.2812px
- 388.8281px
- 389.3750px
- 389.9219px
- 390.4688px
- 391.0156px
- 391.5625px
- 392.1094px
- 392.6562px
- 393.2031px
- 393.7500px
- 394.2969px
- 394.8438px
- 395.3906px
- 395.9375px
- 396.4844px
- 397.0312px
- 397.5781px
- 398.1250px
- 398.6719px
- 399.2188px
- 399.7656px
- 400.3125px
- 400.8594px
- 401.4062px
- 401.9531px
- 402.5000px
- 403.0469px
- 403.5938px
- 404.1406px
- 404.6875px
- 405.2344px
- 405.7812px
- 406.3281px
- 406.8750px
- 407.4219px
- 407.9688px
- 408.5156px
- 409.0625px
- 409.6094px
- 410.1562px
- 410.7031px
- 411.2500px
- 411.7969px
- 412.3438px
- 412.8906px
- 413.4375px
- 413.9844px
- 414.5312px
- 415.0781px
- 415.6250px
- 416.1719px
- 416.7188px
- 417.2656px
- 417.8125px
- 418.3594px
- 418.9062px
- 419.4531px
- 420.0000px
- 420.5469px
- 421.0938px
- 421.6406px
- 422.1875px
- 422.7344px
- 423.2812px
- 423.8281px
- 424.3750px
- 424.9219px
- 425.4688px
- 426.0156px
- 426.5625px
- 427.1094px
- 427.6562px
- 428.2031px
- 428.7500px
- 429.2969px
- 429.8438px
- 430.3906px
- 430.9375px
- 431.4844px
- 432.0312px
- 432.5781px
- 433.1250px
- 433.6719px
- 434.2188px
- 434.7656px
- 435.3125px
- 435.8594px
- 436.4062px
- 436.9531px
- 437.5000px
- 438.0469px
- 438.5938px
- 439.1406px
- 439.6875px
- 440.2344px
- 440.7812px
- 441.3281px
- 441.8750px
- 442.4219px
- 442.9688px
- 443.5156px
- 444.0625px
- 444.6094px
- 445.1562px
- 445.7031px
- 446.2500px
- 446.7969px
- 447.3438px
- 447.8906px
- 448.4375px
- 448.9844px
- 449.5312px
- 450.0781px
- 450.6250px
- 451.1719px
- 451.7188px
- 452.2656px
- 452.8125px
- 453.3594px
- 453.9062px
- 454.4531px
- 455.0000px
- 455.5469px
- 456.0938px
- 456.6406px
- 457.1875px
- 457.7344px
- 458.2812px
- 458.8281px
- 459.3750px
- 459.9219px
- 460.4688px
- 461.0156px
- 461.5625px
- 462.1094px
- 462.6562px
- 463.2031px
- 463.7500px
- 464.2969px
- 464.8438px
- 465.3906px
- 465.9375px
- 466.4844px
- 467.0312px
- 467.5781px
- 468.1250px
- 468.6719px
- 469.2188px
- 469.7656px
- 470.3125px
- 470.8594px
- 471.4062px
- 471.9531px
- 472.5000px
- 473.0469px
- 473.5938px
- 474.1406px
- 474.6875px
- 475.2344px
- 475.7812px
- 476.3281px
- 476.8750px
- 477.4219px
- 477.9688px
- 478.5156px
- 479.0625px
- 479.6094px
- 480.1562px
- 480.7031px
- 481.2500px
- 481.7969px
- 482.3438px
- 482.8906px
- 483.4375px
- 483.9844px
- 484.5312px
- 485.0781px
- 485.6250px
- 486.1719px
- 486.7188px
- 487.2656px
- 487.8125px
- 488.3594px
- 488.9062px
- 489.4531px
- 490.0000px
- 490.5469px
- 491.0938px
- 491.6406px
- 492.1875px
- 492.7344px
- 493.2812px
- 493.8281px
- 494.3750px
- 494.9219px
- 495.4688px
- 496.0156px
- 496.5625px
- 497.1094px
- 497.6562px
- 498.2031px
- 498.7500px
- 499.2969px
- 499.8438px
- 500.3906px
- 500.9375px
- 501.4844px
- 502.0312px
- 502.5781px
- 503.1250px
- 503.6719px
- 504.2188px
- 504.7656px
- 505.3125px
- 505.8594px
- 506.4062px
- 506.9531px
- 507.5000px
- 508.0469px
- 508.5938px
- 509.1406px
- 509.6875px
- 510.2344px
- 510.7812px
- 511.3281px
- 511.8750px
- 512.4219px
- 512.9688px
- 513.5156px
- 514.0625px
- 514.6094px
- 515.1562px
- 515.7031px
- 516.2500px
- 516.7969px
- 517.3438px
- 517.8906px
- 518.4375px
- 518.9844px
- 519.5312px
- 520.0781px
- 520.6250px
- 521.1719px
- 521.7188px
- 522.2656px
- 522.8125px
- 523.3594px
- 523.9062px
- 524.4531px
- 525.0000px
- 525.5469px
- 526.0938px
- 526.6406px
- 527.1875px
- 527.7344px
- 528.2812px
- 528.8281px
- 529.3750px
- 529.9219px
- 530.4688px
- 531.0156px
- 531.5625px
- 532.1094px
- 532.6562px
- 533.2031px
- 533.7500px
- 534.2969px
- 534.8438px
- 535.3906px
- 535.9375px
- 536.4844px
- 537.0312px
- 537.5781px
- 538.1250px
- 538.6719px
- 539.2188px
- 539.7656px
- 540.3125px
- 540.8594px
- 541.4062px
- 541.9531px
- 542.5000px
- 543.0469px
- 543.5938px
- 544.1406px
- 544.6875px
- 545.2344px
- 545.7812px
- 546.3281px
- 710.9375px
- 3.2812px
- 3.8281px
- 4.3750px
- 4.9219px
- 5.4688px
- 6.0156px
- 6.5625px
- 7.1094px
- 7.6562px
- 8.2031px
- 8.7500px
- 9.2969px
- 9.8438px
- 10.3906px
- 10.9375px
- 11.4844px
- 12.0312px
- 12.5781px
- 13.1250px
- 13.6719px
- 15.3125px
- 16.4062px
- 17.5000px
- 18.5938px
- 19.6875px
- 20.7812px
- 21.8750px
- 22.9688px
- 26.2500px
-
diff --git a/modules/mogo-module-chat/src/main/res/values/strings.xml b/modules/mogo-module-chat/src/main/res/values/strings.xml
deleted file mode 100644
index d9e1e0911f..0000000000
--- a/modules/mogo-module-chat/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- CarChatting
-
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java
index e0c03b81f9..d284e8b6d0 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java
+++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java
@@ -154,25 +154,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
// msg.sendToTarget();
}
});
- MogoApisHandler.getInstance()
- .getApis()
- .getSocketManagerApi(context)
- .registerLifecycleListener(10020, new IMogoLifecycleListener() {
- @Override
- public void onConnectFailure() {
- DebugConfig.setStatus(DebugConfig.sDownloadLink, false);
- }
-
- @Override
- public void onConnectSuccess() {
- DebugConfig.setStatus(DebugConfig.sDownloadLink, true);
- }
-
- @Override
- public void onConnectLost() {
- DebugConfig.setStatus(DebugConfig.sDownloadLink, false);
- }
- });
}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/status/EnvStatusManager.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/status/EnvStatusManager.java
index e8fe9790ef..e99fcfa998 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/status/EnvStatusManager.java
+++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/status/EnvStatusManager.java
@@ -93,7 +93,7 @@ public class EnvStatusManager {
if (i == 3) {
stringBuilder.append(DebugConfig.getAutoPilotStatus()).append("\n");
} else if (i == 4) {
- stringBuilder.append("true".equals(DebugConfig.getStatus(i, false)) ? "正常" : "异常").append("\n");
+ stringBuilder.append(DebugConfig.isDownloadSnapshot() ? "正常" : "异常").append("\n");
} else if (i == 5 || i == 6) {
stringBuilder.append(DebugConfig.getStatusData(i)).append("\n");
} else if (i == 7) {