diff --git a/OCH/taxi/passenger/src/main/java/com/mogo/och/taxi/passenger/ui/video/InfoVideoView.kt b/OCH/taxi/passenger/src/main/java/com/mogo/och/taxi/passenger/ui/video/InfoVideoView.kt index e521cfbc50..7602c873c7 100644 --- a/OCH/taxi/passenger/src/main/java/com/mogo/och/taxi/passenger/ui/video/InfoVideoView.kt +++ b/OCH/taxi/passenger/src/main/java/com/mogo/och/taxi/passenger/ui/video/InfoVideoView.kt @@ -50,6 +50,13 @@ internal class InfoVideoView @JvmOverloads constructor( private val arrayListOf by lazy { arrayListOf().apply { + add( + TaxiPassengerVideoPlay( + "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", + "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png", + "蘑菇车联牵手成都大运会" + ) + ) add(TaxiPassengerVideoPlay( "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v", "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969511280/车队.png", @@ -60,13 +67,6 @@ internal class InfoVideoView @JvmOverloads constructor( "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png", "蘑菇车联之红旗车队" )) - add( - TaxiPassengerVideoPlay( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png", - "蘑菇车联牵手成都大运会" - ) - ) add( TaxiPassengerVideoPlay( "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v", diff --git a/OCH/taxi/passenger/src/main/res/drawable-nodpi/taxi_p_location_center.png b/OCH/taxi/passenger/src/main/res/drawable-nodpi/taxi_p_location_center.png index 2aa805a7c2..c2cdfb3af7 100644 Binary files a/OCH/taxi/passenger/src/main/res/drawable-nodpi/taxi_p_location_center.png and b/OCH/taxi/passenger/src/main/res/drawable-nodpi/taxi_p_location_center.png differ diff --git a/OCH/taxi/passenger/src/main/res/drawable-nodpi/taxi_p_video_light_bg.png b/OCH/taxi/passenger/src/main/res/drawable-nodpi/taxi_p_video_light_bg.png index c155138868..12b53e07c4 100644 Binary files a/OCH/taxi/passenger/src/main/res/drawable-nodpi/taxi_p_video_light_bg.png and b/OCH/taxi/passenger/src/main/res/drawable-nodpi/taxi_p_video_light_bg.png differ diff --git a/OCH/taxi/passenger/src/main/res/layout/taxi_p_video_item_light.xml b/OCH/taxi/passenger/src/main/res/layout/taxi_p_video_item_light.xml index 556108ce67..b16508d353 100644 --- a/OCH/taxi/passenger/src/main/res/layout/taxi_p_video_item_light.xml +++ b/OCH/taxi/passenger/src/main/res/layout/taxi_p_video_item_light.xml @@ -10,8 +10,8 @@ android:layout_height="match_parent" android:layout_gravity="center" app:bgColor="#00000000" - app:blurRadius="@dimen/dp_36" - app:shadowColor="#80121526" + app:blurRadius="@dimen/dp_30" + app:shadowColor="#A63F5388" app:shadowRadius="@dimen/dp_54" app:shadow_position="outer" app:xOffset="0dp" diff --git a/OCH/taxi/unmanned-passenger/src/main/res/drawable-nodpi/taxt_u_p_location_center.png b/OCH/taxi/unmanned-passenger/src/main/res/drawable-nodpi/taxt_u_p_location_center.png index 2aa805a7c2..c2cdfb3af7 100644 Binary files a/OCH/taxi/unmanned-passenger/src/main/res/drawable-nodpi/taxt_u_p_location_center.png and b/OCH/taxi/unmanned-passenger/src/main/res/drawable-nodpi/taxt_u_p_location_center.png differ diff --git a/OCH/taxi/unmanned-passenger/src/main/res/drawable-nodpi/taxt_u_p_video_light_bg.webp b/OCH/taxi/unmanned-passenger/src/main/res/drawable-nodpi/taxt_u_p_video_light_bg.webp index 2d3e1d61cd..a4c8aa81f0 100644 Binary files a/OCH/taxi/unmanned-passenger/src/main/res/drawable-nodpi/taxt_u_p_video_light_bg.webp and b/OCH/taxi/unmanned-passenger/src/main/res/drawable-nodpi/taxt_u_p_video_light_bg.webp differ diff --git a/OCH/taxi/unmanned-passenger/src/main/res/layout/taxt_u_p_list_video_item_light.xml b/OCH/taxi/unmanned-passenger/src/main/res/layout/taxt_u_p_list_video_item_light.xml index a53dc544a0..49a89ea5b7 100644 --- a/OCH/taxi/unmanned-passenger/src/main/res/layout/taxt_u_p_list_video_item_light.xml +++ b/OCH/taxi/unmanned-passenger/src/main/res/layout/taxt_u_p_list_video_item_light.xml @@ -10,8 +10,8 @@ android:layout_height="match_parent" android:layout_gravity="center" app:bgColor="#00000000" - app:blurRadius="@dimen/dp_36" - app:shadowColor="#80121526" + app:blurRadius="@dimen/dp_30" + app:shadowColor="#A63F5388" app:shadowRadius="@dimen/dp_54" app:shadow_position="outer" app:xOffset="0dp" diff --git a/app/config/MediaUrlConfig.json b/app/config/MediaUrlConfig.json index 79a9a68e02..42e23e8896 100644 --- a/app/config/MediaUrlConfig.json +++ b/app/config/MediaUrlConfig.json @@ -146,6 +146,12 @@ }, "taxiunmannedpassengerochdfhq": { "medias": [ + { + "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", + "fileType": 2, + "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png", + "title": "蘑菇车联牵手成都大运会" + }, { "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v", "fileType": 2, @@ -158,12 +164,6 @@ "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png", "title": "蘑菇车联之红旗车队" }, - { - "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", - "fileType": 2, - "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png", - "title": "蘑菇车联牵手成都大运会" - }, { "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v", "fileType": 2, @@ -174,6 +174,12 @@ }, "charterpassengerochm1": { "medias": [ + { + "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", + "fileType": 2, + "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png", + "title": "蘑菇车联牵手成都大运会" + }, { "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v", "fileType": 2, @@ -186,12 +192,6 @@ "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png", "title": "蘑菇车联之红旗车队" }, - { - "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", - "fileType": 2, - "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png", - "title": "蘑菇车联牵手成都大运会" - }, { "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v", "fileType": 2, @@ -348,6 +348,12 @@ }, "taxiunmannedpassengerochdfhq": { "medias": [ + { + "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", + "fileType": 2, + "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png", + "title": "蘑菇车联牵手成都大运会" + }, { "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v", "fileType": 2, @@ -360,12 +366,6 @@ "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png", "title": "蘑菇车联之红旗车队" }, - { - "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", - "fileType": 2, - "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png", - "title": "蘑菇车联牵手成都大运会" - }, { "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v", "fileType": 2, @@ -376,6 +376,12 @@ }, "charterpassengerochm1": { "medias": [ + { + "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", + "fileType": 2, + "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png", + "title": "蘑菇车联牵手成都大运会" + }, { "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v", "fileType": 2, @@ -388,12 +394,6 @@ "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png", "title": "蘑菇车联之红旗车队" }, - { - "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", - "fileType": 2, - "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png", - "title": "蘑菇车联牵手成都大运会" - }, { "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v", "fileType": 2, @@ -454,6 +454,12 @@ }, "taxiunmannedpassengerochdfhq": { "medias": [ + { + "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", + "fileType": 2, + "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png", + "title": "蘑菇车联牵手成都大运会" + }, { "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v", "fileType": 2, @@ -466,12 +472,6 @@ "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png", "title": "蘑菇车联之红旗车队" }, - { - "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", - "fileType": 2, - "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png", - "title": "蘑菇车联牵手成都大运会" - }, { "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v", "fileType": 2, @@ -482,6 +482,12 @@ }, "charterpassengerochm1": { "medias": [ + { + "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", + "fileType": 2, + "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png", + "title": "蘑菇车联牵手成都大运会" + }, { "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v", "fileType": 2, @@ -494,12 +500,6 @@ "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png", "title": "蘑菇车联之红旗车队" }, - { - "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", - "fileType": 2, - "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png", - "title": "蘑菇车联牵手成都大运会" - }, { "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v", "fileType": 2, @@ -656,6 +656,12 @@ }, "taxiunmannedpassengerochdfhq": { "medias": [ + { + "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", + "fileType": 2, + "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png", + "title": "蘑菇车联牵手成都大运会" + }, { "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v", "fileType": 2, @@ -668,12 +674,6 @@ "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png", "title": "蘑菇车联之红旗车队" }, - { - "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", - "fileType": 2, - "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png", - "title": "蘑菇车联牵手成都大运会" - }, { "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v", "fileType": 2, @@ -684,6 +684,12 @@ }, "charterpassengerochm1": { "medias": [ + { + "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", + "fileType": 2, + "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png", + "title": "蘑菇车联牵手成都大运会" + }, { "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v", "fileType": 2, @@ -696,12 +702,6 @@ "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png", "title": "蘑菇车联之红旗车队" }, - { - "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", - "fileType": 2, - "coverImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png", - "title": "蘑菇车联牵手成都大运会" - }, { "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v", "fileType": 2, diff --git a/app/src/block/java/com/mogo/launcher/lancet/jank/ui/UiPostLancet.kt b/app/src/block/java/com/mogo/launcher/lancet/jank/ui/UiPostLancet.kt index f45b8f5750..4b8add0333 100644 --- a/app/src/block/java/com/mogo/launcher/lancet/jank/ui/UiPostLancet.kt +++ b/app/src/block/java/com/mogo/launcher/lancet/jank/ui/UiPostLancet.kt @@ -1,6 +1,7 @@ package com.mogo.launcher.lancet.jank.ui import android.app.Activity +import android.os.SystemClock import android.view.View import com.knightboost.lancet.api.Scope import com.knightboost.lancet.api.annotations.Group @@ -10,11 +11,28 @@ import com.knightboost.lancet.api.annotations.TargetMethod import com.knightboost.lancet.api.annotations.Weaver import com.mogo.eagle.core.block.runtime.message.Message import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager +import com.mogo.launcher.R @Weaver @Group("main_block_check") class UiPostLancet { + + class ActionWrapper(private val extra:Map, private val delegate: Runnable): Runnable { + + override fun run() { + val startTime = SystemClock.uptimeMillis() + try { + delegate.run() + } finally { + val duration = SystemClock.uptimeMillis() - startTime + CallerDevaToolsManager.block()?.takeIf { + it.hasInit() + }?.recorder()?.recycle(Message.acquire(handler = null, action = delegate, duration = duration, extra = extra)) + } + } + } + companion object { @JvmStatic @@ -22,12 +40,13 @@ class UiPostLancet { @TargetMethod(methodName = "runOnUiThread") @ReplaceInvoke fun runOnUiThreadOfActivity(activity: Activity, action: Runnable) { + val extra = mapOf(activity.javaClass.name to "runOnUiThread") try { - activity.runOnUiThread(action) + activity.runOnUiThread(ActionWrapper(extra, action)) } finally { CallerDevaToolsManager.block()?.takeIf { it.hasInit() - }?.recorder()?.insert(Message.acquire(handler = null, action = action, extra = mapOf(activity.javaClass.name to "runOnUiThread"))) + }?.recorder()?.insert(Message.acquire(handler = null, action = action, extra = extra)) } } @@ -36,12 +55,20 @@ class UiPostLancet { @TargetMethod(methodName = "post") @ReplaceInvoke fun post(view: View, action: Runnable): Boolean { - return try { - view.post(action) + val extra = mapOf(view.javaClass.name to "post") + try { + var map = view.getTag(R.id.action_wrapper_tag_id) as? HashMap + if (map == null) { + map = HashMap() + view.setTag(R.id.action_wrapper_tag_id, map) + } + val wrapper = ActionWrapper(extra, action) + map[action] = wrapper + return view.post(wrapper) } finally { CallerDevaToolsManager.block()?.takeIf { it.hasInit() - }?.recorder()?.insert(Message.acquire(handler = null, action = action, extra = mapOf(view.javaClass.name to "post"))) + }?.recorder()?.insert(Message.acquire(handler = null, action = action, extra = extra)) } } @@ -50,12 +77,20 @@ class UiPostLancet { @TargetMethod(methodName = "postDelayed") @ReplaceInvoke fun postDelayed(view: View, action: Runnable, delayMillis: Long): Boolean { - return try { - view.postDelayed(action, delayMillis) + val extra = mapOf(view.javaClass.name to "postDelayed") + try { + var map = view.getTag(R.id.action_wrapper_tag_id) as? HashMap + if (map == null) { + map = HashMap() + view.setTag(R.id.action_wrapper_tag_id, map) + } + val wrapper = ActionWrapper(extra, action) + map[action] = wrapper + return view.postDelayed(wrapper, delayMillis) } finally { CallerDevaToolsManager.block()?.takeIf { it.hasInit() - }?.recorder()?.insert(Message.acquire(handler = null, action = action, delay = delayMillis, extra = mapOf(view.javaClass.name to "postDelayed"))) + }?.recorder()?.insert(Message.acquire(handler = null, action = action, delay = delayMillis, extra = extra)) } } @@ -64,8 +99,14 @@ class UiPostLancet { @TargetMethod(methodName = "removeCallbacks") @ReplaceInvoke fun removeCallbacks(view: View, action: Runnable): Boolean { - return try { - view.removeCallbacks(action) + try { + val tag = view.getTag(R.id.action_wrapper_tag_id) + if (tag != null && tag is HashMap<*, *>) { + (tag.remove(action) as? Runnable)?.also { + return view.removeCallbacks(it) + } + } + return false } finally { CallerDevaToolsManager.block()?.takeIf { it.hasInit() diff --git a/config.gradle b/config.gradle index bb0e778323..13f02464d7 100644 --- a/config.gradle +++ b/config.gradle @@ -228,7 +228,7 @@ ext { passport_secret : "com.zhidaoauto:sdk-java:1.0.5-SNAPSHOT", // 主线程卡顿监测 - block_detector : "com.mogo.eagle.core.block:runtime:10.90.50", + block_detector : "com.mogo.eagle.core.block:runtime:10.90.60", //======================== google auto-service =============== google_auto_service : "com.google.auto.service:auto-service:1.0-rc7", diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XAiRoadEventMarker.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XAiRoadEventMarker.kt index 9f5bdca951..87737bc785 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XAiRoadEventMarker.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XAiRoadEventMarker.kt @@ -25,7 +25,7 @@ class V2XAiRoadEventMarker { .Builder(V2XConst.V2X_MARKER_OWNER, Level.MAP_MARKER) .longitude(entity.location.lon) .latitude(entity.location.lat) - .scale(if (EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU.poiType == entity.poiType && AppIdentityModeUtils.isTaxi( + .scale(if (EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU.poiType == entity.poiType && AppIdentityModeUtils.isTaxiPassenger( FunctionBuildConfig.appIdentityMode)) 0.6f else 1.0f) .icon3DRes(EventTypeEnumNew.getMarker3DRes(entity.poiType)) .set3DMode(true) diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventMarker.java b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventMarker.java index cda673686c..c04fe1fcb6 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventMarker.java +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventMarker.java @@ -58,7 +58,7 @@ public class V2XRoadEventMarker implements IV2XMarker { .longitude(entity.getLocation().getLon()) .latitude(entity.getLocation().getLat()) .set3DMode(true) - .scale(EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU.getPoiType().equals(entity.getPoiType()) && AppIdentityModeUtils.isTaxi( + .scale(EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU.getPoiType().equals(entity.getPoiType()) && AppIdentityModeUtils.isTaxiPassenger( FunctionBuildConfig.appIdentityMode) ? 0.6f : 1.0f) .icon3DRes(EventTypeEnumNew.getMarker3DRes(entity.getPoiType())).build(),DEFAULT); if (point != null) { diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/RouteOverlayDrawer.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/RouteOverlayDrawer.java index e0f1da6702..1e461cdb7e 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/RouteOverlayDrawer.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/RouteOverlayDrawer.java @@ -8,15 +8,23 @@ import android.os.Handler; import android.os.HandlerThread; import android.util.Log; import androidx.core.util.Pools; + +import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.map.MogoLatLng; import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager; import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager; +import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils; import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils; import com.mogo.map.overlay.IMoGoOverlayManager; import com.mogo.map.overlay.core.Level; import com.mogo.map.overlay.line.Polyline; +import com.zhidaoauto.map.sdk.open.tools.MapTools; + +import java.util.ArrayList; import java.util.LinkedList; import java.util.List; + +import kotlin.Pair; import mogo.telematics.pad.MessagePad; public class RouteOverlayDrawer { @@ -32,6 +40,9 @@ public class RouteOverlayDrawer { private static final int COLOR_LIGHT = Color.parseColor("#BAEBF5"); + //用于taxi乘客屏渐变颜色集合 + private static List colors = null; + private RouteOverlayDrawer() { // 渐变色 mogoOverlayManager = CallerMapUIServiceManager.INSTANCE.getOverlayManager(); @@ -110,7 +121,25 @@ public class RouteOverlayDrawer { isExcept = true; return; } - RouteStrategy.INSTANCE.start(); + boolean isColorfulStrategy = !AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) || !AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode); + if (isColorfulStrategy) { + RouteStrategy.INSTANCE.start(); + } else { + if (colors == null) { + ArrayList> temps = new ArrayList<>(); + temps.add(new Pair<>(0, 51)); + temps.add(new Pair<>(10, 102)); + temps.add(new Pair<>(30, 51)); + temps.add(new Pair<>(100, 0)); + List alphas = MapTools.INSTANCE.getColorAlpha(temps); + if (alphas != null && !alphas.isEmpty()) { + colors = new ArrayList<>(); + for (int i : alphas) { + colors.add(Color.argb(i, 48,203,251)); + } + } + } + } for (int i = 0; i < total; i++) { MessagePad.TrajectoryPoint route = null; try { @@ -137,7 +166,9 @@ public class RouteOverlayDrawer { acquire.acc = route.getAcceleration(); acquire.speed = route.getVelocity(); pps.add(acquire); - RouteStrategy.INSTANCE.check(route.getVelocity(), route.getAcceleration(), routeList.size()); + if (isColorfulStrategy) { + RouteStrategy.INSTANCE.check(route.getVelocity(), route.getAcceleration(), routeList.size()); + } } double lon = CallerChassisLocationWGS84ListenerManager.INSTANCE.getChassisLocationWGS84().getLongitude(); double lat = CallerChassisLocationWGS84ListenerManager.INSTANCE.getChassisLocationWGS84().getLatitude(); @@ -155,7 +186,9 @@ public class RouteOverlayDrawer { lat = CallerChassisLocationWGS84ListenerManager.INSTANCE.getChassisLocationWGS84().getLatitude(); long angle = isPointOnCarFront(lon, lat, bearing, first.lon, first.lat); if (angle >= 90) { - RouteStrategy.INSTANCE.remove(first.acc); + if (isColorfulStrategy) { + RouteStrategy.INSTANCE.remove(first.acc); + } pools.release(first); points.poll(); } @@ -173,10 +206,7 @@ public class RouteOverlayDrawer { self.lon = lon; } points.addFirst(self); - RouteStrategy.INSTANCE.end(); - Strategy strategy = RouteStrategy.INSTANCE.getStrategy(); - List colors = strategy.getColors(); - boolean isLightOn = strategy instanceof ColorfulStrategy && ((ColorfulStrategy) strategy).isLightOn(); + Polyline.Options.Builder builder; if (mPolylineOptions == null) { builder = new Polyline.Options.Builder("router_overlay", Level.GUIDE_ROUTE_LINE) @@ -186,15 +216,24 @@ public class RouteOverlayDrawer { } else { builder = mPolylineOptions.builder(); } - builder.points(points); - builder.colors(colors); - if (isLightOn) { - builder.setLightOn(true); + + if (isColorfulStrategy) { + RouteStrategy.INSTANCE.end(); + Strategy strategy = RouteStrategy.INSTANCE.getStrategy(); + List colors = strategy.getColors(); + boolean isLightOn = strategy instanceof ColorfulStrategy && ((ColorfulStrategy) strategy).isLightOn(); + builder.colors(colors); + builder.setLightOn(isLightOn); builder.setLightColor(COLOR_LIGHT); builder.setLightSpeed(0.5f); - } else { - builder.setLightOn(false); + } else { + if (colors != null && !colors.isEmpty()) { + builder.colors(colors); + builder.setIsGradient(true); + builder.setLightOn(false); + } } + builder.points(points); builder.setVisible(true); Polyline.Options options = builder.build(); if (mPolylineOptions == null) { diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt index 5c9b981be8..7706c91269 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnumNew.kt @@ -740,7 +740,7 @@ enum class EventTypeEnumNew( TYPE_SOCKET_ROAD_SHIGONG.poiType -> R.raw.v2x_shigong_warning// 施工气泡 TYPE_SOCKET_ROAD_JINGZHI.poiType -> R.raw.v2x_zhangai TYPE_SOCKET_ROAD_SHIGU.poiType -> { - if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) { + if (AppIdentityModeUtils.isTaxiPassenger(FunctionBuildConfig.appIdentityMode)) { R.raw.v2x_shigu_sanjiaopai } else { R.raw.taxi_sanjiaopai diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/TrafficTypeEnum.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/TrafficTypeEnum.kt index 0f25dfee53..e0fd288f8d 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/TrafficTypeEnum.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/TrafficTypeEnum.kt @@ -124,7 +124,7 @@ enum class TrafficTypeEnum( @JvmStatic fun getMarker3DRes(type: Int): Int { // Taxi和Bus使用不同的模型 - if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) { + if (AppIdentityModeUtils.isTaxiPassenger(FunctionBuildConfig.appIdentityMode)) { return when (type) { TYPE_TRAFFIC_ID_WEI_ZHI.type -> R.raw.traffic_xiankuang TYPE_TRAFFIC_ID_PEOPLE.type -> R.raw.taxi_traffic_people @@ -158,7 +158,7 @@ enum class TrafficTypeEnum( @JvmStatic fun getMarkerNight3DRes(type: Int): Int { // Taxi和Bus使用不同的模型 - if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) { + if (AppIdentityModeUtils.isTaxiPassenger(FunctionBuildConfig.appIdentityMode)) { return when (type) { TYPE_TRAFFIC_ID_WEI_ZHI.type -> R.raw.traffic_xiankuang TYPE_TRAFFIC_ID_PEOPLE.type -> R.raw.taxi_traffic_people diff --git a/core/mogo-core-res/src/main/res/values/ids.xml b/core/mogo-core-res/src/main/res/values/ids.xml index 07e922177b..95e122fa17 100644 --- a/core/mogo-core-res/src/main/res/values/ids.xml +++ b/core/mogo-core-res/src/main/res/values/ids.xml @@ -4,4 +4,5 @@ + \ No newline at end of file diff --git a/libraries/mapmodule/src/main/java/com/autonavi/nge/map/MapView.kt b/libraries/mapmodule/src/main/java/com/autonavi/nge/map/MapView.kt index c162267d53..33c328990b 100644 --- a/libraries/mapmodule/src/main/java/com/autonavi/nge/map/MapView.kt +++ b/libraries/mapmodule/src/main/java/com/autonavi/nge/map/MapView.kt @@ -1083,13 +1083,13 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr private var isScroll = true //可以斜滑 - private var isFling = true + private var isFling = false //可以旋转 - private var isRotate = true + private var isRotate = false //可以缩放 - private var isCanZoom = true + private var isCanZoom = false private var isVr = true diff --git a/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/inner/road/RoadHelper.kt b/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/inner/road/RoadHelper.kt index 3fe85ab91f..2ea1d605f5 100644 --- a/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/inner/road/RoadHelper.kt +++ b/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/inner/road/RoadHelper.kt @@ -517,13 +517,15 @@ class RoadHelper private constructor() { roadRectInfos.angle = buf.long / 1e8 val rectList = ArrayList() val size = buf.int - for (i in 0 until size step 8) { - val rect = RoadRect() - rect.topLeft = LonLatPoint(buf.long / 1e8, buf.long / 1e8) - rect.topRight = LonLatPoint(buf.long / 1e8, buf.long / 1e8) - rect.bottomLeft = LonLatPoint(buf.long / 1e8, buf.long / 1e8) - rect.bottomRight = LonLatPoint(buf.long / 1e8, buf.long / 1e8) - rectList.add(rect) + if(size > 0 && size % 8 == 0) { + for (i in 0 until size step 8) { + val rect = RoadRect() + rect.topLeft = LonLatPoint(buf.long / 1e8, buf.long / 1e8) + rect.topRight = LonLatPoint(buf.long / 1e8, buf.long / 1e8) + rect.bottomLeft = LonLatPoint(buf.long / 1e8, buf.long / 1e8) + rect.bottomRight = LonLatPoint(buf.long / 1e8, buf.long / 1e8) + rectList.add(rect) + } } roadRectInfos.roadRects = rectList if (CompileConfig.DEBUG) { diff --git a/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/open/view/MapAutoView.kt b/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/open/view/MapAutoView.kt index 2b07edd8db..58bc5cdd24 100644 --- a/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/open/view/MapAutoView.kt +++ b/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/open/view/MapAutoView.kt @@ -186,7 +186,7 @@ open class MapAutoView : FrameLayout, LonLatPointListener, ITraffic,ILockLocatio val isWeatherEnable = typedArray.getBoolean(R.styleable.MapAutoView_isWeatherEnable, true) val locationIcon3DRes = typedArray.getResourceId(R.styleable.MapAutoView_locationIcon3DRes, R.raw.car) val locationIconRes = typedArray.getResourceId(R.styleable.MapAutoView_locationIconRes, R.mipmap.map_custom_self_car_night) - val isDisplayAnim = typedArray.getBoolean(R.styleable.MapAutoView_isDisplayAnim, false) + val isDisplayAnim = typedArray.getBoolean(R.styleable.MapAutoView_isDisplayAnim, true) typedArray.recycle() val mapStyleParams = MapStyleParams() mapStyleParams.setZoom(zoom) diff --git a/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/open/view/MapStyleParams.kt b/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/open/view/MapStyleParams.kt index 27aaa3710c..c97ec09675 100644 --- a/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/open/view/MapStyleParams.kt +++ b/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/open/view/MapStyleParams.kt @@ -101,7 +101,7 @@ class MapStyleParams: IMapStyleParams { private var isWeatherEnable = false //是否使用光圈 - private var isDisplayAnim = false + private var isDisplayAnim = true companion object { diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/uicontroller/VisualAngleMode.kt b/libraries/mogo-map-api/src/main/java/com/mogo/map/uicontroller/VisualAngleMode.kt index 5d8a37aac7..6d6e1e1116 100644 --- a/libraries/mogo-map-api/src/main/java/com/mogo/map/uicontroller/VisualAngleMode.kt +++ b/libraries/mogo-map-api/src/main/java/com/mogo/map/uicontroller/VisualAngleMode.kt @@ -37,7 +37,22 @@ enum class VisualAngleMode(val code: Int) : IMogoMapVisualAngle { /** * 漫游模式 */ - MAP_STYLE_VR_ROMA(7); + MAP_STYLE_VR_ROMA(7), + + /** + * 过渡模式 + */ + MAP_STYLE_VR_TRANS(8), + + /** + * 洱海模式 + */ + MAP_STYLE_VR_ERHAI_B2(9), + + /** + * 天空盒模式 + */ + MAP_STYLE_VR_SKY_BOX(10); override val isLongSight: Boolean get() = code == MODE_LONG_SIGHT.code diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.kt b/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.kt index 54f99a6dcc..0da5592f5b 100644 --- a/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.kt +++ b/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.kt @@ -10,6 +10,7 @@ import android.text.TextUtils import android.view.MotionEvent import android.view.View import com.autonavi.nge.map.OnMapScreenShotListener +import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.deva.chain.ChainConstant import com.mogo.eagle.core.data.enums.TrafficTypeEnum import com.mogo.eagle.core.data.map.MogoLatLng @@ -22,6 +23,7 @@ import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager.invoke import com.mogo.eagle.core.function.call.map.CallerMapRomaListener.invokeMapRomaRange import com.mogo.eagle.core.function.call.map.CallerMapRomaListener.invokeMapRomaStatus import com.mogo.eagle.core.function.call.map.CallerMapScreenListenerManager +import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.i @@ -64,7 +66,7 @@ import kotlin.properties.Delegates class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIController, OnMapLoadedListener, OnMapClickListener, OnMapTouchListener, OnMarkClickListener, OnMapStyleListener, OnMapViewVisualAngleChangeListener, OnRoadInfoListener, - ILog, OnRoamStatusListener, OnRoadSideFenceRegionListener,OnMapScreenShotListener { + ILog, OnRoamStatusListener, OnRoadSideFenceRegionListener, OnMapScreenShotListener { companion object { private const val TAG = "AMapViewWrapper" @@ -126,7 +128,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle mMapView.setOnRoamStatusListener(this) mMapView.setOnMapViewVisualAngleChangeListener(this) mMapView.setOnRoadInfoListener(this, 1) - mMapView.setOnRoadSideFenceRegionListener(this,5000) + mMapView.setOnRoadSideFenceRegionListener(this, 5000) mMapView.registerScreenListener(this) registerLogListener(this, mMapView.getEventController()) d(M_MAP + TAG, "initListeners - setOnMapStyleListener - view $mMapView") @@ -197,7 +199,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle override fun onMapLoaded() { i(M_MAP + TAG, "onMapLoaded: ") if (checkAMapView()) { - val hdVisibleArray = intArrayOf( + val hdVisibleArray = arrayListOf( HDTypes.DIVIDER.type, HDTypes.ROAD_AREA.type, HDTypes.STOP_LINE.type, @@ -216,8 +218,16 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle HDTypes.regional.type, HDTypes.geometricLinear.type, HDTypes.geometricSurface.type, - HDTypes.poi.type) - mMapView.getMapAutoViewHelper()!!.setHDTypeVisible(hdVisibleArray) + HDTypes.poi.type + ) + if (AppIdentityModeUtils.isTaxiPassenger( + FunctionBuildConfig.appIdentityMode + ) + ) { + hdVisibleArray.add(HDTypes.CABLE.type) + hdVisibleArray.add(HDTypes.SIGNAL_LINE.type) + } + mMapView.getMapAutoViewHelper()!!.setHDTypeVisible(hdVisibleArray.toIntArray()) loadPreVehicleModel() } } @@ -610,7 +620,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle if (count >= 3) { return@post } - handler.postDelayed({ changeCurrentIcon(iconId) },300L) + handler.postDelayed({ changeCurrentIcon(iconId) }, 300L) reChangeIconCount.set(0) } } @@ -656,15 +666,19 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle MapAutoApi.MAP_STYLE_DAY, MapAutoApi.MAP_STYLE_DAY_NAV -> { mCurrentUI = EnumMapUI.MAP_STYLE_DAY_NAV } + MapAutoApi.MAP_STYLE_NIGHT -> { mCurrentUI = EnumMapUI.MAP_STYLE_NIGHT } + MapAutoApi.MAP_STYLE_NIGHT_NAV -> { mCurrentUI = EnumMapUI.MAP_STYLE_NIGHT_NAV } + MapAutoApi.MAP_STYLE_NIGHT_VR -> { mCurrentUI = EnumMapUI.MAP_STYLE_NIGHT_VR } + MapAutoApi.MAP_STYLE_DAY_VR -> { mCurrentUI = EnumMapUI.MAP_STYLE_DAY_VR } @@ -753,9 +767,15 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle private fun addPreVehicleModelWeiZhi(typeTrafficId: TrafficTypeEnum, logMsg: String) { // 根据当前的地图皮肤模式动态替换 val preVehicleStrWeiZhi: String? = if (isDayMode) { - map.addPreVehicleModel(typeTrafficId.type, TrafficTypeEnum.getMarker3DRes(typeTrafficId.type)) + map.addPreVehicleModel( + typeTrafficId.type, + TrafficTypeEnum.getMarker3DRes(typeTrafficId.type) + ) } else { - map.addPreVehicleModel(typeTrafficId.type, TrafficTypeEnum.getMarkerNight3DRes(typeTrafficId.type)) + map.addPreVehicleModel( + typeTrafficId.type, + TrafficTypeEnum.getMarkerNight3DRes(typeTrafficId.type) + ) } d(M_MAP + TAG, logMsg + preVehicleStrWeiZhi) if (preVehicleStrWeiZhi == null) { @@ -893,7 +913,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle } override fun getMapScreenShot() { - if(checkAMapView()){ + if (checkAMapView()) { mMapView.getMapAutoViewHelper()?.toScreen() } } @@ -905,6 +925,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle } return MODE_MEDIUM_SIGHT } + /** * 高精地图屏幕截图 */