Merge branch 'dev' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into dev

This commit is contained in:
wangcongtao
2020-07-22 10:53:37 +08:00
234 changed files with 609 additions and 632 deletions

2
.idea/misc.xml generated
View File

@@ -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="JDK" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
</project>

View File

@@ -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,16 +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.autopilotcore.*{*;}
-keep class com.zhidao.autopilot.support.*{*;}
-keep class com.zhidao.voice.library.*{*;}
-keep class com.zhidao.voicesdk.*{*;}
-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.**{*;}

View File

@@ -62,7 +62,7 @@ MOGO_MODULE_V2X_VERSION=1.2.1.20
# 探路
MOGO_MODULE_TANLU_VERSION=1.3.0.19
# 车聊聊
CARCHATTING_VERSION=1.4.5
CARCHATTING_VERSION=1.4.6
# 车聊聊接口
CARCHATTINGPROVIDER_VERSION=1.3.4
# 视频引导

View File

@@ -1,2 +1,2 @@
#-----library-MapApi----
-keep class com.mogo.map.*{*;}
-keep class com.mogo.map.**{*;}

View File

@@ -21,4 +21,4 @@
#-renamesourcefileattribute SourceFile
#-----library-MapApi----
-keep class com.mogo.map.*{*;}
-keep class com.mogo.map.**{*;}

View File

@@ -1,4 +1,4 @@
#-----AppModule-----
-keep class com.mogo.module.apps.model.AppEnum
-keep class com.mogo.module.apps.view.*{*;}
-keep class com.mogo.module.apps.view.**{*;}
-keep class com.mogo.module.apps.AppFilter

View File

@@ -22,5 +22,5 @@
#-----AppModule-----
-keep class com.mogo.module.apps.model.AppEnum
-keep class com.mogo.module.apps.view.*{*;}
-keep class com.mogo.module.apps.view.** {*;}
-keep class com.mogo.module.apps.AppFilter

View File

@@ -1,2 +1,2 @@
#-----AuthorizeModule-----
-keep class com.mogo.module.authorize.module.bean.*{*;}
-keep class com.mogo.module.authorize.module.bean.**{*;}

View File

@@ -21,4 +21,4 @@
#-renamesourcefileattribute SourceFile
#-----AuthorizeModule-----
-keep class com.mogo.module.authorize.module.bean.*{*;}
-keep class com.mogo.module.authorize.module.bean.**{*;}

View File

@@ -0,0 +1,2 @@
#-----ModuleBack-----
-keep class com.mogo.module.back.BackToLauncherConst.*{*;}

View File

@@ -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.*{*;}

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1 @@
-keep class com.zhidao.mogo.module.event.panel.EventPanelConstants

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -1,5 +1,8 @@
#-----ExtensionModule-----
-keep class com.mogo.module.extensions.userinfo.*{*;}
-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.utils.TopViewAnimHelper
-keep class com.mogo.module.extensions.ExtensionsView
-keep class com.mogo.module.extensions.ExtensionsModuleConst

View File

@@ -21,7 +21,10 @@
#-renamesourcefileattribute SourceFile
#-----ExtensionModule-----
-keep class com.mogo.module.extensions.userinfo.*{*;}
-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.utils.TopViewAnimHelper
-keep class com.mogo.module.extensions.ExtensionsView
-keep class com.mogo.module.extensions.ExtensionsModuleConst

View File

@@ -0,0 +1,2 @@
#-----MogoGSPSimulator-----
-keep class com.mogo.module.gps.simulator.GpsSimulatorConstants

View File

@@ -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

View File

@@ -0,0 +1,2 @@
#-----ModuleLeftPanel-----
-keep class com.zhidao.mogo.module.left.panel.LeftPanelConst

View File

@@ -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

View File

@@ -0,0 +1,2 @@
#-----ModuleLeftPanel-----
-keep class com.zhidao.mogo.module.left.panel.LeftPanelConst

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,2 @@
#-----ModuleMap-----
-keep class com.mogo.module.map.NavConstants

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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>;
}

View File

@@ -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>;
}

View File

@@ -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

View File

@@ -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

View File

@@ -1,2 +1,5 @@
#-----ShareModule-----
-keep class com.mogo.module.share.bean.*{*;}
-keep class com.mogo.module.share.bean.**{*;}
-keep class com.mogo.module.share.constant.**{*;}
-keep class com.mogo.module.share.manager.ISeekHelpListener
-keep class com.mogo.module.share.net.ShareApiService

View File

@@ -21,4 +21,7 @@
#-renamesourcefileattribute SourceFile
#-----ShareModule-----
-keep class com.mogo.module.share.bean.*{*;}
-keep class com.mogo.module.share.bean.**{*;}
-keep class com.mogo.module.share.constant.**{*;}
-keep class com.mogo.module.share.manager.ISeekHelpListener
-keep class com.mogo.module.share.net.ShareApiService

View File

@@ -0,0 +1 @@
-keep class com.zhidao.mogo.module.splash.BydConst

View File

@@ -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.splash.BydConst

View File

@@ -1,6 +1,6 @@
#-----V2XModule-----
-keep class com.tencent.* { *; }
-keep class com.mogo.module.v2x.entity.net.* { *; }
-keep class com.tencent.** { *; }
-keep class com.mogo.module.v2x.entity.net.** { *; }
-keep class com.mogo.module.v2x.manager.V2XStatusDescriptor
-keep class com.mogo.module.v2x.utils.SpanUtils.Align
-keep class com.mogo.module.v2x.utils.TimeConstants.Unit
@@ -9,8 +9,9 @@
-keep interface * implements com.mogo.module.v2x.listener.V2XWindowStatusListener
-keep interface * implements com.mogo.module.v2x.network.V2XApiService
-keep interface * implements com.mogo.module.v2x.network.V2XRefreshCallback
-keep interface * implements com.mogo.module.v2x.scenario.view.*{*;}
-keep interface * implements com.mogo.module.v2x.scenario.view.**{*;}
-keep interface * implements com.mogo.module.v2x.scenario.impl.**{*;}
-keep interface * implements com.mogo.module.v2x.scenario.IV2XScenario
-keep interface * implements com.mogo.module.v2x.scenario.IV2XScenarioManager
-keep class com.mogo.module.v2x.voice.*{*;}
-keep class com.mogo.module.v2x.V2XConst.*{*;}
-keep class com.mogo.module.v2x.voice.**{*;}
-keep class com.mogo.module.v2x.V2XConst

View File

@@ -21,8 +21,8 @@
#-renamesourcefileattribute SourceFile
#-----V2XModule-----
-keep class com.tencent.* { *; }
-keep class com.mogo.module.v2x.entity.net.* { *; }
-keep class com.tencent.** { *; }
-keep class com.mogo.module.v2x.entity.net.** { *; }
-keep class com.mogo.module.v2x.manager.V2XStatusDescriptor
-keep class com.mogo.module.v2x.utils.SpanUtils.Align
-keep class com.mogo.module.v2x.utils.TimeConstants.Unit
@@ -31,8 +31,9 @@
-keep interface * implements com.mogo.module.v2x.listener.V2XWindowStatusListener
-keep interface * implements com.mogo.module.v2x.network.V2XApiService
-keep interface * implements com.mogo.module.v2x.network.V2XRefreshCallback
-keep interface * implements com.mogo.module.v2x.scenario.view.*{*;}
-keep interface * implements com.mogo.module.v2x.scenario.view.**{*;}
-keep interface * implements com.mogo.module.v2x.scenario.impl.**{*;}
-keep interface * implements com.mogo.module.v2x.scenario.IV2XScenario
-keep interface * implements com.mogo.module.v2x.scenario.IV2XScenarioManager
-keep class com.mogo.module.v2x.voice.*{*;}
-keep class com.mogo.module.v2x.V2XConst.*{*;}
-keep class com.mogo.module.v2x.voice.**{*;}
-keep class com.mogo.module.v2x.V2XConst

View File

@@ -0,0 +1,210 @@
package com.mogo.module.v2x.adapter.holder;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.mogo.commons.voice.AIAssist;
import com.mogo.map.MogoLatLng;
import com.mogo.map.navi.IMogoNaviListener;
import com.mogo.map.navi.MogoNaviInfo;
import com.mogo.map.navi.MogoTraffic;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.MarkerLocation;
import com.mogo.module.v2x.R;
import com.mogo.module.v2x.V2XConst;
import com.mogo.module.v2x.V2XServiceManager;
import com.mogo.module.v2x.utils.ChartingUtil;
import com.mogo.module.v2x.utils.RoadConditionUtils;
import com.mogo.module.v2x.utils.ToastUtils;
import com.mogo.module.v2x.utils.TrackUtils;
import com.mogo.module.v2x.utils.V2XUtils;
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
/**
* V2X展示视图公用的实现
*
* @author donghongyu
*/
public abstract class V2XBaseViewHolder
extends RecyclerView.ViewHolder
implements IMogoNaviListener {
public V2XBaseViewHolder(@NonNull View itemView) {
super(itemView);
}
/**
* 延迟关闭窗体视图
*/
public abstract void delayedCloseWindow();
/**
* 点赞
*/
public void triggerZan(MarkerExploreWay noveltyInfo) {
try {
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("已点赞", null);
showTip("已点赞");
if (noveltyInfo != null) {
V2XServiceManager.getV2XMarkerService()
.getV2XRefreshModel()
.giveLikeLiveVideo(null, noveltyInfo.getSn());
TrackUtils.trackV2xRoadEvent(
noveltyInfo.getInfoId(),
noveltyInfo.getSn(),
V2XConst.V2X_ROAD_ZAN);
}
} catch (Exception e) {
e.printStackTrace();
}
delayedCloseWindow();
}
/**
* 打电话
*/
public void triggerCallChart(MarkerExploreWay noveltyInfo) {
try {
MarkerLocation location = new MarkerLocation();
location.setLat(noveltyInfo.getLocation().getLat());
location.setLon(noveltyInfo.getLocation().getLon());
ChartingUtil.callChatting(noveltyInfo.getUserInfo(), location);
TrackUtils.trackV2xRoadEvent(
noveltyInfo.getInfoId(),
noveltyInfo.getSn(),
V2XConst.V2X_ROAD_CHAT);
} catch (Exception e) {
e.printStackTrace();
ToastUtils.showShort("用户信息异常");
}
delayedCloseWindow();
}
/**
* 反馈路况错误
*/
public void triggerReportErr(MarkerExploreWay noveltyInfo) {
try {
RoadConditionUtils.sendDataErrorReceiverInfo(
noveltyInfo.getPoiType(),
noveltyInfo.getInfoId(),
"1");
TrackUtils.trackV2xRoadEvent(
noveltyInfo.getInfoId(),
noveltyInfo.getSn(),
V2XConst.V2X_ROAD_REPORT_ERROR);
} catch (Exception e) {
e.printStackTrace();
ToastUtils.showShort("路况信息异常");
}
delayedCloseWindow();
}
/**
* 反馈路况正确
*/
public void triggerReportTrue(MarkerExploreWay noveltyInfo) {
try {
RoadConditionUtils.sendDataErrorReceiverInfo(
noveltyInfo.getPoiType(),
noveltyInfo.getInfoId(),
"2");
TrackUtils.trackV2xRoadEvent(
noveltyInfo.getInfoId(),
noveltyInfo.getSn(),
V2XConst.V2X_ROAD_REPORT_RIGHT);
} catch (Exception e) {
e.printStackTrace();
ToastUtils.showShort("路况信息异常");
}
delayedCloseWindow();
}
/**
* 导航规划路线
*/
public void triggerStartNavi(MarkerExploreWay noveltyInfo) {
try {
MogoLatLng endPoint = new MogoLatLng(
noveltyInfo.getLocation().getLat(),
noveltyInfo.getLocation().getLon());
V2XServiceManager.getNavi().naviTo(endPoint);
V2XServiceManager.getMogoRegisterCenter().unregisterMogoNaviListener(MODULE_NAME);
V2XServiceManager.getMogoRegisterCenter().registerMogoNaviListener(MODULE_NAME, this);
TrackUtils.trackV2xRoadEvent(
noveltyInfo.getInfoId(),
noveltyInfo.getSn(),
V2XConst.V2X_ROAD_NAVI);
} catch (Exception e) {
e.printStackTrace();
ToastUtils.showShort("路况信息异常");
}
delayedCloseWindow();
}
/**
* 显示自定义 Toast
*
* @param msg
*/
public void showTip(String msg) {
ToastUtils.setGravity(Gravity.CENTER, 0, 0);
View toastView = LayoutInflater.from(V2XServiceManager.getContext()).inflate(R.layout.toast_view, null);
TextView msgView = toastView.findViewById(R.id.tvFeedbackContent);
msgView.setText(msg);
ToastUtils.showCustomShort(toastView);
}
@Override
public void onInitNaviFailure() {
}
@Override
public void onInitNaviSuccess() {
}
@Override
public void onNaviInfoUpdate(MogoNaviInfo naviinfo) {
}
@Override
public void onStartNavi() {
}
@Override
public void onStopNavi() {
}
@Override
public void onCalculateSuccess() {
V2XServiceManager.getNavi().startNavi(true);
}
@Override
public void onoCalculateFailed() {
}
@Override
public void onUpdateTraffic(MogoTraffic traffic) {
}
}

View File

@@ -1,44 +1,19 @@
package com.mogo.module.v2x.adapter.holder;
import android.content.Intent;
import android.text.TextUtils;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.voice.AIAssist;
import com.mogo.module.common.entity.MarkerCarInfo;
import com.mogo.module.common.entity.MarkerLocation;
import com.mogo.module.common.entity.MarkerUserInfo;
import com.mogo.module.common.entity.V2XEventShowEntity;
import com.mogo.module.common.entity.V2XLiveCarInfoEntity;
import com.mogo.module.common.entity.V2XRoadEventEntity;
import com.mogo.module.v2x.R;
import com.mogo.module.v2x.V2XConst;
import com.mogo.module.common.entity.V2XLiveCarInfoEntity;
import com.mogo.module.v2x.V2XServiceManager;
import com.mogo.module.v2x.entity.net.V2XUserInfoRes;
import com.mogo.module.v2x.network.V2XRefreshCallback;
import com.mogo.module.v2x.scenario.scene.road.V2XRoadEventScenario;
import com.mogo.module.v2x.utils.ChartingUtil;
import com.mogo.module.v2x.utils.ToastUtils;
import com.mogo.module.v2x.utils.TrackUtils;
import com.mogo.module.v2x.utils.V2XUtils;
import com.mogo.module.v2x.view.V2XLiveGSYVideoView;
import com.mogo.module.v2x.voice.V2XVoiceCallbackListener;
import com.mogo.module.v2x.voice.V2XVoiceConstants;
import com.mogo.module.v2x.voice.V2XVoiceManager;
import com.mogo.service.imageloader.MogoImageView;
import com.mogo.utils.logger.Logger;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
/**
* author : donghongyu
@@ -47,15 +22,11 @@ import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
* desc : 直播类型的卡片
* version: 1.0
*/
public class V2XLiveVideoVH extends RecyclerView.ViewHolder {
public class V2XLiveVideoVH extends V2XBaseViewHolder {
private V2XLiveGSYVideoView videoPlayer;
private MogoImageView ivReportHead;
// 控制按钮
private ImageView ivRoadCallChart;
private ImageView ivRoadEventLike;
// 上传事件的用户信息
private MarkerUserInfo mUserInfo = new MarkerUserInfo();
// 直播车机数据
@@ -63,55 +34,10 @@ public class V2XLiveVideoVH extends RecyclerView.ViewHolder {
// 预警的道路事件数据
private V2XRoadEventEntity mV2XRoadEventEntity;
// 拨打车聊聊语音回调
private V2XVoiceCallbackListener v2XVoiceCallbackCallListener = new V2XVoiceCallbackListener() {
@Override
public void onCallback(String command, Intent intent) {
if (mUserInfo != null && !TextUtils.isEmpty(mUserInfo.getSn())) {
roadCallChart();
}
}
};
// 点赞语音回调
private V2XVoiceCallbackListener v2XVoiceCallbackLickListener = new V2XVoiceCallbackListener() {
@Override
public void onCallback(String command, Intent intent) {
if (mV2XLiveCarEntity != null) {
handlerZan(mV2XLiveCarEntity.getSn());
}
}
};
public V2XLiveVideoVH(ViewGroup viewGroup) {
super(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_v2x_live_video, viewGroup, false));
videoPlayer = itemView.findViewById(R.id.videoPlayer);
ivReportHead = itemView.findViewById(R.id.ivReportHead);
ivRoadCallChart = itemView.findViewById(R.id.ivRoadCallChart);
ivRoadEventLike = itemView.findViewById(R.id.ivRoadEventLike);
// 设置视图状态监听
itemView.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() {
@Override
public void onViewAttachedToWindow(View v) {
//Logger.w(MODULE_NAME, "列表View V2XLiveVideoVH 触发 onViewAttachedToWindow");
// 注册语音交互
V2XVoiceManager.INSTANCE
.registerWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_CALL_CHATTING,
v2XVoiceCallbackCallListener)
.registerWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_ZAN,
v2XVoiceCallbackLickListener)
.registerUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_CHAT_MORE_UN_WAKEUP,
v2XVoiceCallbackCallListener)
.registerUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_ZAN_UN_WAKEUP,
v2XVoiceCallbackLickListener);
}
@Override
public void onViewDetachedFromWindow(View v) {
//Logger.w(MODULE_NAME, "列表View V2XLiveVideoVH 触发 onViewDetachedFromWindow");
}
});
}
public void initView(V2XEventShowEntity v2XLiveCarEntity) {
@@ -126,119 +52,12 @@ public class V2XLiveVideoVH extends RecyclerView.ViewHolder {
MarkerCarInfo.CarLiveInfo carLiveInfo = new MarkerCarInfo.CarLiveInfo();
carLiveInfo.setVideoSn(v2XLiveCarEntity.getSn());
videoPlayer.setCarLiveInfo(carLiveInfo);
ivRoadEventLike.setVisibility(VISIBLE);
ivRoadCallChart.setOnClickListener(v -> {
ivRoadCallChart.setVisibility(GONE);
roadCallChart();
});
ivRoadEventLike.setOnClickListener(v -> {
handlerZan(v2XLiveCarEntity.getSn());
});
requestUserInfo(v2XLiveCarEntity);
}
private void roadCallChart() {
MarkerLocation location = new MarkerLocation();
ChartingUtil.callChatting(mUserInfo, location);
}
/**
* 请求用户信息
*
* @param v2XLiveCarEntity 直播信息
*/
private void requestUserInfo(V2XLiveCarInfoEntity v2XLiveCarEntity) {
Logger.d(MODULE_NAME, "上报事件的用户SN" + v2XLiveCarEntity.getSn());
TrackUtils.trackV2xRoadEvent(mV2XRoadEventEntity.getNoveltyInfo().getInfoId(), v2XLiveCarEntity.getSn(), V2XConst.V2X_ROAD_VIDEO);
// 获取道路事件周边的直播车机
if (!TextUtils.isEmpty(v2XLiveCarEntity.getSn())) {
V2XServiceManager
.getV2XRefreshModel()
.queryUserInfoBySn(
v2XLiveCarEntity.getSn(),
new V2XRefreshCallback<V2XUserInfoRes>() {
@Override
public void onSuccess(V2XUserInfoRes result) {
//Logger.d(MODULE_NAME, "上报事件的用户:" + result);
if (result != null &&
result.getResult() != null &&
result.getResult().getInfo() != null) {
V2XUserInfoRes.Result.Info infoBean = result.getResult().getInfo();
if (mUserInfo == null) {
mUserInfo = new MarkerUserInfo();
}
mUserInfo.setSn(infoBean.getSn());
try {
if (!TextUtils.isEmpty(infoBean.getCardIdAge())) {
mUserInfo.setAge(Integer.parseInt(infoBean.getCardIdAge()));
}
} catch (NumberFormatException e) {
e.printStackTrace();
}
mUserInfo.setUserName(infoBean.getUserNickName());
mUserInfo.setUserHead(infoBean.getHeadImgUrl());
mUserInfo.setGender(infoBean.getCardIdSex());
if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE) {
// 判断是否可以打电话
ChartingUtil.isCanCall(b -> {
if (b) {
// 判断是否可以打电话
ChartingUtil.isOnLine(mUserInfo.getSn(), b1 -> {
if (b1) {
ivRoadCallChart.setVisibility(VISIBLE);
} else {
ivRoadCallChart.setVisibility(GONE);
}
});
} else {
ivRoadCallChart.setVisibility(GONE);
}
});
}
if (!TextUtils.isEmpty(mUserInfo.getUserHead())) {
V2XServiceManager.getImageLoader()
.displayImage(mUserInfo.getUserHead(), ivReportHead);
}
}
}
@Override
public void onFail(String msg) {
ivRoadCallChart.setVisibility(GONE);
}
});
}
}
private void handlerZan(String sn) {
try {
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("已点赞", null);
showTip("已点赞");
V2XServiceManager.getV2XMarkerService()
.getV2XRefreshModel()
.giveLikeLiveVideo(null, sn);
ivReportHead.postDelayed(new Runnable() {
@Override
public void run() {
V2XRoadEventScenario.getInstance().close();
}
}, 2000);
} catch (Exception e) {
e.printStackTrace();
}
}
private void showTip(String msg) {
ToastUtils.setGravity(Gravity.CENTER, 0, 0);
View toastView = LayoutInflater.from(V2XServiceManager.getContext()).inflate(R.layout.toast_view, null);
TextView msgView = toastView.findViewById(R.id.tvFeedbackContent);
msgView.setText(msg);
ToastUtils.showCustomShort(toastView);
@Override
public void delayedCloseWindow() {
ivReportHead.postDelayed(() -> V2XRoadEventScenario.getInstance().close(), 2000);
}
}

View File

@@ -1,30 +1,19 @@
package com.mogo.module.v2x.adapter.holder;
import android.content.Intent;
import android.text.TextUtils;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.mogo.commons.voice.AIAssist;
import com.mogo.map.MogoLatLng;
import com.mogo.map.navi.IMogoNaviListener;
import com.mogo.map.navi.MogoNaviInfo;
import com.mogo.map.navi.MogoTraffic;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.MarkerLocation;
import com.mogo.module.common.entity.MarkerUserInfo;
import com.mogo.module.common.entity.V2XPushMessageEntity;
import com.mogo.module.v2x.R;
import com.mogo.module.v2x.V2XServiceManager;
import com.mogo.module.common.entity.V2XPushMessageEntity;
import com.mogo.module.v2x.scenario.scene.push.V2XPushEventScenario;
import com.mogo.module.v2x.utils.ChartingUtil;
import com.mogo.module.v2x.utils.ToastUtils;
import com.mogo.module.v2x.utils.V2XUtils;
import com.mogo.module.v2x.voice.V2XVoiceCallbackListener;
import com.mogo.module.v2x.voice.V2XVoiceConstants;
import com.mogo.module.v2x.voice.V2XVoiceManager;
@@ -40,7 +29,7 @@ import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
* desc : TODO 这里是前瞻演示需求,推送的消息,
* version: 1.0
*/
public class V2XPushEventDetailVH extends RecyclerView.ViewHolder implements IMogoNaviListener {
public class V2XPushEventDetailVH extends V2XBaseViewHolder {
private MogoImageView ivImg;
private MogoImageView ivReportHead;
@@ -55,28 +44,25 @@ public class V2XPushEventDetailVH extends RecyclerView.ViewHolder implements IMo
private MarkerUserInfo mUserInfo = new MarkerUserInfo();
private V2XPushMessageEntity mV2XRoadEventEntity;
private MarkerExploreWay mNoveltyInfo;
// 语音控制导航
private V2XVoiceCallbackListener mNaviCb = new V2XVoiceCallbackListener() {
@Override
public void onCallback(String command, Intent intent) {
startNavi();
}
};
private V2XVoiceCallbackListener mNaviCb = (command, intent) -> triggerStartNavi(mNoveltyInfo);
// 语音控制拨打电话
private V2XVoiceCallbackListener mCallChartingCb = new V2XVoiceCallbackListener() {
@Override
public void onCallback(String command, Intent intent) {
roadCallChart();
private V2XVoiceCallbackListener mCallChartingCb = (command, intent) -> {
try {
mUserInfo.setSn(mV2XRoadEventEntity.getSn());
mUserInfo.setUserHead(mV2XRoadEventEntity.getHeadImgUrl());
mUserInfo.setUserName("蘑菇用户");
mUserInfo.setGender("");
mUserInfo.setAge(30);
triggerCallChart(mNoveltyInfo);
} catch (Exception e) {
e.printStackTrace();
}
};
// 点赞语音回调
private V2XVoiceCallbackListener v2XVoiceCallbackLickListener = new V2XVoiceCallbackListener() {
@Override
public void onCallback(String command, Intent intent) {
handlerZan();
}
};
private V2XVoiceCallbackListener v2XVoiceCallbackLickListener = (command, intent) -> triggerZan(mNoveltyInfo);
public V2XPushEventDetailVH(ViewGroup viewGroup) {
super(LayoutInflater.from(viewGroup.getContext())
@@ -91,24 +77,20 @@ public class V2XPushEventDetailVH extends RecyclerView.ViewHolder implements IMo
ivRoadEventLike = itemView.findViewById(R.id.ivRoadEventLike);
ivRoadEventNav.getParent().getParent().requestDisallowInterceptTouchEvent(true);
ivRoadEventNav.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startNavi();
}
});
ivRoadCallChart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
roadCallChart();
}
});
ivRoadEventLike.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
handlerZan();
ivRoadEventNav.setOnClickListener(v -> triggerStartNavi(mNoveltyInfo));
ivRoadCallChart.setOnClickListener(v -> {
try {
mUserInfo.setSn(mV2XRoadEventEntity.getSn());
mUserInfo.setUserHead(mV2XRoadEventEntity.getHeadImgUrl());
mUserInfo.setUserName("蘑菇用户");
mUserInfo.setGender("");
mUserInfo.setAge(30);
triggerCallChart(mNoveltyInfo);
} catch (Exception e) {
e.printStackTrace();
}
});
ivRoadEventLike.setOnClickListener(v -> triggerZan(mNoveltyInfo));
// 设置视图状态监听
itemView.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() {
@@ -153,6 +135,14 @@ public class V2XPushEventDetailVH extends RecyclerView.ViewHolder implements IMo
public void initView(V2XPushMessageEntity v2XRoadEventEntity) {
mV2XRoadEventEntity = v2XRoadEventEntity;
mNoveltyInfo = new MarkerExploreWay();
mNoveltyInfo.setSn(mV2XRoadEventEntity.getSn());
mNoveltyInfo.setInfoId(mV2XRoadEventEntity.getSceneId());
MarkerLocation location = new MarkerLocation();
location.setLat(mV2XRoadEventEntity.getLat());
location.setLon(mV2XRoadEventEntity.getLon());
mNoveltyInfo.setLocation(location);
if (!TextUtils.isEmpty(v2XRoadEventEntity.getMsgImgUrl())) {
V2XServiceManager.getImageLoader()
.displayImage(v2XRoadEventEntity.getMsgImgUrl(), ivImg);
@@ -170,7 +160,6 @@ public class V2XPushEventDetailVH extends RecyclerView.ViewHolder implements IMo
ivRoadReportTrue.setVisibility(View.GONE);
ivRoadReportErr.setVisibility(View.GONE);
ivRoadEventLike.setVisibility(View.GONE);
break;
case "100017"://政府公告
@@ -179,119 +168,16 @@ public class V2XPushEventDetailVH extends RecyclerView.ViewHolder implements IMo
ivRoadEventNav.setVisibility(View.GONE);
ivRoadReportTrue.setVisibility(View.GONE);
ivRoadReportErr.setVisibility(View.GONE);
break;
}
}
/**
* 打电话
*/
private void roadCallChart() {
Logger.w(MODULE_NAME, "正在拨打电话。。。。");
if (mV2XRoadEventEntity != null) {
MarkerLocation location = new MarkerLocation();
location.setLon(mV2XRoadEventEntity.getLon());
location.setLat(mV2XRoadEventEntity.getLat());
mUserInfo.setSn(mV2XRoadEventEntity.getSn());
mUserInfo.setUserHead(mV2XRoadEventEntity.getHeadImgUrl());
mUserInfo.setUserName("蘑菇用户");
mUserInfo.setGender("");
mUserInfo.setAge(30);
ChartingUtil.callChatting(mUserInfo, location);
delayedCloseWindow();
}
}
/**
* 点赞
*/
private void handlerZan() {
try {
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("已点赞", null);
showTip("已点赞");
if (mV2XRoadEventEntity != null) {
V2XServiceManager.getV2XMarkerService()
.getV2XRefreshModel()
.giveLikeLiveVideo(null, mV2XRoadEventEntity.getSn());
}
delayedCloseWindow();
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 延迟关闭窗体
*/
private void delayedCloseWindow() {
itemView.postDelayed(new Runnable() {
@Override
public void run() {
V2XPushEventScenario.getInstance().close();
}
}, 1000);
}
/**
* 导航规划路线
*/
private void startNavi() {
if (mV2XRoadEventEntity != null) {
MogoLatLng endPoint = new MogoLatLng(mV2XRoadEventEntity.getLat(), mV2XRoadEventEntity.getLon());
V2XServiceManager.getNavi().naviTo(endPoint);
V2XServiceManager.getMogoRegisterCenter().unregisterMogoNaviListener(MODULE_NAME);
V2XServiceManager.getMogoRegisterCenter().registerMogoNaviListener(MODULE_NAME, this);
delayedCloseWindow();
}
}
private void showTip(String msg) {
ToastUtils.setGravity(Gravity.CENTER, 0, 0);
View toastView = LayoutInflater.from(V2XServiceManager.getContext()).inflate(R.layout.toast_view, null);
TextView msgView = toastView.findViewById(R.id.tvFeedbackContent);
msgView.setText(msg);
ToastUtils.showCustomShort(toastView);
}
@Override
public void onCalculateSuccess() {
V2XServiceManager.getNavi().startNavi(true);
public void delayedCloseWindow() {
itemView.postDelayed(() -> V2XPushEventScenario.getInstance().close(), 1000);
}
@Override
public void onInitNaviFailure() {
}
@Override
public void onInitNaviSuccess() {
}
@Override
public void onNaviInfoUpdate(MogoNaviInfo naviinfo) {
}
@Override
public void onStartNavi() {
}
@Override
public void onStopNavi() {
}
@Override
public void onoCalculateFailed() {
}
@Override
public void onUpdateTraffic(MogoTraffic traffic) {
}
}

View File

@@ -2,39 +2,29 @@ package com.mogo.module.v2x.adapter.holder;
import android.content.Intent;
import android.text.TextUtils;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.voice.AIAssist;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.MarkerLocation;
import com.mogo.module.common.entity.MarkerUserInfo;
import com.mogo.module.v2x.R;
import com.mogo.module.v2x.V2XConst;
import com.mogo.module.v2x.V2XServiceManager;
import com.mogo.module.v2x.entity.net.V2XUserInfoRes;
import com.mogo.module.common.entity.V2XEventShowEntity;
import com.mogo.module.common.entity.V2XLiveCarInfoEntity;
import com.mogo.module.common.entity.V2XMessageEntity;
import com.mogo.module.common.entity.V2XRoadEventEntity;
import com.mogo.module.common.entity.V2XWindowTypeEnum;
import com.mogo.module.v2x.R;
import com.mogo.module.v2x.V2XServiceManager;
import com.mogo.module.v2x.entity.net.V2XUserInfoRes;
import com.mogo.module.v2x.network.V2XRefreshCallback;
import com.mogo.module.v2x.scenario.scene.livecar.V2XRoadLiveCarScenario;
import com.mogo.module.v2x.scenario.scene.road.V2XRoadEventScenario;
import com.mogo.module.v2x.scenario.scene.road.V2XRoadEventWindow;
import com.mogo.module.v2x.utils.ChartingUtil;
import com.mogo.module.v2x.utils.EventTypeUtils;
import com.mogo.module.v2x.utils.RoadConditionUtils;
import com.mogo.module.v2x.utils.ToastUtils;
import com.mogo.module.v2x.utils.TrackUtils;
import com.mogo.module.v2x.utils.V2XUtils;
import com.mogo.module.v2x.voice.V2XVoiceCallbackListener;
import com.mogo.module.v2x.voice.V2XVoiceConstants;
import com.mogo.module.v2x.voice.V2XVoiceManager;
@@ -46,9 +36,7 @@ import com.mogo.utils.network.utils.GsonUtil;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
@@ -61,7 +49,7 @@ import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
* desc : 道路事件详情
* version: 1.0
*/
public class V2XRoadEventDetailVH extends RecyclerView.ViewHolder {
public class V2XRoadEventDetailVH extends V2XBaseViewHolder {
private MogoImageView ivEventImg;
private MogoImageView ivReportHead;
private ImageView ivEventPlay;
@@ -79,7 +67,7 @@ public class V2XRoadEventDetailVH extends RecyclerView.ViewHolder {
// 上传事件的用户信息
private MarkerUserInfo mUserInfo = new MarkerUserInfo();
private MarkerUserInfo mUserInfo;
// 当前的新鲜事儿信息
private MarkerExploreWay mNoveltyInfo;
private V2XRoadEventEntity mV2XRoadEventEntity;
@@ -89,28 +77,28 @@ public class V2XRoadEventDetailVH extends RecyclerView.ViewHolder {
private V2XVoiceCallbackListener v2XVoiceCallbackCallListener = new V2XVoiceCallbackListener() {
@Override
public void onCallback(String command, Intent intent) {
roadCallChart(mNoveltyInfo);
triggerCallChart(mNoveltyInfo);
}
};
// 点赞语音回调
private V2XVoiceCallbackListener v2XVoiceCallbackLickListener = new V2XVoiceCallbackListener() {
@Override
public void onCallback(String command, Intent intent) {
handlerZan(mNoveltyInfo);
triggerZan(mNoveltyInfo);
}
};
// 反馈"正确"语音回调
private V2XVoiceCallbackListener v2XVoiceCallbackReportTrueListener = new V2XVoiceCallbackListener() {
@Override
public void onCallback(String command, Intent intent) {
roadReportTrue(mNoveltyInfo);
triggerReportTrue(mNoveltyInfo);
}
};
// 反馈"错误"语音回调
private V2XVoiceCallbackListener v2XVoiceCallbackReportErrorListener = new V2XVoiceCallbackListener() {
@Override
public void onCallback(String command, Intent intent) {
roadReportErr(mNoveltyInfo);
triggerReportErr(mNoveltyInfo);
}
};
// 反馈"错误"语音回调
@@ -174,12 +162,13 @@ public class V2XRoadEventDetailVH extends RecyclerView.ViewHolder {
}
mV2XEventShowEntity = v2XEventShowEntity;
mV2XRoadEventEntity = v2XEventShowEntity.getV2XRoadEventEntity();
if (mV2XRoadEventEntity == null) {
return;
}
mNoveltyInfo = mV2XRoadEventEntity.getNoveltyInfo();
if (mNoveltyInfo != null) {
//Logger.d(MODULE_NAME, "mContentData" + mContentData);
mUserInfo = mNoveltyInfo.getUserInfo();
if (!ArrayUtils.isEmpty(mNoveltyInfo.getItems())) {
String imgUrl = mNoveltyInfo.getItems().get(0).getThumbnail();
if (TextUtils.isEmpty(imgUrl)) {
@@ -245,19 +234,18 @@ public class V2XRoadEventDetailVH extends RecyclerView.ViewHolder {
}
ivEventReportTrue.setOnClickListener(v -> {
roadReportTrue(mNoveltyInfo);
triggerReportTrue(mNoveltyInfo);
});
ivEventReportErr.setOnClickListener(v -> {
roadReportErr(mNoveltyInfo);
triggerReportErr(mNoveltyInfo);
});
ivEventCallChart.setOnClickListener(v -> {
ivEventCallChart.setVisibility(GONE);
roadCallChart(mNoveltyInfo);
triggerCallChart(mNoveltyInfo);
});
ivEventZan.setOnClickListener(v -> {
handlerZan(mNoveltyInfo);
triggerZan(mNoveltyInfo);
});
}
} catch (Exception e) {
e.printStackTrace();
@@ -294,6 +282,11 @@ public class V2XRoadEventDetailVH extends RecyclerView.ViewHolder {
}
}
/**
* 为了给车聊聊更多的信息需要重新查询一次
*
* @param noveltyInfo
*/
private void requestUserInfo(MarkerExploreWay noveltyInfo) {
Logger.d(MODULE_NAME, "上报事件的用户SN" + noveltyInfo.getSn());
// 获取道路事件周边的直播车机
@@ -322,6 +315,9 @@ public class V2XRoadEventDetailVH extends RecyclerView.ViewHolder {
mUserInfo.setUserHead(infoBean.getHeadImgUrl());
mUserInfo.setGender(infoBean.getCardIdSex());
// 重新设置用户信息
mNoveltyInfo.setUserInfo(mUserInfo);
if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE) {
// 判断是否可以打电话
ChartingUtil.isCanCall(b -> {
@@ -350,86 +346,17 @@ public class V2XRoadEventDetailVH extends RecyclerView.ViewHolder {
}
}
/**
* 打电话
*/
private void roadCallChart(MarkerExploreWay noveltyInfo) {
MarkerLocation location = new MarkerLocation();
mUserInfo.setSn(noveltyInfo.getSn());
ChartingUtil.callChatting(mUserInfo, location);
TrackUtils.trackV2xRoadEvent(noveltyInfo.getInfoId(), noveltyInfo.getUserInfo().getSn(), V2XConst.V2X_ROAD_CHAT);
}
/**
* 反馈路况错误
*/
private void roadReportErr(MarkerExploreWay noveltyInfo) {
if (noveltyInfo != null) {
RoadConditionUtils.sendDataErrorReceiverInfo(
noveltyInfo.getPoiType(),
noveltyInfo.getInfoId(),
"1");
TrackUtils.trackV2xRoadEvent(noveltyInfo.getInfoId(), noveltyInfo.getUserInfo().getSn(), V2XConst.V2X_ROAD_REPORT_ERROR);
}
delayedCloseWindow();
}
/**
* 反馈路况正确
*/
private void roadReportTrue(MarkerExploreWay noveltyInfo) {
if (noveltyInfo != null) {
RoadConditionUtils.sendDataErrorReceiverInfo(
noveltyInfo.getPoiType(),
noveltyInfo.getInfoId(),
"2");
TrackUtils.trackV2xRoadEvent(noveltyInfo.getInfoId(), noveltyInfo.getUserInfo().getSn(), V2XConst.V2X_ROAD_REPORT_RIGHT);
}
delayedCloseWindow();
}
/**
* 点赞
*/
private void handlerZan(MarkerExploreWay noveltyInfo) {
try {
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("已点赞", null);
showTip("已点赞");
if (noveltyInfo != null) {
V2XServiceManager.getV2XMarkerService()
.getV2XRefreshModel()
.giveLikeLiveVideo(null, noveltyInfo.getSn());
}
delayedCloseWindow();
} catch (Exception e) {
e.printStackTrace();
}
TrackUtils.trackV2xRoadEvent(noveltyInfo.getInfoId(), noveltyInfo.getUserInfo().getSn(), V2XConst.V2X_ROAD_ZAN);
}
/**
* 延迟关闭窗体
*/
private void delayedCloseWindow() {
itemView.postDelayed(new Runnable() {
@Override
public void run() {
// 移除窗体
V2XServiceManager
.getIMogoWindowManager()
.removeView(V2XRoadEventScenario.getInstance().getV2XWindow().getView());
V2XRoadEventScenario.getInstance().close();
}
@Override
public void delayedCloseWindow() {
itemView.postDelayed(() -> {
// 移除窗体
V2XServiceManager
.getIMogoWindowManager()
.removeView(V2XRoadEventScenario.getInstance().getV2XWindow().getView());
V2XRoadEventScenario.getInstance().close();
}, 1000);
}
private void showTip(String msg) {
ToastUtils.setGravity(Gravity.CENTER, 0, 0);
View toastView = LayoutInflater.from(V2XServiceManager.getContext()).inflate(R.layout.toast_view, null);
TextView msgView = toastView.findViewById(R.id.tvFeedbackContent);
msgView.setText(msg);
ToastUtils.showCustomShort(toastView);
}
}

View File

@@ -93,12 +93,12 @@ public class V2XScenarioManager implements IV2XScenarioManager {
mV2XScenario = V2XIllegalParkScenario.getInstance();
break;
default:
Logger.e(MODULE_NAME, "当前V2X消息类型未定义。");
ToastUtils.showLong("当前V2X消息类型未定义。");
return;
}
}
// 展示最新的消息
if (mV2XScenario != null) {
mV2XScenario.init(v2XMessageEntity);

View File

@@ -8,9 +8,9 @@ import android.view.View;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.mogo.module.common.entity.V2XPushMessageEntity;
import com.mogo.module.v2x.R;
import com.mogo.module.v2x.V2XServiceManager;
import com.mogo.module.common.entity.V2XPushMessageEntity;
import com.mogo.module.v2x.listener.V2XWindowStatusListener;
import com.mogo.module.v2x.scenario.view.IV2XWindow;
import com.mogo.module.v2x.view.TextureVideoView;
@@ -58,36 +58,38 @@ public class V2XAnimationWindow extends ConstraintLayout implements IV2XWindow<V
*/
@Override
public void show(V2XPushMessageEntity entity) {
Uri videoURI = null;
Uri videoUri = null;
switch (entity.getSceneId()) {
// 前车紧急制动告警
case "100005":
videoURI = Uri.parse("android.resource://" + getContext().getPackageName() + "/raw/" + R.raw.video_emergency_braking);
videoUri = Uri.parse("android.resource://" + getContext().getPackageName() + "/raw/" + R.raw.video_emergency_braking);
break;
// 十字路口碰撞预警
case "100006":
videoURI = Uri.parse("android.resource://" + getContext().getPackageName() + "/raw/" + R.raw.video_left_right_car);
videoUri = Uri.parse("android.resource://" + getContext().getPackageName() + "/raw/" + R.raw.video_left_right_car);
break;
// 岔路口碰撞预警
case "100007":
videoURI = Uri.parse("android.resource://" + getContext().getPackageName() + "/raw/" + R.raw.video_cut_in_line);
videoUri = Uri.parse("android.resource://" + getContext().getPackageName() + "/raw/" + R.raw.video_cut_in_line);
break;
// 禁行车道预警
case "100008":
videoURI = Uri.parse("android.resource://" + getContext().getPackageName() + "/raw/" + R.raw.video_current_row_closed);
videoUri = Uri.parse("android.resource://" + getContext().getPackageName() + "/raw/" + R.raw.video_current_row_closed);
break;
// 应急车辆优先通行
case "100012":
videoURI = Uri.parse("android.resource://" + getContext().getPackageName() + "/raw/" + R.raw.video_emergency_lane);
videoUri = Uri.parse("android.resource://" + getContext().getPackageName() + "/raw/" + R.raw.video_emergency_lane);
break;
// 闯红灯预警
case "100013":
videoURI = Uri.parse("android.resource://" + getContext().getPackageName() + "/raw/" + R.raw.video_traffic_light_speed_cut);
videoUri = Uri.parse("android.resource://" + getContext().getPackageName() + "/raw/" + R.raw.video_traffic_light_speed_cut);
break;
default:
Logger.e(MODULE_NAME, "未定义的类型:" + entity.getSceneId());
}
if (videoURI != null) {
vvCarAnimation.setVideoURI(videoURI);
if (videoUri != null) {
vvCarAnimation.setVideoURI(videoUri);
vvCarAnimation.setOnPreparedListener(mediaPlayer -> {
Logger.w(MODULE_NAME, "场景动画准备。。。。。");
});

View File

@@ -13,21 +13,30 @@ import java.util.Map;
public class TrackUtils {
//埋点
public static void trackV2xRoadShow(String dbid,String type, String style) {
Map<String, Object> properties = new HashMap<>();
properties.put("dbid", dbid);
properties.put("type", type);
properties.put("lng", V2XStatusManager.getInstance().getLocation().getLongitude());
properties.put("lat", V2XStatusManager.getInstance().getLocation().getLatitude());
properties.put("style", style);
V2XServiceManager.getMogoAnalytics().track(V2XConst.V2X_ROAD_SHOW, properties);
public static void trackV2xRoadShow(String dbid, String type, String style) {
try {
Map<String, Object> properties = new HashMap<>();
properties.put("dbid", dbid);
properties.put("type", type);
properties.put("lng", V2XStatusManager.getInstance().getLocation().getLongitude());
properties.put("lat", V2XStatusManager.getInstance().getLocation().getLatitude());
properties.put("style", style);
V2XServiceManager.getMogoAnalytics().track(V2XConst.V2X_ROAD_SHOW, properties);
} catch (Exception e) {
e.printStackTrace();
}
}
//道路事件操作埋点 v2x_road_event
public static void trackV2xRoadEvent(String dbid, String sn ,String type) {
Map<String, Object> properties = new HashMap<>();
properties.put("dbid", dbid);
properties.put("sn", sn);
properties.put("type", type);
V2XServiceManager.getMogoAnalytics().track(V2XConst.V2X_ROAD_EVET, properties);
public static void trackV2xRoadEvent(String dbid, String sn, String type) {
try {
Map<String, Object> properties = new HashMap<>();
properties.put("dbid", dbid);
properties.put("sn", sn);
properties.put("type", type);
V2XServiceManager.getMogoAnalytics().track(V2XConst.V2X_ROAD_EVET, properties);
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 508 B

After

Width:  |  Height:  |  Size: 508 B

View File

Before

Width:  |  Height:  |  Size: 273 B

After

Width:  |  Height:  |  Size: 273 B

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Some files were not shown because too many files have changed in this diff Show More