+
\ No newline at end of file
diff --git a/foudations/mogo-base-services-sdk/build.gradle b/foudations/mogo-base-services-sdk/build.gradle
index c8ab6808a3..f05f24a732 100644
--- a/foudations/mogo-base-services-sdk/build.gradle
+++ b/foudations/mogo-base-services-sdk/build.gradle
@@ -30,7 +30,7 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation rootProject.ext.dependencies.arouter
// 上报位置
- implementation 'com.zhidao.locupload:loc-upload-sdk:1.0.6'
+ implementation 'com.zhidao.locupload:loc-upload-sdk:1.0.8'
// 长链
implementation 'com.zhidao.socket:built-in-socket:1.0.12'
// passport
diff --git a/foudations/mogo-connection/.gitignore b/foudations/mogo-connection/.gitignore
deleted file mode 100644
index 796b96d1c4..0000000000
--- a/foudations/mogo-connection/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
diff --git a/foudations/mogo-connection/build.gradle b/foudations/mogo-connection/build.gradle
deleted file mode 100644
index db342def5f..0000000000
--- a/foudations/mogo-connection/build.gradle
+++ /dev/null
@@ -1,49 +0,0 @@
-apply plugin: 'com.android.library'
-apply plugin: 'com.alibaba.arouter'
-
-android {
- compileSdkVersion rootProject.ext.android.compileSdkVersion
- // buildToolsVersion rootProject.ext.android.buildToolsVersion
- defaultConfig {
- minSdkVersion rootProject.ext.android.minSdkVersion
- targetSdkVersion rootProject.ext.android.targetSdkVersion
- versionCode Integer.valueOf(VERSION_CODE)
- versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- consumerProguardFiles 'consumer-rules.pro'
-
- javaCompileOptions {
- annotationProcessorOptions {
- arguments = [AROUTER_MODULE_NAME: project.getName()]
- }
- }
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
-
- api rootProject.ext.dependencies.socketsdk
- api rootProject.ext.dependencies.socketsdkconnsvrprotoco
- api rootProject.ext.dependencies.socketsdkprotobufjava
- implementation rootProject.ext.dependencies.arouter
- annotationProcessor rootProject.ext.dependencies.aroutercompiler
-
- if (Boolean.valueOf(RELEASE)) {
- implementation rootProject.ext.dependencies.mogoutils
- implementation rootProject.ext.dependencies.mogoserviceapi
- } else {
- implementation project(":foudations:mogo-utils")
- implementation project(":services:mogo-service-api")
- }
-}
-
-apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
diff --git a/foudations/mogo-connection/consumer-rules.pro b/foudations/mogo-connection/consumer-rules.pro
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/foudations/mogo-connection/gradle.properties b/foudations/mogo-connection/gradle.properties
deleted file mode 100644
index 3bf188938f..0000000000
--- a/foudations/mogo-connection/gradle.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-GROUP=com.mogo.connection
-POM_ARTIFACT_ID=mogo-connection
-VERSION_CODE=1
diff --git a/foudations/mogo-connection/proguard-rules.pro b/foudations/mogo-connection/proguard-rules.pro
deleted file mode 100644
index f1b424510d..0000000000
--- a/foudations/mogo-connection/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/foudations/mogo-connection/src/main/AndroidManifest.xml b/foudations/mogo-connection/src/main/AndroidManifest.xml
deleted file mode 100644
index 639efc7d99..0000000000
--- a/foudations/mogo-connection/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
diff --git a/foudations/mogo-connection/src/main/java/com/mogo/connection/socket/SocketManager.java b/foudations/mogo-connection/src/main/java/com/mogo/connection/socket/SocketManager.java
deleted file mode 100644
index 2faf7b6bed..0000000000
--- a/foudations/mogo-connection/src/main/java/com/mogo/connection/socket/SocketManager.java
+++ /dev/null
@@ -1,223 +0,0 @@
-package com.mogo.connection.socket;
-
-import android.content.Context;
-
-import com.google.protobuf.ByteString;
-import com.google.protobuf.InvalidProtocolBufferException;
-import com.mogo.map.listener.IMogoMapListener;
-import com.mogo.service.connection.IMessageResponse;
-import com.mogo.service.connection.IMogoMsgAckListener;
-import com.mogo.service.connection.IMogoOnMessageListener;
-import com.mogo.service.connection.IMogoSocketManager;
-import com.mogo.service.connection.MsgBody;
-import com.mogo.utils.logger.Logger;
-import com.mogo.utils.network.utils.GsonUtil;
-import com.zhidao.ptech.connsvr.commom.protocol.MogoCommon;
-import com.zhidao.ptech.connsvr.protocol.MogoConnsvr;
-import com.zhidao.socketsdk.manager.OnSocketAckCallback;
-import com.zhidao.socketsdk.manager.OnSocketReceiveCallback;
-import com.zhidao.socketsdk.manager.SocketConnManager;
-import com.zhidao.socketsdk.manager.SocketConnManagerImpl;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * @author congtaowang
- * @since 2019-12-31
- *
- * 长链实现:基于 netty
- */
-
-public class SocketManager implements IMogoSocketManager, OnSocketReceiveCallback, OnSocketAckCallback {
-
- private static final String TAG = "SocketManager";
-
- public static final int MSG_PRODUCT_LINE = MogoCommon.Product.mogoBussiness_VALUE;
- private static final int MSG_HEADER_TYPE = MogoConnsvr.MsgType.mogoMsgTypeDispatchSvrNoRspReq_VALUE;
-
- private static volatile SocketManager sInstance;
-
- private SocketManager( Context context ) {
- mSocketConnManager = SocketConnManagerImpl.getInstance( context );
- mSocketConnManager.addSocketMessageCallback( this );
- mSocketConnManager.addSocketAckCallback( this );
- }
-
- public static SocketManager getInstance( Context context ) {
- if ( sInstance == null ) {
- synchronized ( SocketManager.class ) {
- if ( sInstance == null ) {
- sInstance = new SocketManager( context );
- }
- }
- }
- return sInstance;
- }
-
- /**
- * 管理消息分发
- *
- * key - msgType
- */
- private Map< Integer, List< IMogoOnMessageListener > > mListeners = new ConcurrentHashMap<>();
-
- /**
- * 管理消息回执
- *
- * key - msgId
- */
- private Map< Long, IMogoMsgAckListener > mAckListeners = new ConcurrentHashMap<>();
-
-
- private SocketConnManager mSocketConnManager;
- public static final int MAX_CAP = 64; //保证充足的容量应对非常延时的推送
- private ArrayList< Long > mReceivedMsgId = new ArrayList<>( MAX_CAP );
- private int mCurrentIndex = 0;
-
- @Override
- public void init( Context context, String appId ) {
- if ( mSocketConnManager != null ) {
- mSocketConnManager.init( appId );
- }
- }
-
- @Override
- public void onMessageReceived( byte[] content, long msgId ) {
- try {
- MogoConnsvr.Payload payload = MogoConnsvr.Payload.parseFrom( content );
- int msgType = payload.getMsgType();
- Logger.d( TAG, "received msg type = %d", msgType );
- List< IMogoOnMessageListener > listeners = mListeners.get( msgType );
- if ( listeners != null && !listeners.isEmpty() ) {
- Iterator< IMogoOnMessageListener > iterator = listeners.iterator();
- if ( msgId != 0 ) { //兼容老版本
- if ( mReceivedMsgId.contains( msgId ) ) { // 避免消息重发
- return;
- }
- cacheLastReceivedMsgId( msgId );
- }
- Object object = null;
- while ( iterator.hasNext() ) {
- IMogoOnMessageListener listener = iterator.next();
- if ( object == null ) {
- object = GsonUtil.objectFromJson( payload.getPayload().toStringUtf8(), listener.target() );
- }
- if ( listener != null ) {
- Logger.d( TAG, "received msgId = %s, content = %s", msgId, payload.getPayload().toStringUtf8() );
- listener.onMsgReceived( object );
- }
- }
- }
- } catch ( InvalidProtocolBufferException e ) {
- Logger.e( TAG, e, "parse msg error." );
- }
- }
-
- private void cacheLastReceivedMsgId( long msgId ) {
- if ( msgId == 0 ) {
- return;
- }
- synchronized ( this ){
- mReceivedMsgId.add( mCurrentIndex % MAX_CAP, msgId );
- mCurrentIndex++;
- }
- }
-
- @Override
- public void onAck( byte[] headerBytes, byte[] payloadBytes ) {
- try {
- MogoConnsvr.Header header = MogoConnsvr.Header.parseFrom( headerBytes );
- int msgType = header.getMsgType();
- String appId = header.getAppId();
- int productLine = header.getProductLine();
- long msgId = header.getMsgId();
- IMogoMsgAckListener listener = mAckListeners.remove( msgId );
- if ( listener != null ) {
- listener.onAck( msgId );
- }
- Logger.d( TAG, "send message success: msgType = %d, appId = %s, productLine = %d", msgType, appId, productLine );
- } catch ( InvalidProtocolBufferException e ) {
- e.printStackTrace();
- }
- }
-
- @Override
- public void registerOnMessageListener( int msgType, IMogoOnMessageListener listener ) {
- if ( mListeners.containsKey( msgType ) ) {
- Logger.w( TAG, "msgType %d is exist.", msgType );
- }
- if ( !mListeners.containsKey( msgType ) ) {
- mListeners.put( msgType, new ArrayList< IMogoOnMessageListener >() );
- }
- mListeners.get( msgType ).add( listener );
- }
-
- @Override
- public void unregisterOnMessageListener( int msgType ) {
- mListeners.remove( msgType );
- }
-
- @Override
- public void unregisterOnMessageListener( int msgType, IMogoOnMessageListener listener ) {
- if ( listener == null ) {
- return;
- }
- if ( !mListeners.containsKey( msgType ) ) {
- return;
- }
- List< IMogoOnMessageListener > listeners = mListeners.get( msgType );
- if ( listeners != null && listeners.contains( listener ) ) {
- listeners.remove( listener );
- }
- }
-
- @Override
- public void sendMsg( MsgBody body, IMogoMsgAckListener listener ) {
- Logger.d( TAG, "sendMsg." );
- if ( mSocketConnManager != null ) {
- if ( mSocketConnManager.isConnected() ) {
- Logger.d( TAG, "isConnected." );
- final byte[] pb = convertToPBBytes( body.getMsgType(), objectToBytes( body.getContent() ) );
- mSocketConnManager.sendPayload(
- MSG_PRODUCT_LINE,
- pb,
- MSG_HEADER_TYPE,
- body.isAck(),
- body.getMsgId()
- );
- mAckListeners.put( body.getMsgId(), listener );
- } else {
- Logger.e( TAG, "sendMsg error, connect is lost." );
- }
- } else {
- Logger.e( TAG, "sendMsg error, client is null." );
- }
- }
-
- public byte[] objectToBytes( Object obj ) {
- String jsonStr = GsonUtil.jsonFromObject( obj );
- return jsonStr.getBytes();
- }
-
- private byte[] convertToPBBytes( int msgType, byte[] payloadBytes ) {
- MogoConnsvr.Payload payloadData = MogoConnsvr.Payload.newBuilder()
- .setMsgType( msgType )
- .setPayload( ByteString.copyFrom( payloadBytes ) ).build();
- return payloadData.toByteArray();
- }
-
- public synchronized void release() {
- mListeners.clear();
- mListeners = null;
- sInstance = null;
- }
-
-
- @Override
- public void init( Context context ) {
- }
-}
diff --git a/foudations/mogo-connection/src/main/res/values/strings.xml b/foudations/mogo-connection/src/main/res/values/strings.xml
deleted file mode 100644
index b965c02986..0000000000
--- a/foudations/mogo-connection/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- mogo-connection
-
diff --git a/gradle.properties b/gradle.properties
index d46ad32e32..43e8fa55ee 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -61,7 +61,7 @@ MOGO_MODULE_MAIN_INDEPENDENT_VERSION = 1.2.1.17
# 探路
MOGO_MODULE_TANLU_VERSION=1.3.0.4-byd
# 车聊聊
-CARCHATTING_VERSION=1.4.1
+CARCHATTING_VERSION=1.4.4
# 车聊聊接口
CARCHATTINGPROVIDER_VERSION=1.3.4
# 视频引导
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/UserDataMarkerInfoWindowAdapter.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/UserDataMarkerInfoWindowAdapter.java
index 31116f19a2..b038ac044e 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/UserDataMarkerInfoWindowAdapter.java
+++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/UserDataMarkerInfoWindowAdapter.java
@@ -54,6 +54,7 @@ public class UserDataMarkerInfoWindowAdapter implements IMogoInfoWindowAdapter {
private View mInfoWindowView = null;
+ private View mContentContainer;
private MogoImageView mUserHeader;
private TextView mContent;
private TextView mTag;
@@ -92,12 +93,21 @@ public class UserDataMarkerInfoWindowAdapter implements IMogoInfoWindowAdapter {
if ( mInfoWindowView == null ) {
mInfoWindowView = LayoutInflater.from( mContext ).inflate( R.layout.view_map_data_user_info_window, null );
+ mContentContainer = mInfoWindowView.findViewById( R.id.module_service_id_marker_content );
mUserHeader = mInfoWindowView.findViewById( R.id.module_service_id_user_header );
mContent = mInfoWindowView.findViewById( R.id.module_service_id_content );
mTag = mInfoWindowView.findViewById( R.id.module_service_id_tag );
mCall = mInfoWindowView.findViewById( R.id.module_service_id_call );
+ }
- mCall.setVisibility( DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_BYD ? View.GONE : View.VISIBLE );
+ if ( DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_BYD ) {
+ mContentContainer.setPadding(
+ mContentContainer.getPaddingLeft(),
+ mContentContainer.getPaddingTop(),
+ mContentContainer.getResources().getDimensionPixelSize( R.dimen.module_service_id_marker_content_paddingRight_widthoutCall ),
+ mContentContainer.getPaddingBottom()
+ );
+ mCall.setVisibility( View.GONE );
}
try {
diff --git a/modules/mogo-module-service/src/main/res/layout/view_map_data_user_info_window.xml b/modules/mogo-module-service/src/main/res/layout/view_map_data_user_info_window.xml
index 0967298a46..fe110eba36 100644
--- a/modules/mogo-module-service/src/main/res/layout/view_map_data_user_info_window.xml
+++ b/modules/mogo-module-service/src/main/res/layout/view_map_data_user_info_window.xml
@@ -13,6 +13,7 @@
android:id="@+id/module_service_id_marker_content"
android:layout_width="wrap_content"
android:layout_height="@dimen/module_services_info_window_height"
+ android:paddingRight="@dimen/module_service_id_marker_content_paddingRight"
android:background="@drawable/module_services_driver_blue_info"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -44,7 +45,7 @@
app:layout_constraintStart_toEndOf="@+id/module_service_id_user_header"
app:layout_constraintTop_toTopOf="@+id/module_service_id_user_header"
app:layout_goneMarginRight="@dimen/dp_30"
- tools:text="诗" />
+ tools:text="诗一样的远方的远方" />
24px
20px
120px
+ 20px
\ No newline at end of file
diff --git a/modules/mogo-module-service/src/main/res/values/dimens.xml b/modules/mogo-module-service/src/main/res/values/dimens.xml
index 6faf47f1e0..c527ce9b25 100644
--- a/modules/mogo-module-service/src/main/res/values/dimens.xml
+++ b/modules/mogo-module-service/src/main/res/values/dimens.xml
@@ -20,4 +20,6 @@
14px
12px
64px
+ 6.5px
+ 10px
\ No newline at end of file