Merge remote-tracking branch 'origin/dev' into dev
2
.idea/misc.xml
generated
@@ -4,7 +4,7 @@
|
||||
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
|
||||
<groovy codeStyle="LEGACY" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -40,6 +40,7 @@ android {
|
||||
buildTypes {
|
||||
debug {
|
||||
debuggable = true
|
||||
minifyEnabled false
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
release {
|
||||
@@ -162,7 +163,7 @@ android {
|
||||
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
|
||||
}
|
||||
// 比亚迪
|
||||
byd{
|
||||
bydauto{
|
||||
dimension "product"
|
||||
// 不使用语音
|
||||
buildConfigField 'int', 'AIType','0'
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
project.dependencies {
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
bydImplementation rootProject.ext.dependencies.mogobaseservicesdk
|
||||
bydautoImplementation rootProject.ext.dependencies.mogobaseservicesdk
|
||||
|
||||
d82xImplementation rootProject.ext.dependencies.mogobaseserviceapk
|
||||
em1Implementation rootProject.ext.dependencies.mogobaseserviceapk
|
||||
@@ -13,7 +13,7 @@ project.dependencies {
|
||||
f8xxImplementation rootProject.ext.dependencies.mogobaseserviceapk
|
||||
em3Implementation rootProject.ext.dependencies.mogobaseserviceapk
|
||||
} else {
|
||||
bydImplementation project(':foudations:mogo-base-services-sdk')
|
||||
bydautoImplementation project(':foudations:mogo-base-services-sdk')
|
||||
|
||||
d82xImplementation project(':foudations:mogo-base-services-apk')
|
||||
em1Implementation project(':foudations:mogo-base-services-apk')
|
||||
|
||||
@@ -4,7 +4,7 @@ project.dependencies {
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
d82xImplementation rootProject.ext.dependencies.moduleventpanelnoop
|
||||
em1Implementation rootProject.ext.dependencies.moduleventpanelnoop
|
||||
bydImplementation rootProject.ext.dependencies.moduleventpanelnoop
|
||||
bydautoImplementation rootProject.ext.dependencies.moduleventpanelnoop
|
||||
|
||||
d8xxImplementation rootProject.ext.dependencies.moduleventpanel
|
||||
em4Implementation rootProject.ext.dependencies.moduleventpanel
|
||||
@@ -14,7 +14,7 @@ project.dependencies {
|
||||
} else {
|
||||
d82xImplementation project(':modules:mogo-module-event-panel-noop')
|
||||
em1Implementation project(':modules:mogo-module-event-panel-noop')
|
||||
bydImplementation project(':modules:mogo-module-event-panel-noop')
|
||||
bydautoImplementation project(':modules:mogo-module-event-panel-noop')
|
||||
|
||||
d8xxImplementation project(':modules:mogo-module-event-panel')
|
||||
em4Implementation project(':modules:mogo-module-event-panel')
|
||||
|
||||
@@ -4,7 +4,7 @@ project.dependencies {
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
d82xImplementation rootProject.ext.dependencies.moduleleftpanel
|
||||
em1Implementation rootProject.ext.dependencies.moduleleftpanel
|
||||
bydImplementation rootProject.ext.dependencies.moduleleftpanel
|
||||
bydautoImplementation rootProject.ext.dependencies.moduleleftpanel
|
||||
|
||||
d8xxImplementation rootProject.ext.dependencies.moduleleftpanelnoop
|
||||
em4Implementation rootProject.ext.dependencies.moduleleftpanelnoop
|
||||
@@ -15,7 +15,7 @@ project.dependencies {
|
||||
} else {
|
||||
d82xImplementation project(':modules:mogo-module-left-panel')
|
||||
em1Implementation project(':modules:mogo-module-left-panel')
|
||||
bydImplementation project(':modules:mogo-module-left-panel')
|
||||
bydautoImplementation project(':modules:mogo-module-left-panel')
|
||||
|
||||
d8xxImplementation project(':modules:mogo-module-left-panel-noop')
|
||||
em4Implementation project(':modules:mogo-module-left-panel-noop')
|
||||
|
||||
87
app/proguard-rules.pro
vendored
@@ -180,23 +180,32 @@
|
||||
#----------------------------------------第三方库----------------------------------------------
|
||||
#-----高德地图-----
|
||||
#3D 地图 V5.0.0之后:
|
||||
-keep class com.amap.api.maps.*{*;}
|
||||
-keep class com.autonavi.*{*;}
|
||||
-keep class com.amap.api.trace.*{*;}
|
||||
-keep class com.amap.api.maps.**{*;}
|
||||
-keep class com.autonavi.**{*;}
|
||||
-keep class com.amap.api.trace.**{*;}
|
||||
#定位
|
||||
-keep class com.amap.api.location.*{*;}
|
||||
-keep class com.amap.api.fence.*{*;}
|
||||
-keep class com.autonavi.aps.amapapi.model.*{*;}
|
||||
-keep class com.amap.api.location.**{*;}
|
||||
-keep class com.amap.api.fence.**{*;}
|
||||
-keep class com.loc.**{*;}
|
||||
-keep class com.autonavi.aps.amapapi.model.**{*;}
|
||||
#搜索
|
||||
-keep class com.amap.api.services.*{*;}
|
||||
-keep class com.amap.api.services.**{*;}
|
||||
#导航
|
||||
-keep class com.amap.api.navi.*{*;}
|
||||
-keep class com.autonavi.*{*;}
|
||||
-keep class com.amap.api.navi.**{*;}
|
||||
|
||||
#内置语音 V5.6.0之后
|
||||
-keep class com.alibaba.idst.nls.**{*;}
|
||||
-keep class com.google.**{*;}
|
||||
-keep class com.nlspeech.nlscodec.** {*;}
|
||||
-keep class com.alibaba.mit.alitts.** {*;}
|
||||
|
||||
-dontwarn android.telephony.**
|
||||
-keep class android.telephony.TelephonyManager$CellInfoCallback
|
||||
|
||||
#-----Gson-----
|
||||
-dontwarn sun.misc.**
|
||||
# Application classes that will be serialized/deserialized over Gson
|
||||
-keep class com.google.gson.examples.android.model.* { <fields>; }
|
||||
-keep class com.google.gson.examples.android.model.** { <fields>; }
|
||||
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
|
||||
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
|
||||
-keep class * extends com.google.gson.TypeAdapter
|
||||
@@ -209,8 +218,8 @@
|
||||
}
|
||||
|
||||
#-----ARouter-----
|
||||
-keep public class com.alibaba.android.arouter.routes.*{*;}
|
||||
-keep public class com.alibaba.android.arouter.facade.*{*;}
|
||||
-keep public class com.alibaba.android.arouter.routes.**{*;}
|
||||
-keep public class com.alibaba.android.arouter.facade.**{*;}
|
||||
-keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;}
|
||||
# If you use the byType method to obtain Service, add the following rules to protect the interface:
|
||||
-keep interface * implements com.alibaba.android.arouter.facade.template.IProvider
|
||||
@@ -219,23 +228,39 @@
|
||||
|
||||
#-----Glide-----
|
||||
-keep public class * implements com.bumptech.glide.module.GlideModule
|
||||
-keep public class * extends com.bumptech.glide.module.AppGlideModule
|
||||
-keep public class * extends com.bumptech.glide.module.AppGlideModule {
|
||||
<init>(...);
|
||||
}
|
||||
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
|
||||
**[] $VALUES;
|
||||
public *;
|
||||
}
|
||||
-keep class com.bumptech.glide.load.data.ParcelFileDescriptorRewinder$InternalRewinder {
|
||||
*** rewind();
|
||||
}
|
||||
|
||||
#如果你的 target API 低于 Android API 27,请添加:
|
||||
-dontwarn com.bumptech.glide.load.resource.bitmap.VideoDecoder
|
||||
|
||||
#-----Fresco-----
|
||||
-keep,allowobfuscation interface com.facebook.common.internal.DoNotStrip
|
||||
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
|
||||
-keep,allowobfuscation @interface com.facebook.soloader.DoNotOptimize
|
||||
-keep @com.facebook.common.internal.DoNotStrip class *
|
||||
-keepclassmembers class * {
|
||||
@com.facebook.common.internal.DoNotStrip *;
|
||||
}
|
||||
-keep @com.facebook.soloader.DoNotOptimize class *
|
||||
-keepclassmembers class * {
|
||||
@com.facebook.soloader.DoNotOptimize *;
|
||||
}
|
||||
-keepclassmembers class * {
|
||||
native <methods>;
|
||||
}
|
||||
|
||||
-keep public class com.facebook.soloader.SoLoader {
|
||||
public static void init(android.content.Context, int);
|
||||
}
|
||||
|
||||
-dontwarn okio.**
|
||||
-dontwarn com.squareup.okhttp.**
|
||||
-dontwarn okhttp3.**
|
||||
@@ -248,8 +273,6 @@
|
||||
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
||||
-dontwarn com.squareup.**
|
||||
-dontwarn okio.**
|
||||
-keep public class org.codehaus.* { *; }
|
||||
-keep public class java.nio.* { *; }
|
||||
|
||||
#-----OkHttp-----
|
||||
# JSR 305 annotations are for embedding nullability information.
|
||||
@@ -275,20 +298,25 @@
|
||||
# Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.
|
||||
-dontwarn kotlin.Unit
|
||||
# Top-level functions that can only be used by Kotlin.
|
||||
-dontwarn retrofit2.KotlinExtensions.*
|
||||
-dontwarn retrofit2.KotlinExtensions
|
||||
-dontwarn retrofit2.KotlinExtensions$*
|
||||
# With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy
|
||||
# and replaces all potential values with null. Explicitly keeping the interfaces prevents this.
|
||||
-if interface * { @retrofit2.http.* <methods>; }
|
||||
-keep,allowobfuscation interface <1>
|
||||
|
||||
#-----ProtoBuf-----
|
||||
-keep class com.google.protobuf.*{*;}
|
||||
-keep class com.google.protobuf.** {*;}
|
||||
|
||||
#-----GSYVideoPlayer-----
|
||||
-keep class tv.danmaku.ijk.* { *; }
|
||||
-keep class com.shuyu.gsyvideoplayer.video.** { *; }
|
||||
-dontwarn com.shuyu.gsyvideoplayer.video.**
|
||||
-keep class com.shuyu.gsyvideoplayer.video.base.** { *; }
|
||||
-dontwarn com.shuyu.gsyvideoplayer.video.base.**
|
||||
-keep class com.shuyu.gsyvideoplayer.utils.** { *; }
|
||||
-dontwarn com.shuyu.gsyvideoplayer.utils.**
|
||||
-keep class tv.danmaku.ijk.** { *; }
|
||||
-dontwarn tv.danmaku.ijk.**
|
||||
-keep class com.shuyu.gsyvideoplayer.* { *; }
|
||||
-dontwarn com.shuyu.gsyvideoplayer.**
|
||||
|
||||
#-----EventBus-----
|
||||
-keepattributes *Annotation*
|
||||
@@ -302,13 +330,16 @@
|
||||
}
|
||||
|
||||
#-----ZhiDaoService-----
|
||||
-keep class com.zhidao.auto.platform.*{*;}
|
||||
-keep class com.zhidaohulian.*{*;}
|
||||
-keep class com.zhidao.boot.*{*;}
|
||||
-keep class com.elegant.*{*;}
|
||||
-keep class com.zhidao.socketsdk.*{*;}
|
||||
-keep class com.zhidao.ptech.*{*;}
|
||||
-keep class com.zhidao.autopilot.support.*{*;}
|
||||
-keep class com.zhidao.auto.platform.**{*;}
|
||||
-keep class com.zhidaohulian.**{*;}
|
||||
-keep class com.zhidao.boot.**{*;}
|
||||
-keep class com.elegant.**{*;}
|
||||
-keep class com.zhidao.socketsdk.**{*;}
|
||||
-keep class com.zhidao.ptech.**{*;}
|
||||
-keep class com.zhidao.autopilotcore.**{*;}
|
||||
-keep class com.zhidao.autopilot.support.**{*;}
|
||||
-keep class com.zhidao.voice.library.**{*;}
|
||||
-keep class com.zhidao.voicesdk.**{*;}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.launcher;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
@@ -9,6 +10,7 @@ import com.auto.zhidao.logsdk.CrashSystem;
|
||||
import com.bytedance.boost_multidex.BoostMultiDex;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.storage.SpStorage;
|
||||
import com.mogo.module.authorize.authprovider.invoke.AuthorizeConstant;
|
||||
import com.mogo.module.carchatting.card.CallChatConstant;
|
||||
import com.mogo.module.common.MogoModule;
|
||||
@@ -89,6 +91,7 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
DebugConfig.setLauncher( BuildConfig.IS_LAUNCHER );
|
||||
DebugConfig.setActiveAIAssistFlag( BuildConfig.AI_ASSIST_ACTIVE_STAUTS );
|
||||
DebugConfig.setCarMachineType( BuildConfig.CAR_MACHINE_TYPE );
|
||||
DebugConfig.setProductFlavor( BuildConfig.FLAVOR_product );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -101,6 +104,7 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
@Override
|
||||
public void onSuccess( String ticket ) {
|
||||
Logger.d( TAG, "ticket = %s", ticket );
|
||||
SpStorage.setTicket( ticket );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -120,7 +120,7 @@ targetSdkVersion : 22,
|
||||
mogomoduleauth : "com.mogo.module:module-authorize:${MOGO_MODULE_AUTHORIZE_VERSION}",
|
||||
mogomoduleguide : "com.mogo.module:module-guide:${MOGO_MODULE_GUIDE_VERSION}",
|
||||
// 长链
|
||||
socketsdk : 'com.zhidao.socketsdk:socketsdk:2.1.1',
|
||||
socketsdk : 'com.zhidao.socketsdk:socketsdk:2.1.4',
|
||||
socketsdkconnsvrprotoco : 'com.zhidao.ptech:connsvr-protoco:0.1.23',
|
||||
socketsdkprotobufjava : 'com.google.protobuf:protobuf-java:3.5.1',
|
||||
// OBU
|
||||
@@ -169,9 +169,8 @@ targetSdkVersion : 22,
|
||||
moduleleftpanelnoop : "com.mogo.module:module-left-panel-noop:${MOGO_MODULE_LEFT_PANEL_VERSION}",
|
||||
// 闪屏页
|
||||
modulesplash : "com.mogo.module:module-splash:${MOGO_MODULE_SPLASH_VERSION}",
|
||||
|
||||
// 基础服务实现
|
||||
mogobaseservicesdk : "com.mogo.base:services-apk:${MOGO_BASE_SERVICES_SDK_VERSION}",
|
||||
mogobaseserviceapk : "com.mogo.base:services-sdk:${MOGO_BASE_SERVICES_APK_VERSION}",
|
||||
mogobaseservicesdk : "com.mogo.base:services-sdk:${MOGO_BASE_SERVICES_SDK_VERSION}",
|
||||
mogobaseserviceapk : "com.mogo.base:services-apk:${MOGO_BASE_SERVICES_APK_VERSION}",
|
||||
]
|
||||
}
|
||||
@@ -87,6 +87,10 @@ public class SocketManager implements IMogoSocketManager, OnSocketReceiveCallbac
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMessageReceived( byte[] content ) {
|
||||
onMessageReceived( content, 0);
|
||||
}
|
||||
|
||||
public void onMessageReceived( byte[] content, long msgId ) {
|
||||
try {
|
||||
MogoConnsvr.Payload payload = MogoConnsvr.Payload.parseFrom( content );
|
||||
|
||||
@@ -30,11 +30,11 @@ 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.9'
|
||||
// 长链
|
||||
implementation 'com.zhidao.socket:built-in-socket:1.0.12'
|
||||
implementation 'com.zhidao.socket:built-in-socket:1.0.13'
|
||||
// passport
|
||||
implementation 'com.zhidao.tcloginsdk:tclogin:1.0.7'
|
||||
implementation 'com.zhidao.loginsdk:external:1.0.0'
|
||||
|
||||
annotationProcessor 'com.elegant.spi:compiler:1.0.3'
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
#-----MogoBaseServiceSdk-----
|
||||
-keep class com.mogo.base.services.locationinfo.MogoLocationSource.*{*;}
|
||||
@@ -1,3 +1,3 @@
|
||||
GROUP=com.mogo.connection
|
||||
POM_ARTIFACT_ID=mogo-base-services-sdk
|
||||
VERSION_CODE=1
|
||||
GROUP=com.mogo.base
|
||||
POM_ARTIFACT_ID=services-sdk
|
||||
VERSION_CODE=1
|
||||
@@ -18,4 +18,7 @@
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----MogoBaseServiceSdk-----
|
||||
-keep class com.mogo.base.services.locationinfo.MogoLocationSource.*{*;}
|
||||
@@ -11,8 +11,7 @@ import com.mogo.service.passport.IMogoTicketCallback;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.zhidao.accountsdk.manager.CarPadClientManagerImpl;
|
||||
import com.zhidao.accountsdk.manager.TicketInfoCallback;
|
||||
import com.zhidao.accountsdk.network.NetEnvironManager;
|
||||
import com.zhidao.tcloginsdk.ToCLoginManagerImpl;
|
||||
import com.zhidao.tcloginsdk.LoginManagerImpl;
|
||||
|
||||
public
|
||||
/**
|
||||
@@ -95,7 +94,8 @@ class PassportManager implements IMogoPassportManager {
|
||||
// 演示环境用 qa 的
|
||||
mode = DebugConfig.NET_MODE_QA;
|
||||
}
|
||||
ToCLoginManagerImpl.getInstance( context ).setNetEnviron( mode );
|
||||
ToCLoginManagerImpl.getInstance( context ).showLoginView();
|
||||
LoginManagerImpl.getInstance(mContext).setClientType(DebugConfig.getProductFlavor());
|
||||
LoginManagerImpl.getInstance( context ).setNetEnviron( mode );
|
||||
LoginManagerImpl.getInstance( context ).showLoginView();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,6 +87,7 @@ class SocketManager implements IMogoSocketManager, Callback {
|
||||
.setEnvironment( getEnvironment() )
|
||||
.setClient( Platform.getClient( Platform.car ) )
|
||||
.setAppId( appId )
|
||||
.setOpenAnalytics( true )
|
||||
.setDebug( DebugConfig.isDebug() );
|
||||
SocketMessageDispatcher.getInstance().start( context );
|
||||
}
|
||||
|
||||
@@ -22,9 +22,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
zipAlignEnabled true
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
#-----Foundation-Commons-----
|
||||
-keep class com.mogo.commons.data.BaseData.*{*;}
|
||||
-keep class com.mogo.commons.data.BaseData.*{*;}
|
||||
-keep class com.mogo.commons.voice.VoiceIntentTrack
|
||||
-keep class com.mogo.commons.voice.VoiceTrack
|
||||
-keep class com.mogo.commons.voice.VoicePreemptType
|
||||
-keep interface * implements com.mogo.commons.mvp.IView
|
||||
6
foudations/mogo-commons/proguard-rules.pro
vendored
@@ -21,4 +21,8 @@
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----Foundation-Commons-----
|
||||
-keep class com.mogo.commons.data.BaseData.*{*;}
|
||||
-keep class com.mogo.commons.data.BaseData.*{*;}
|
||||
-keep class com.mogo.commons.voice.VoiceIntentTrack
|
||||
-keep class com.mogo.commons.voice.VoiceTrack
|
||||
-keep class com.mogo.commons.voice.VoicePreemptType
|
||||
-keep interface * implements com.mogo.commons.mvp.IView
|
||||
@@ -82,6 +82,7 @@ public class DebugConfig {
|
||||
public static final int CAR_MACHINE_TYPE_BYD = 1;
|
||||
|
||||
private static int sCarMachineType = CAR_MACHINE_TYPE_SELF_INNOVATE;
|
||||
|
||||
/**
|
||||
* 获取网络环境类型
|
||||
*
|
||||
@@ -150,17 +151,19 @@ public class DebugConfig {
|
||||
|
||||
/**
|
||||
* 设置当前车机类型
|
||||
*
|
||||
* @param type {@link #CAR_MACHINE_TYPE_SELF_INNOVATE} {@link #CAR_MACHINE_TYPE_BYD}
|
||||
*/
|
||||
public static void setCarMachineType(int type) {
|
||||
public static void setCarMachineType( int type ) {
|
||||
sCarMachineType = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前车机类型
|
||||
*
|
||||
* @return {@link #CAR_MACHINE_TYPE_SELF_INNOVATE} {@link #CAR_MACHINE_TYPE_BYD}
|
||||
*/
|
||||
public static int getCarMachineType(){
|
||||
public static int getCarMachineType() {
|
||||
return sCarMachineType;
|
||||
}
|
||||
|
||||
@@ -209,4 +212,19 @@ public class DebugConfig {
|
||||
public static boolean isUseMockObuData() {
|
||||
return useMockObuData;
|
||||
}
|
||||
|
||||
private static String sProductFlavor;
|
||||
|
||||
public static String getProductFlavor() {
|
||||
return sProductFlavor;
|
||||
}
|
||||
|
||||
/**
|
||||
* 产品线
|
||||
*
|
||||
* @param sProductFlavor
|
||||
*/
|
||||
public static void setProductFlavor( String sProductFlavor ) {
|
||||
DebugConfig.sProductFlavor = sProductFlavor;
|
||||
}
|
||||
}
|
||||
|
||||
1
foudations/mogo-connection/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
/build
|
||||
@@ -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()
|
||||
@@ -1,3 +0,0 @@
|
||||
GROUP=com.mogo.connection
|
||||
POM_ARTIFACT_ID=mogo-connection
|
||||
VERSION_CODE=1
|
||||
21
foudations/mogo-connection/proguard-rules.pro
vendored
@@ -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
|
||||
@@ -1,2 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.connection" />
|
||||
@@ -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
|
||||
* <p>
|
||||
* 长链实现:基于 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理消息分发
|
||||
* <p>
|
||||
* key - msgType
|
||||
*/
|
||||
private Map< Integer, List< IMogoOnMessageListener > > mListeners = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* 管理消息回执
|
||||
* <p>
|
||||
* 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 ) {
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
<resources>
|
||||
<string name="app_name">mogo-connection</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,5 @@
|
||||
#-----MogoUtils-----
|
||||
-keep class com.mogo.utils.network.CallerType
|
||||
-keep class com.mogo.utils.network.CallerRestrictTo
|
||||
-keep class com.mogo.utils.glide.GlideRoundedCornersTransform.CornerType
|
||||
-keep class com.mogo.utils.logger.LogLevel
|
||||
6
foudations/mogo-utils/proguard-rules.pro
vendored
@@ -19,3 +19,9 @@
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----MogoUtils-----
|
||||
-keep class com.mogo.utils.network.CallerType
|
||||
-keep class com.mogo.utils.network.CallerRestrictTo
|
||||
-keep class com.mogo.utils.glide.GlideRoundedCornersTransform.CornerType
|
||||
-keep class com.mogo.utils.logger.LogLevel
|
||||
@@ -13,7 +13,7 @@ import com.mogo.utils.sqlite.proxy.BaseDaoProxyLog
|
||||
open class BaseDaoFactory {
|
||||
|
||||
//默认数据库名称
|
||||
private var dbName = "AppSQLite.db"
|
||||
private var dbName = "MoGoSQLite.db"
|
||||
|
||||
companion object {
|
||||
//单利工厂
|
||||
|
||||
@@ -29,39 +29,40 @@ PASSWORD=xintai2018
|
||||
RELEASE=false
|
||||
# 模块版本
|
||||
## 工程内模块
|
||||
MOGO_COMMONS_VERSION=1.2.1.17
|
||||
MOGO_UTILS_VERSION=1.2.1.17
|
||||
MAP_AMAP_VERSION=1.2.1.17
|
||||
MAP_AUTONAVI_VERSION=1.2.1.17
|
||||
MOGO_MAP_VERSION=1.2.1.17
|
||||
MOGO_MAP_API_VERSION=1.2.1.17
|
||||
MOGO_SERVICE_VERSION=1.2.1.17
|
||||
MOGO_SERVICE_API_VERSION=1.2.1.17
|
||||
MOGO_CONNECTION_VERSION=1.2.1.17
|
||||
MOGO_MODULE_APPS_VERSION=1.2.1.17
|
||||
MOGO_MODULE_NAVI_VERSION=1.2.1.17
|
||||
MOGO_MODULE_SHARE_VERSION=1.2.1.17
|
||||
MOGO_MODULE_COMMON_VERSION=1.2.1.17
|
||||
MOGO_MODULE_MAIN_VERSION=1.2.1.17
|
||||
MOGO_MODULE_MAP_VERSION=1.2.1.17
|
||||
MOGO_MODULE_SERVICE_VERSION=1.2.1.17
|
||||
MOGO_MODULE_EXTENSIONS_VERSION=1.2.1.17
|
||||
MOGO_MODULE_SEARCH_VERSION=1.2.1.17
|
||||
MOGO_MODULE_BACK_VERSION=1.2.1.17
|
||||
MOGO_MODULE_GPS_SIMULATOR_VERSION=1.2.1.17
|
||||
MOGO_MODULE_GPS_SIMULATOR_DEBUG_VERSION=1.2.1.17
|
||||
MOGO_MODULE_GPS_SIMULATOR_NOOP_VERSION=1.2.1.17
|
||||
MOGO_MODULE_AUTHORIZE_VERSION=1.2.1.17
|
||||
MOGO_MODULE_GUIDE_VERSION=1.2.1.17
|
||||
MOGO_MODULE_MEDIA_VERSION=1.2.1.17
|
||||
MOGO_MODULE_MAIN_LAUNCHER_VERSION = 1.2.1.17
|
||||
MOGO_MODULE_MAIN_INDEPENDENT_VERSION = 1.2.1.17
|
||||
MOGO_COMMONS_VERSION=1.2.1.20
|
||||
MOGO_UTILS_VERSION=1.2.1.20
|
||||
MAP_AMAP_VERSION=1.2.1.20
|
||||
MAP_AUTONAVI_VERSION=1.2.1.20
|
||||
MOGO_MAP_VERSION=1.2.1.20
|
||||
MOGO_MAP_API_VERSION=1.2.1.20
|
||||
MOGO_SERVICE_VERSION=1.2.1.20
|
||||
MOGO_SERVICE_API_VERSION=1.2.1.20
|
||||
MOGO_CONNECTION_VERSION=1.2.1.20
|
||||
MOGO_MODULE_APPS_VERSION=1.2.1.20
|
||||
MOGO_MODULE_NAVI_VERSION=1.2.1.20
|
||||
MOGO_MODULE_SHARE_VERSION=1.2.1.20
|
||||
MOGO_MODULE_COMMON_VERSION=1.2.1.20
|
||||
MOGO_MODULE_MAIN_VERSION=1.2.1.20
|
||||
MOGO_MODULE_MAP_VERSION=1.2.1.20
|
||||
MOGO_MODULE_SERVICE_VERSION=1.2.1.21
|
||||
MOGO_MODULE_EXTENSIONS_VERSION=1.2.1.20
|
||||
MOGO_MODULE_SEARCH_VERSION=1.2.1.20
|
||||
MOGO_MODULE_BACK_VERSION=1.2.1.20
|
||||
MOGO_MODULE_GPS_SIMULATOR_VERSION=1.2.1.20
|
||||
MOGO_MODULE_GPS_SIMULATOR_DEBUG_VERSION=1.2.1.20
|
||||
MOGO_MODULE_GPS_SIMULATOR_NOOP_VERSION=1.2.1.20
|
||||
MOGO_MODULE_AUTHORIZE_VERSION=1.2.1.20
|
||||
MOGO_MODULE_GUIDE_VERSION=1.2.1.20
|
||||
MOGO_MODULE_MEDIA_VERSION=1.2.1.20
|
||||
MOGO_MODULE_MAIN_LAUNCHER_VERSION = 1.2.1.20
|
||||
MOGO_MODULE_MAIN_INDEPENDENT_VERSION = 1.2.1.20
|
||||
MOGO_MODULE_V2X_VERSION=1.2.1.20
|
||||
|
||||
## 工程外部模块
|
||||
# 探路
|
||||
MOGO_MODULE_TANLU_VERSION=1.3.0.10
|
||||
MOGO_MODULE_TANLU_VERSION=1.3.0.19
|
||||
# 车聊聊
|
||||
CARCHATTING_VERSION=1.4.4
|
||||
CARCHATTING_VERSION=1.4.6
|
||||
# 车聊聊接口
|
||||
CARCHATTINGPROVIDER_VERSION=1.3.4
|
||||
# 视频引导
|
||||
@@ -70,8 +71,6 @@ MOGO_MODULE_GUIDESHOW_VERSION=1.0.2-SNAPSHOT
|
||||
MOGO_MODULE_GUIDESHOW_PROVIDER_VERSION=1.0.2-SNAPSHOT
|
||||
# 在线车辆F
|
||||
MOGO_MODULE_ONLINECAR_VERSION=1.0.3.2
|
||||
# v2x
|
||||
MOGO_MODULE_V2X_VERSION=1.3.1
|
||||
# 推送
|
||||
MOGO_MODULE_PUSH_VERSION=1.1.5.7
|
||||
MOGO_MODULE_PUSH_BASE_VERSION=1.1.5.5
|
||||
@@ -79,7 +78,7 @@ MOGO_MODULE_PUSH_NOOP_VERSION=1.1.5.6
|
||||
# 广告资源位
|
||||
MOGO_MODULE_AD_CARD_VERSION=1.0.1
|
||||
# 探路上报和分享模块
|
||||
TANLULIB_VERSION=1.3.0.10
|
||||
TANLULIB_VERSION=1.3.0.19
|
||||
MOGO_MODULE_EVENT_PANEL_VERSION = 1.0.0-SNAPSHOT
|
||||
MOGO_MODULE_EVENT_PANEL_NOOP_VERSION = 1.0.0-SNAPSHOT
|
||||
#左侧面板模块
|
||||
|
||||
@@ -15,9 +15,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
zipAlignEnabled true
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
#-----library-MapAMap-----
|
||||
-keep class com.mogo.map.impl.amap.hook.BnHooker.*{*;}
|
||||
-keep class com.mogo.map.impl.amap.hook.BnHooker.*{*;}
|
||||
-keep class com.mogo.map.impl.amap.marker.CombineMovingPointOverlay.Status
|
||||
-keep class com.mogo.map.impl.amap.navi.PathPlanningErrorCodeConstants
|
||||
-keep class com.mogo.map.impl.amap.utils.MapStyleUtils.ColorEnum
|
||||
5
libraries/map-amap/proguard-rules.pro
vendored
@@ -21,4 +21,7 @@
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----library-MapAMap-----
|
||||
-keep class com.mogo.map.impl.amap.hook.BnHooker.*{*;}
|
||||
-keep class com.mogo.map.impl.amap.hook.BnHooker.*{*;}
|
||||
-keep class com.mogo.map.impl.amap.marker.CombineMovingPointOverlay.Status
|
||||
-keep class com.mogo.map.impl.amap.navi.PathPlanningErrorCodeConstants
|
||||
-keep class com.mogo.map.impl.amap.utils.MapStyleUtils.ColorEnum
|
||||
@@ -10,7 +10,9 @@ import com.amap.api.maps.model.BitmapDescriptorFactory;
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.amap.api.maps.model.Marker;
|
||||
import com.amap.api.maps.model.MarkerOptions;
|
||||
import com.amap.api.maps.model.animation.AlphaAnimation;
|
||||
import com.amap.api.maps.model.animation.Animation;
|
||||
import com.amap.api.maps.model.animation.AnimationSet;
|
||||
import com.amap.api.maps.model.animation.ScaleAnimation;
|
||||
import com.amap.api.maps.model.animation.TranslateAnimation;
|
||||
import com.amap.api.maps.utils.overlay.MovingPointOverlay;
|
||||
@@ -382,6 +384,47 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
mMarker.startAnimation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startScaleAnimationWithAlpha( float fromX, float toX, float fromY, float toY, float fromAlpha, float toAlpha, int duration, Interpolator interpolator, OnMarkerAnimationListener listener ) {
|
||||
if ( isDestroyed() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
ScaleAnimation animationScale = new ScaleAnimation( fromX, toX, fromY, toY );
|
||||
animationScale.setFillMode( Animation.FILL_MODE_FORWARDS );
|
||||
|
||||
AlphaAnimation alphaAnimation = new AlphaAnimation( fromAlpha, toAlpha );
|
||||
alphaAnimation.setFillMode( Animation.FILL_MODE_FORWARDS );
|
||||
|
||||
AnimationSet animationSet = new AnimationSet( true );
|
||||
animationSet.setDuration( duration );
|
||||
animationSet.setInterpolator( interpolator);
|
||||
animationSet.setAnimationListener( new Animation.AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart() {
|
||||
if ( isDestroyed() ) {
|
||||
return;
|
||||
}
|
||||
if ( listener != null ) {
|
||||
listener.onAnimStart();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd() {
|
||||
if ( isDestroyed() ) {
|
||||
return;
|
||||
}
|
||||
if ( listener != null ) {
|
||||
listener.onAnimEnd();
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
mMarker.setAnimation( animationSet );
|
||||
mMarker.startAnimation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startJumpAnimation( float high, long duration, Interpolator interpolator, OnMarkerAnimationListener listener ) {
|
||||
if ( isDestroyed() || high <= 0.0f || interpolator == null || duration < 0 ) {
|
||||
|
||||
@@ -15,9 +15,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
zipAlignEnabled true
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#-----library-MapApi----
|
||||
-keep class com.mogo.map.search.geo.MogoRegeocodeResult.*{*;}
|
||||
-keep class com.mogo.map.**{*;}
|
||||
2
libraries/mogo-map-api/proguard-rules.pro
vendored
@@ -21,4 +21,4 @@
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----library-MapApi----
|
||||
-keep class com.mogo.map.search.geo.MogoRegeocodeResult.*{*;}
|
||||
-keep class com.mogo.map.**{*;}
|
||||
@@ -267,9 +267,33 @@ public interface IMogoMarker {
|
||||
Interpolator interpolator,
|
||||
OnMarkerAnimationListener listener );
|
||||
|
||||
/**
|
||||
* 缩放动画
|
||||
*
|
||||
* @param fromX
|
||||
* @param toX
|
||||
* @param fromY
|
||||
* @param toY
|
||||
* @param fromAlpha
|
||||
* @param toAlpha
|
||||
* @param duration
|
||||
* @param interpolator
|
||||
* @param listener
|
||||
*/
|
||||
void startScaleAnimationWithAlpha( float fromX,
|
||||
float toX,
|
||||
float fromY,
|
||||
float toY,
|
||||
float fromAlpha,
|
||||
float toAlpha,
|
||||
int duration,
|
||||
Interpolator interpolator,
|
||||
OnMarkerAnimationListener listener );
|
||||
|
||||
|
||||
/**
|
||||
* 弹跳动画
|
||||
*
|
||||
* @param high
|
||||
* @param duration
|
||||
* @param interpolator
|
||||
@@ -278,7 +302,7 @@ public interface IMogoMarker {
|
||||
void startJumpAnimation( float high,
|
||||
long duration,
|
||||
Interpolator interpolator,
|
||||
OnMarkerAnimationListener listener);
|
||||
OnMarkerAnimationListener listener );
|
||||
|
||||
/**
|
||||
* 是否是否可点击
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#-----MogoMap-----
|
||||
-keep class com.mogo.map.MogoNavi{
|
||||
private <init>();
|
||||
}
|
||||
5
libraries/mogo-map/proguard-rules.pro
vendored
@@ -19,3 +19,8 @@
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----MogoMap-----
|
||||
-keep class com.mogo.map.MogoNavi{
|
||||
private <init>();
|
||||
}
|
||||
|
||||
@@ -24,9 +24,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
zipAlignEnabled true
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
#-----AppModule-----
|
||||
-keep class com.mogo.module.apps.model.AppEnum
|
||||
-keep class com.mogo.module.apps.view.**{*;}
|
||||
-keep class com.mogo.module.apps.AppFilter
|
||||
5
modules/mogo-module-apps/proguard-rules.pro
vendored
@@ -19,3 +19,8 @@
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file mName.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----AppModule-----
|
||||
-keep class com.mogo.module.apps.model.AppEnum
|
||||
-keep class com.mogo.module.apps.view.** {*;}
|
||||
-keep class com.mogo.module.apps.AppFilter
|
||||
|
||||
@@ -47,6 +47,24 @@ public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresent
|
||||
AppServiceHandler.getApis().getStatusManagerApi().setAppListUIShow( TAG, true );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
try {
|
||||
AppServiceHandler.getApis().getAdasControllerApi().closeADAS();
|
||||
} catch ( Exception e ) {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onRestart() {
|
||||
super.onRestart();
|
||||
try {
|
||||
AppServiceHandler.getApis().getAdasControllerApi().closeADAS();
|
||||
} catch ( Exception e ) {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.module_apps_activity_list;
|
||||
|
||||
@@ -28,9 +28,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
zipAlignEnabled true
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#-----AuthorizeModule-----
|
||||
-keep class com.mogo.module.authorize.module.bean.*{*;}
|
||||
-keep class com.mogo.module.authorize.module.bean.**{*;}
|
||||
@@ -21,4 +21,4 @@
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----AuthorizeModule-----
|
||||
-keep class com.mogo.module.authorize.module.bean.*{*;}
|
||||
-keep class com.mogo.module.authorize.module.bean.**{*;}
|
||||
@@ -6,8 +6,6 @@ import com.mogo.module.authorize.authprovider.module.IMogoAcquireAuthorizeListen
|
||||
import com.mogo.module.authorize.model.proxy.AuthorizeProxy
|
||||
import com.mogo.module.authorize.model.proxy.toAuthorizeType
|
||||
import com.mogo.module.authorize.util.SharedPreferenceUtil.needAuthorization
|
||||
import com.mogo.module.authorize.util.SharedPreferenceUtil.setAuthorizeStatus
|
||||
import com.mogo.module.authorize.util.isDeviceOfD
|
||||
import com.mogo.utils.logger.Logger
|
||||
|
||||
open abstract class MogoAuthorizeManagerImpl : IMogoAuthorizeInvoke {
|
||||
@@ -19,13 +17,9 @@ open abstract class MogoAuthorizeManagerImpl : IMogoAuthorizeInvoke {
|
||||
private val baseController: IMogoAuthorizeController by lazy { IMogoAuthorizeController() }
|
||||
|
||||
override fun needAuthorize(tag: String): Boolean {
|
||||
return if (isDeviceOfD()) {
|
||||
Logger.d(TAG, "===== needAuthorize update agreement in background")
|
||||
baseController.checkIfNeedAuthorize(tag.toAuthorizeType())
|
||||
needAuthorization(tag.toAuthorizeType())
|
||||
} else {
|
||||
false
|
||||
}
|
||||
Logger.d(TAG, "===== needAuthorize update agreement in background")
|
||||
baseController.checkIfNeedAuthorize(tag.toAuthorizeType())
|
||||
return needAuthorization(tag.toAuthorizeType())
|
||||
}
|
||||
|
||||
override fun updateAuthorizeStatus(tag: String) {
|
||||
|
||||
@@ -13,8 +13,6 @@ import com.mogo.module.authorize.authprovider.invoke.AuthorizeConstant.Companion
|
||||
import com.mogo.module.authorize.authprovider.invoke.AuthorizeConstant.Companion.PATH_AGREEMENT_MODULE_NAME
|
||||
import com.mogo.module.authorize.authprovider.invoke.AuthorizeInvokerConstant.Companion.AUTHORIZE_TYPE_LAUNCHER_MAIN
|
||||
import com.mogo.module.authorize.authprovider.launcher.MogoMainAuthorize.Companion.mogoAuthShow
|
||||
import com.mogo.module.authorize.util.SharedPreferenceUtil.hasGuide
|
||||
import com.mogo.module.authorize.util.isDeviceOfD
|
||||
import com.mogo.service.module.IMogoModuleLifecycle
|
||||
import com.mogo.service.module.IMogoModuleProvider
|
||||
import com.mogo.service.module.ModuleType
|
||||
@@ -66,7 +64,8 @@ class MogoAuthorizeProvider : IMogoModuleProvider {
|
||||
override fun init(context: Context) {
|
||||
//todo 引导判断暂时去掉 后续引导流程更改完再放开
|
||||
// todo if (isDeviceOfD() && hasGuide() && mogoAuthShow.needAuthorize(AUTHORIZE_TYPE_LAUNCHER_MAIN)) {
|
||||
if (isDeviceOfD() && mogoAuthShow.needAuthorize(AUTHORIZE_TYPE_LAUNCHER_MAIN)) {
|
||||
// todo F系列暂时没有授权功能 1.1需求中添加 全量上
|
||||
if (mogoAuthShow.needAuthorize(AUTHORIZE_TYPE_LAUNCHER_MAIN)) {
|
||||
mogoAuthShow.invokeAuthorizeForShow(context)
|
||||
} else {
|
||||
//首次进入Launcher同步一下授权状态,防止由于用户清除数据造成首次加载还会出现授权状态不同步问题
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
package com.mogo.module.authorize.util
|
||||
|
||||
import com.mogo.module.common.utils.CarSeries.*
|
||||
|
||||
fun isDeviceOfD(): Boolean {
|
||||
return when (getSeries()) {
|
||||
CAR_SERIES_D80X, CAR_SERIES_D81X, CAR_SERIES_D82X, CAR_SERIES_D84X -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
#-----ModuleBack-----
|
||||
-keep class com.mogo.module.back.BackToLauncherConst.*{*;}
|
||||
3
modules/mogo-module-back/proguard-rules.pro
vendored
@@ -19,3 +19,6 @@
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----ModuleBack-----
|
||||
-keep class com.mogo.module.back.BackToLauncherConst.*{*;}
|
||||
@@ -15,9 +15,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
zipAlignEnabled true
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#-----CommonModule-----
|
||||
-keep class com.mogo.module.common.entity.*
|
||||
-keep class com.mogo.module.common.entity.*{*;}
|
||||
-keep class com.mogo.module.common.entity.MarkerResponse.*{*;}
|
||||
-keep class com.mogo.module.common.entity.** {*;}
|
||||
-keep class com.mogo.module.common.map.Interrupter
|
||||
-keep class com.mogo.module.common.map.Scene
|
||||
-keep class com.mogo.module.common.wm.** {*;}
|
||||
-keep class com.mogo.module.common.ModuleNames
|
||||
-keep class com.mogo.module.common.ModuleType
|
||||
-keep class com.mogo.module.common.MogoModulePaths
|
||||
@@ -21,6 +21,8 @@
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----CommonModule-----
|
||||
-keep class com.mogo.module.common.entity.*
|
||||
-keep class com.mogo.module.common.entity.*{*;}
|
||||
-keep class com.mogo.module.common.entity.MarkerResponse.*{*;}
|
||||
-keep class com.mogo.module.common.entity.** {*;}
|
||||
-keep class com.mogo.module.common.map.Interrupter
|
||||
-keep class com.mogo.module.common.map.Scene
|
||||
-keep class com.mogo.module.common.wm.** {*;}
|
||||
-keep class com.mogo.module.common.MogoModulePaths
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
-keep class com.zhidao.mogo.module.event.panel.EventPanelConstants
|
||||
@@ -18,4 +18,6 @@
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
-keep class com.zhidao.mogo.module.event.panel.EventPanelConstants
|
||||
@@ -25,9 +25,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
zipAlignEnabled true
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#-----EventPanel------
|
||||
-keep class com.zhidao.mogo.module.event.panel.bean.*{*;}
|
||||
-keep class com.zhidao.mogo.module.event.panel.dao.*{*;}
|
||||
-keep class com.zhidao.mogo.module.event.panel.bean.** {*;}
|
||||
-keep class com.zhidao.mogo.module.event.panel.dao.** {*;}
|
||||
-keep class com.zhidao.mogo.module.event.panel.listener.** {*;}
|
||||
-keep class com.zhidao.mogo.module.event.panel.EventPanelConstants
|
||||
@@ -21,5 +21,7 @@
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----EventPanel------
|
||||
-keep class com.zhidao.mogo.module.event.panel.bean.*{*;}
|
||||
-keep class com.zhidao.mogo.module.event.panel.dao.*{*;}
|
||||
-keep class com.zhidao.mogo.module.event.panel.bean.** {*;}
|
||||
-keep class com.zhidao.mogo.module.event.panel.dao.** {*;}
|
||||
-keep class com.zhidao.mogo.module.event.panel.listener.** {*;}
|
||||
-keep class com.zhidao.mogo.module.event.panel.EventPanelConstants
|
||||
@@ -22,9 +22,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
zipAlignEnabled true
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,8 @@
|
||||
#-----ExtensionModule-----
|
||||
-keep class com.mogo.module.extensions.userinfo.UserInfoResponse.*{*;}
|
||||
-keep class com.mogo.module.extensions.userinfo.**{*;}
|
||||
-keep class com.mogo.module.extensions.weather.Phenomena
|
||||
-keep class com.mogo.module.extensions.weather.WeatherCallback
|
||||
-keep interface com.mogo.module.extensions.net.UserInfoNetApiServices
|
||||
-keep class com.mogo.module.extensions.utils.TopViewAnimHelper
|
||||
-keep class com.mogo.module.extensions.ExtensionsView
|
||||
-keep class com.mogo.module.extensions.ExtensionsModuleConst
|
||||
@@ -21,4 +21,10 @@
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----ExtensionModule-----
|
||||
-keep class com.mogo.module.extensions.userinfo.UserInfoResponse.*{*;}
|
||||
-keep class com.mogo.module.extensions.userinfo.**{*;}
|
||||
-keep class com.mogo.module.extensions.weather.Phenomena
|
||||
-keep class com.mogo.module.extensions.weather.WeatherCallback
|
||||
-keep interface com.mogo.module.extensions.net.UserInfoNetApiServices
|
||||
-keep class com.mogo.module.extensions.utils.TopViewAnimHelper
|
||||
-keep class com.mogo.module.extensions.ExtensionsView
|
||||
-keep class com.mogo.module.extensions.ExtensionsModuleConst
|
||||
@@ -1,9 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true" >
|
||||
<shape>
|
||||
<corners android:radius="@dimen/module_ext_common_corner" />
|
||||
<gradient android:angle="135" android:endColor="#1C1E28" android:startColor="#242737" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape>
|
||||
<corners android:radius="@dimen/module_ext_common_corner" />
|
||||
<gradient android:angle="135" android:endColor="#3F435F" android:startColor="#2E3141" />
|
||||
<gradient android:angle="135" android:endColor="#48495E" android:startColor="#616381" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -1,5 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true">
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:angle="135" android:endColor="#ff113361" android:startColor="#ff124B98" android:type="linear" />
|
||||
<corners android:radius="@dimen/module_ext_common_corner" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:angle="135" android:endColor="#ff1e57a4" android:startColor="#ff1f7eff" android:type="linear" />
|
||||
|
||||
@@ -21,9 +21,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
zipAlignEnabled true
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
#-----MogoGSPSimulator-----
|
||||
-keep class com.mogo.module.gps.simulator.GpsSimulatorConstants
|
||||
@@ -19,3 +19,6 @@
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----MogoGSPSimulator-----
|
||||
-keep class com.mogo.module.gps.simulator.GpsSimulatorConstants
|
||||
|
||||
@@ -28,9 +28,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
zipAlignEnabled true
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
#-----ModuleLeftPanel-----
|
||||
-keep class com.zhidao.mogo.module.left.panel.LeftPanelConst
|
||||
@@ -18,4 +18,7 @@
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----ModuleLeftPanel-----
|
||||
-keep class com.zhidao.mogo.module.left.panel.LeftPanelConst
|
||||
@@ -0,0 +1,2 @@
|
||||
#-----ModuleLeftPanel-----
|
||||
-keep class com.zhidao.mogo.module.left.panel.LeftPanelConst
|
||||
@@ -18,4 +18,7 @@
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----ModuleLeftPanel-----
|
||||
-keep class com.zhidao.mogo.module.left.panel.LeftPanelConst
|
||||
@@ -21,9 +21,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
zipAlignEnabled true
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,9 @@
|
||||
#-----MainModule-----
|
||||
-keep class com.mogo.module.main.cards.CardIntroduceConfig.*{*;}
|
||||
-keep class com.mogo.module.main.cards.CardIntroduceConfig.*{*;}
|
||||
-keep class com.mogo.module.main.cards.MogoModulesHandler
|
||||
-keep class com.mogo.module.main.cards.HorizentalBaseTransformer
|
||||
-keep class com.mogo.module.main.cards.VerticalBaseTransformer
|
||||
-keep class com.mogo.module.main.constants.**{*;}
|
||||
-keep class com.mogo.module.main.livedata.**{*;}
|
||||
-keep class com.mogo.module.main.service.MogoMainService
|
||||
-keep class com.mogo.module.main.windowview.IWindowViewHandler
|
||||
9
modules/mogo-module-main/proguard-rules.pro
vendored
@@ -21,4 +21,11 @@
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----MainModule-----
|
||||
-keep class com.mogo.module.main.cards.CardIntroduceConfig.*{*;}
|
||||
-keep class com.mogo.module.main.cards.CardIntroduceConfig.*{*;}
|
||||
-keep class com.mogo.module.main.cards.MogoModulesHandler
|
||||
-keep class com.mogo.module.main.cards.HorizentalBaseTransformer
|
||||
-keep class com.mogo.module.main.cards.VerticalBaseTransformer
|
||||
-keep class com.mogo.module.main.constants.**{*;}
|
||||
-keep class com.mogo.module.main.livedata.**{*;}
|
||||
-keep class com.mogo.module.main.service.MogoMainService
|
||||
-keep class com.mogo.module.main.windowview.IWindowViewHandler
|
||||
@@ -21,6 +21,7 @@ import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.module.common.map.MapCenterPointStrategy;
|
||||
import com.mogo.module.common.map.Scene;
|
||||
import com.mogo.module.common.utils.CarSeries;
|
||||
import com.mogo.module.main.cards.MogoModulesManager;
|
||||
import com.mogo.module.main.service.MogoMainService;
|
||||
import com.mogo.module.main.windowview.FloatingViewHandler;
|
||||
@@ -30,7 +31,6 @@ import com.mogo.service.fragmentmanager.IMogoFragmentManager;
|
||||
import com.mogo.service.intent.IMogoIntentListener;
|
||||
import com.mogo.service.map.IMogoMapService;
|
||||
import com.mogo.service.module.IMogoModuleProvider;
|
||||
import com.mogo.service.obu.IMogoObuManager;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.zhidao.autopilot.support.api.AutopilotServiceManage;
|
||||
@@ -244,12 +244,21 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
super.onPause();
|
||||
mMogoStatusManager.setMainPageResumeStatus( TAG, false );
|
||||
mMogoStatusManager.setMainPageLaunchedStatus( TAG, false );
|
||||
if ( !mIsHomeKeyDown || !DebugConfig.isLauncher() ) {
|
||||
if ( shouldCloseADASPanel() ) {
|
||||
mServiceApis.getAdasControllerApi().closeADAS();
|
||||
}
|
||||
mIsHomeKeyDown = false;
|
||||
}
|
||||
|
||||
private boolean shouldCloseADASPanel(){
|
||||
// m4 系列因为按home键会造成页面pause后resume,造成adas panel 闪烁
|
||||
// f 系列加上上滑返回桌面后会走 mIsHomeKeyDown = true,但是不会造成页面pause
|
||||
// 独立 app 任何情况下都需要隐藏 adas
|
||||
return !mIsHomeKeyDown
|
||||
|| CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X
|
||||
|| !DebugConfig.isLauncher();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
#-----ModuleMap-----
|
||||
-keep class com.mogo.module.map.NavConstants
|
||||
3
modules/mogo-module-map/proguard-rules.pro
vendored
@@ -19,3 +19,6 @@
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----ModuleMap-----
|
||||
-keep class com.mogo.module.map.NavConstants
|
||||
|
||||
@@ -22,9 +22,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
zipAlignEnabled true
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
#-----MediaModule-----
|
||||
-dontwarn com.mogo.module.media.**
|
||||
-keep class com.mogo.module.media.listener.* { *; }
|
||||
-keep class com.mogo.module.media.model.* { *; }
|
||||
-keep class com.mogo.module.media.view.* { *; }
|
||||
-keep class com.mogo.module.media.widget.* { *; }
|
||||
-keep class com.mogo.module.media.api.* { *; }
|
||||
-keep class com.mogo.module.media.constants.* { *; }
|
||||
-keep class com.mogo.module.media.presenter.* { *; }
|
||||
-keep class com.mogo.module.media.receiver.* { *; }
|
||||
-keep class com.mogo.module.media.listener.** { *; }
|
||||
-keep class com.mogo.module.media.model.** { *; }
|
||||
-keep class com.mogo.module.media.view.** { *; }
|
||||
-keep class com.mogo.module.media.widget.** { *; }
|
||||
-keep class com.mogo.module.media.api.** { *; }
|
||||
-keep class com.mogo.module.media.constants.** { *; }
|
||||
-keep class com.mogo.module.media.presenter.** { *; }
|
||||
-keep class com.mogo.module.media.receiver.** { *; }
|
||||
-keep class com.mogo.module.media.utils.OnBitmapToLocalListener
|
||||
-keep class com.mogo.module.media.utils.OnCompressListener
|
||||
-keep class com.mogo.module.media.MediaConstants
|
||||
19
modules/mogo-module-media/proguard-rules.pro
vendored
@@ -22,11 +22,14 @@
|
||||
|
||||
#-----MediaModule-----
|
||||
-dontwarn com.mogo.module.media.**
|
||||
-keep class com.mogo.module.media.listener.* { *; }
|
||||
-keep class com.mogo.module.media.model.* { *; }
|
||||
-keep class com.mogo.module.media.view.* { *; }
|
||||
-keep class com.mogo.module.media.widget.* { *; }
|
||||
-keep class com.mogo.module.media.api.* { *; }
|
||||
-keep class com.mogo.module.media.constants.* { *; }
|
||||
-keep class com.mogo.module.media.presenter.* { *; }
|
||||
-keep class com.mogo.module.media.receiver.* { *; }
|
||||
-keep class com.mogo.module.media.listener.** { *; }
|
||||
-keep class com.mogo.module.media.model.** { *; }
|
||||
-keep class com.mogo.module.media.view.** { *; }
|
||||
-keep class com.mogo.module.media.widget.** { *; }
|
||||
-keep class com.mogo.module.media.api.** { *; }
|
||||
-keep class com.mogo.module.media.constants.** { *; }
|
||||
-keep class com.mogo.module.media.presenter.** { *; }
|
||||
-keep class com.mogo.module.media.receiver.** { *; }
|
||||
-keep class com.mogo.module.media.utils.OnBitmapToLocalListener
|
||||
-keep class com.mogo.module.media.utils.OnCompressListener
|
||||
-keep class com.mogo.module.media.MediaConstants
|
||||
@@ -14,7 +14,6 @@ import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import cn.kuwo.autosdk.api.KWAPI;
|
||||
import cn.kuwo.autosdk.api.OnGetSongImgUrlListener;
|
||||
@@ -43,14 +42,14 @@ public class KwPresenter extends BaseMediaPresenter<IMusicView> {
|
||||
kwapi = KWAPI.createKWAPI(context, "auto");
|
||||
|
||||
kwapi.registerConnectedListener(b -> {
|
||||
Logger.d(TAG, "onConnected: " + b);
|
||||
Log.d(TAG, "onConnected: " + b);
|
||||
Log.d(TAG, "onConnected: " + b);
|
||||
isBind = b;
|
||||
if (!isBind) {
|
||||
mView.onMusicStopped();
|
||||
}else{
|
||||
PlayerStatus currentState = kwapi.getPlayerStatus();
|
||||
Logger.d(TAG, "check current status: " + currentState);
|
||||
Log.d(TAG, "check current status: " + currentState);
|
||||
Log.d(TAG, "check current status: " + currentState);
|
||||
if(currentState == PlayerStatus.BUFFERING||currentState == PlayerStatus.PLAYING){
|
||||
currentMedia.setPlayState(MusicConstant.PLAY_STATE_PLAYING);
|
||||
@@ -62,13 +61,13 @@ public class KwPresenter extends BaseMediaPresenter<IMusicView> {
|
||||
});
|
||||
|
||||
kwapi.registerExitListener(() -> {
|
||||
Logger.d(TAG, "onExit===");
|
||||
Log.d(TAG, "onExit===");
|
||||
Log.d(TAG, "onExit===");
|
||||
mView.onAppExit();
|
||||
});
|
||||
|
||||
kwapi.registerPlayerStatusListener((playerStatus, music) -> {
|
||||
Logger.d(TAG, "onPlayerStatusListener: " + playerStatus + " music: " + music.name);
|
||||
Log.d(TAG, "onPlayerStatusListener: " + playerStatus + " music: " + music.name);
|
||||
switch (playerStatus) {
|
||||
case BUFFERING:
|
||||
if (currentMedia.getMediaName() == null || !currentMedia.getMediaName().equals(music.name)) {
|
||||
@@ -113,7 +112,7 @@ public class KwPresenter extends BaseMediaPresenter<IMusicView> {
|
||||
@Override
|
||||
public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
|
||||
if (isTrue) {
|
||||
Logger.d(TAG, "onResume, isBind: " + isBind);
|
||||
Log.d(TAG, "onResume, isBind: " + isBind);
|
||||
Log.d(TAG, "onResume, isBind: " + isBind);
|
||||
// 需要在resume时候判断绑定关系是否正常
|
||||
if (!isBind) {
|
||||
@@ -125,14 +124,14 @@ public class KwPresenter extends BaseMediaPresenter<IMusicView> {
|
||||
// 当前处于绑定状态,且有音乐信息,需判断是否正在播放,进行界面刷新
|
||||
Log.d(TAG, "step1==" + currentMusic.name);
|
||||
if (kwapi.getPlayerStatus() == PlayerStatus.BUFFERING || kwapi.getPlayerStatus() == PlayerStatus.PLAYING) {
|
||||
Logger.d(TAG, "当前可能正在播放音乐,需要更新=1=" + currentMusic.name);
|
||||
Log.d(TAG, "当前可能正在播放音乐,需要更新=1=" + currentMusic.name);
|
||||
currentMedia.setMediaName(currentMusic.name);
|
||||
currentMedia.setPlayState(MusicConstant.PLAY_STATE_PLAYING);
|
||||
mView.onMediaInfoChanged(currentMedia);
|
||||
mView.onMusicPlaying();
|
||||
kwapi.getSongPicUrl(currentMusic, onGetSongImgUrlListener);
|
||||
} else if (kwapi.getPlayerStatus() == PlayerStatus.INIT) {
|
||||
Logger.d(TAG, "当前可能正在播放音乐,需要更新=3=" + currentMusic.name);
|
||||
Log.d(TAG, "当前可能正在播放音乐,需要更新=3=" + currentMusic.name);
|
||||
currentMedia.setMediaName(currentMusic.name);
|
||||
currentMedia.setPlayState(MusicConstant.PLAY_STATE_PAUSE_OR_STOP);
|
||||
mView.onMediaInfoChanged(currentMedia);
|
||||
@@ -142,14 +141,14 @@ public class KwPresenter extends BaseMediaPresenter<IMusicView> {
|
||||
Log.d(TAG, "step2==media: " + currentMedia.getMediaName() + " " +
|
||||
"musicName: " + currentMusic.name + " status: " + kwapi.getPlayerStatus());
|
||||
if (kwapi.getPlayerStatus() == PlayerStatus.BUFFERING || kwapi.getPlayerStatus() == PlayerStatus.PLAYING) {
|
||||
Logger.d(TAG, "当前可能正在播放音乐,需要更新=2=" + currentMusic.name);
|
||||
Log.d(TAG, "当前可能正在播放音乐,需要更新=2=" + currentMusic.name);
|
||||
currentMedia.setMediaName(currentMusic.name);
|
||||
currentMedia.setPlayState(MusicConstant.PLAY_STATE_PLAYING);
|
||||
mView.onMediaInfoChanged(currentMedia);
|
||||
mView.onMusicPlaying();
|
||||
kwapi.getSongPicUrl(currentMusic, onGetSongImgUrlListener);
|
||||
}else if (kwapi.getPlayerStatus() == PlayerStatus.INIT) {
|
||||
Logger.d(TAG, "当前可能正在播放音乐,需要更新=4=" + currentMusic.name);
|
||||
Log.d(TAG, "当前可能正在播放音乐,需要更新=4=" + currentMusic.name);
|
||||
currentMedia.setMediaName(currentMusic.name);
|
||||
currentMedia.setPlayState(MusicConstant.PLAY_STATE_PAUSE_OR_STOP);
|
||||
mView.onMediaInfoChanged(currentMedia);
|
||||
@@ -237,16 +236,18 @@ public class KwPresenter extends BaseMediaPresenter<IMusicView> {
|
||||
private OnGetSongImgUrlListener onGetSongImgUrlListener = new OnGetSongImgUrlListener() {
|
||||
@Override
|
||||
public void onGetSongImgUrlSucessed(Music music, String s) {
|
||||
currentMedia.setMediaName(music.name);
|
||||
currentMedia.setMediaImg(s);
|
||||
Logger.d(TAG,
|
||||
"onGetSongImgUrlSucessed: " + currentMedia);
|
||||
handler.post(() -> mView.onMediaInfoChanged(currentMedia));
|
||||
if(currentMedia.getPlayState() == MusicConstant.PLAY_STATE_PLAYING) {
|
||||
currentMedia.setMediaName(music.name);
|
||||
currentMedia.setMediaImg(s);
|
||||
Log.d(TAG,
|
||||
"onGetSongImgUrlSucessed: " + currentMedia);
|
||||
handler.post(() -> mView.onMediaInfoChanged(currentMedia));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGetSongImgUrlFailed(Music music, int i) {
|
||||
Logger.e(TAG, "onGetSongImgUrlFailed: " + i);
|
||||
Log.e(TAG, "onGetSongImgUrlFailed: " + i);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.module.media.window;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
@@ -101,6 +102,7 @@ public class MediaWindow2 implements IMusicView {
|
||||
int statusBarHeight = WindowUtils.getStatusBarHeight(mContext);
|
||||
Logger.d(TAG,
|
||||
"yPos: " + yPos + " xPos: " + xPos + " statusBarHeight: " + statusBarHeight);
|
||||
Log.d(TAG, "addMediaWindoView");
|
||||
FrameLayout.LayoutParams params =
|
||||
new FrameLayout.LayoutParams((int) mContext.getResources().getDimension(R.dimen.module_media_pop_window_width), (int) mContext.getResources().getDimension(R.dimen.module_media_pop_window_height));
|
||||
params.leftMargin = xPos;
|
||||
@@ -204,6 +206,7 @@ public class MediaWindow2 implements IMusicView {
|
||||
@Override
|
||||
public void onMusicPlaying() {
|
||||
Logger.d(TAG, "onMusicPlaying===" + mMediaInfoData);
|
||||
Log.d(TAG, "onMusicPlaying===" + mMediaInfoData);
|
||||
isFirstPlay = false;
|
||||
updateWindowUI(false);
|
||||
if (mWindowPlayPause != null) {
|
||||
@@ -218,6 +221,7 @@ public class MediaWindow2 implements IMusicView {
|
||||
@Override
|
||||
public void onMusicPause() {
|
||||
Logger.d(TAG, "onMusicPause: ===" + mMediaInfoData);
|
||||
Log.d(TAG, "onMusicPause: ===" + mMediaInfoData);
|
||||
if (mWindowPlayPause != null) {
|
||||
mWindowPlayPause.setImageResource(R.drawable.module_media_window_pop_pause);
|
||||
}
|
||||
@@ -230,6 +234,7 @@ public class MediaWindow2 implements IMusicView {
|
||||
@Override
|
||||
public void onMusicStopped() {
|
||||
Logger.d(TAG, "onMusicStopped===" + mMediaInfoData);
|
||||
Log.d(TAG, "onMusicStopped===" + mMediaInfoData);
|
||||
if (mWindowPlayPause != null) {
|
||||
mWindowPlayPause.setImageResource(R.drawable.module_media_window_pop_pause);
|
||||
}
|
||||
@@ -244,6 +249,7 @@ public class MediaWindow2 implements IMusicView {
|
||||
@Override
|
||||
public void onMediaInfoChanged(MediaInfoData mediaInfoData) {
|
||||
Logger.d(TAG, "onMediaInfoChanged: " + mediaInfoData);
|
||||
Log.d(TAG, "onMediaInfoChanged:" + mediaInfoData);
|
||||
mMediaInfoData = mediaInfoData;
|
||||
addWindowView();
|
||||
updateWindowUI();
|
||||
@@ -273,6 +279,8 @@ public class MediaWindow2 implements IMusicView {
|
||||
|
||||
@Override
|
||||
public void onAppExit() {
|
||||
mWindowView.setVisibility(View.GONE);
|
||||
if ( mWindowView != null ) {
|
||||
mWindowView.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,9 +29,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
zipAlignEnabled true
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#-----SearchModule-----
|
||||
-keep class com.mogo.module.navi.bean.*{*;}
|
||||
-keep class com.mogo.module.navi.dao.*{*;}
|
||||
-keep class com.mogo.module.navi.database.*{*;}
|
||||
-keep class com.mogo.module.navi.bean.**{*;}
|
||||
-keep class com.mogo.module.navi.constants.**{*;}
|
||||
-keep class com.mogo.module.navi.dao.**{*;}
|
||||
-keep class com.mogo.module.navi.database.**{*;}
|
||||
-keep class * extends com.mogo.module.navi.cp.PersonalInfoManager{
|
||||
public static final <fields>;
|
||||
}
|
||||
|
||||
10
modules/mogo-module-search/proguard-rules.pro
vendored
@@ -21,6 +21,10 @@
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----SearchModule-----
|
||||
-keep class com.mogo.module.navi.bean.*{*;}
|
||||
-keep class com.mogo.module.navi.dao.*{*;}
|
||||
-keep class com.mogo.module.navi.database.*{*;}
|
||||
-keep class com.mogo.module.navi.bean.**{*;}
|
||||
-keep class com.mogo.module.navi.constants.**{*;}
|
||||
-keep class com.mogo.module.navi.dao.**{*;}
|
||||
-keep class com.mogo.module.navi.database.**{*;}
|
||||
-keep class * extends com.mogo.module.navi.cp.PersonalInfoManager{
|
||||
public static final <fields>;
|
||||
}
|
||||
@@ -25,9 +25,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
zipAlignEnabled true
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
#-----ServiceModule-----
|
||||
-keep class com.mogo.module.service.carinfo.CarStateInfo.*{*;}
|
||||
-keep class com.mogo.module.service.network.RefreshBody.*{*;}
|
||||
-keep class com.mogo.module.service.network.bean.DemoUserInfoEntity.*{*;}
|
||||
-keep class com.mogo.module.service.network.bean.DemoUserInfoEntity.*{*;}
|
||||
-keep interface com.mogo.module.service.intent.IntentHandler
|
||||
-keep interface com.mogo.module.service.marker.IMarkerView
|
||||
-keep interface com.mogo.module.service.network.RefreshApiService
|
||||
-keep interface com.mogo.module.service.network.RefreshCallback
|
||||
-keep interface com.mogo.module.service.network.bean.DemoUserInfoEntity
|
||||
-keep class com.mogo.module.service.strategy.CarIconDisplayStrategy{
|
||||
public static final <fields>;
|
||||
}
|
||||
-keep class com.mogo.module.service.ServiceConst
|
||||
11
modules/mogo-module-service/proguard-rules.pro
vendored
@@ -23,4 +23,13 @@
|
||||
#-----ServiceModule-----
|
||||
-keep class com.mogo.module.service.carinfo.CarStateInfo.*{*;}
|
||||
-keep class com.mogo.module.service.network.RefreshBody.*{*;}
|
||||
-keep class com.mogo.module.service.network.bean.DemoUserInfoEntity.*{*;}
|
||||
-keep class com.mogo.module.service.network.bean.DemoUserInfoEntity.*{*;}
|
||||
-keep interface com.mogo.module.service.intent.IntentHandler
|
||||
-keep interface com.mogo.module.service.marker.IMarkerView
|
||||
-keep interface com.mogo.module.service.network.RefreshApiService
|
||||
-keep interface com.mogo.module.service.network.RefreshCallback
|
||||
-keep interface com.mogo.module.service.network.bean.DemoUserInfoEntity
|
||||
-keep class com.mogo.module.service.strategy.CarIconDisplayStrategy{
|
||||
public static final <fields>;
|
||||
}
|
||||
-keep class com.mogo.module.service.ServiceConst
|
||||
@@ -715,6 +715,7 @@ public class MogoServices implements IMogoMapListener,
|
||||
break;
|
||||
case ACC_STATUS:
|
||||
if ( isTrue ) {
|
||||
initLocationServiceProcess( mContext );
|
||||
mADASController.showADAS();
|
||||
refreshStrategy();
|
||||
MarkerServiceHandler.getApis().getMapServiceApi().getSingletonLocationClient( mContext ).stop();
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.mogo.module.service.marker;
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
||||
import android.text.TextUtils;
|
||||
import android.view.animation.AccelerateInterpolator;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
@@ -11,6 +13,7 @@ import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.marker.IMogoMarkerManager;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.map.marker.anim.OnMarkerAnimationListener;
|
||||
import com.mogo.module.common.ModuleNames;
|
||||
import com.mogo.module.common.entity.MarkerCarPois;
|
||||
import com.mogo.module.common.entity.MarkerCardResult;
|
||||
@@ -34,6 +37,7 @@ import com.mogo.service.module.IMogoBizActionDoneListener;
|
||||
import com.mogo.utils.ResourcesHelper;
|
||||
import com.mogo.utils.ThreadPoolService;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.WorkThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import org.json.JSONArray;
|
||||
@@ -368,15 +372,42 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
IMogoMarker mogoMarker = existCarMap.get( sn );
|
||||
if ( mogoMarker == null || mogoMarker.isDestroyed() ) {
|
||||
Logger.d( TAG, "draw road condition, sn = %s", sn );
|
||||
mogoMarker = drawMapMarker( markerShowEntity, ServiceConst.MARKER_Z_INDEX_HIGH );
|
||||
}
|
||||
if ( mogoMarker != null ) {
|
||||
mogoMarker.setVisible( true );
|
||||
try {
|
||||
post2AddAndStartAnimation( markerShowEntity, i * 100L );
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void post2AddAndStartAnimation( MarkerShowEntity entity, long delay ) {
|
||||
if ( entity == null ) {
|
||||
return;
|
||||
}
|
||||
WorkThreadHandler.getInstance().postDelayed( () -> {
|
||||
if ( entity == null ) {
|
||||
return;
|
||||
}
|
||||
IMogoMarker marker = drawMapMarker( entity, ServiceConst.MARKER_Z_INDEX_HIGH );
|
||||
marker.startScaleAnimationWithAlpha( 0, 1.2f, 0, 1.2f, 0f, 1f,300, new LinearInterpolator(), new OnMarkerAnimationListener() {
|
||||
@Override
|
||||
public void onAnimStart() {
|
||||
Logger.d( TAG, " onAnimStart ---1----> " );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimEnd() {
|
||||
if ( marker.isDestroyed() ) {
|
||||
return;
|
||||
}
|
||||
marker.startScaleAnimation( 1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null );
|
||||
}
|
||||
} );
|
||||
}, delay );
|
||||
}
|
||||
|
||||
/**
|
||||
* S = (A ∩ B) ∪ B
|
||||
* (A ∩ B)作为旧列表需要保留的部分
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 941 B After Width: | Height: | Size: 950 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 941 B After Width: | Height: | Size: 950 B |
BIN
modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_living.png
Executable file → Normal file
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 2.5 KiB |
BIN
modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_living_light.png
Executable file → Normal file
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.1 KiB |