From 47acf3e503ab8f6469a8243e31ae3a443c21b622 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Fri, 7 Apr 2023 10:10:30 +0800 Subject: [PATCH 1/6] =?UTF-8?q?[m2]=20[3.0.0]=20[=E5=9C=86=E8=A7=92?= =?UTF-8?q?=E4=BF=AE=E6=94=B9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../och/bus/passenger/ui/PM2DrivingInfoFragment.kt | 2 +- .../src/m2/res/drawable/bg_driving_info.xml | 4 ++-- .../src/m2/res/layout/p_m2_fragment.xml | 12 +++++------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt index 105f32eba5..928180c353 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt +++ b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt @@ -86,7 +86,7 @@ class PM2DrivingInfoFragment : super.initViews(savedInstanceState) overMapView?.let { it.onCreateView(savedInstanceState) - val radius = AutoSizeUtils.dp2px(requireContext(), 38f) + val radius = AutoSizeUtils.dp2px(requireContext(), 16f) it.outlineProvider = TextureVideoViewOutlineProvider(radius.toFloat()) it.clipToOutline = true } diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable/bg_driving_info.xml b/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable/bg_driving_info.xml index 788c472187..61904389a3 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable/bg_driving_info.xml +++ b/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable/bg_driving_info.xml @@ -1,8 +1,8 @@ - + @@ -54,11 +54,9 @@ Date: Fri, 7 Apr 2023 12:08:47 +0800 Subject: [PATCH 2/6] =?UTF-8?q?[m2]=20[3.0.0]=20[=E9=97=B4=E8=B7=9D]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/m2/res/layout/p_m2_fragment.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_fragment.xml b/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_fragment.xml index 5b877c7d21..350a666cce 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_fragment.xml +++ b/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_fragment.xml @@ -69,9 +69,9 @@ android:id="@+id/video_fragment" android:layout_width="match_parent" android:layout_height="0dp" - android:paddingBottom="@dimen/dp_40" - android:paddingEnd="@dimen/dp_40" - android:paddingStart="@dimen/dp_40" + android:layout_marginBottom="@dimen/dp_40" + android:layout_marginEnd="@dimen/dp_40" + android:layout_marginStart="@dimen/dp_40" app:layout_constraintHeight_percent="0.290" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent"/> From f689d7b0f5ae9d7bda8be5469cd4ea46e15ed6fc Mon Sep 17 00:00:00 2001 From: yangyakun Date: Fri, 7 Apr 2023 14:51:08 +0800 Subject: [PATCH 3/6] =?UTF-8?q?[m2]=20[3.0.0]=20[glsurfaceview=20=E5=8F=A0?= =?UTF-8?q?=E5=8A=A0=E5=AF=BC=E8=87=B4=E5=9C=86=E8=A7=92=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=9A=82=E6=97=B6=E4=BD=BF=E7=94=A8=E4=B8=8D?= =?UTF-8?q?=E4=BD=BF=E7=94=A8]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/widget/video/AdvanceGSYVideoPlayer.kt | 14 +++++++++++-- .../ui/widget/video/AdvanceVideoView.kt | 5 +++++ .../src/m2/res/layout/p_m2_fragment.xml | 20 +++++++++++++++++++ .../src/m2/res/layout/p_m2_hpmap_fragment.xml | 20 ------------------- 4 files changed, 37 insertions(+), 22 deletions(-) diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvanceGSYVideoPlayer.kt b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvanceGSYVideoPlayer.kt index d3244e8f7b..bc2d52176b 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvanceGSYVideoPlayer.kt +++ b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvanceGSYVideoPlayer.kt @@ -4,9 +4,10 @@ import android.content.Context import android.media.AudioManager import android.util.AttributeSet import com.mogo.eagle.core.utilcode.mogo.logger.Logger -import com.shuyu.gsyvideoplayer.utils.Debuger +import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider import com.shuyu.gsyvideoplayer.utils.GSYVideoType import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer +import me.jessyan.autosize.utils.AutoSizeUtils /** * @author: wangmingjun @@ -20,7 +21,7 @@ class AdvanceGSYVideoPlayer: StandardGSYVideoPlayer { init { hideWidget() GSYVideoType.setShowType(GSYVideoType.SCREEN_MATCH_FULL) - GSYVideoType.setRenderType(GSYVideoType.GLSURFACE) + //GSYVideoType.setRenderType(GSYVideoType.GLSURFACE) } override fun hideAllWidget() { @@ -124,4 +125,13 @@ class AdvanceGSYVideoPlayer: StandardGSYVideoPlayer { private fun setNeedMute(isMute: Boolean){ gsyVideoManager?.player?.setNeedMute(isMute) } + + override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) { + super.onSizeChanged(w, h, oldw, oldh) + if (!mIfCurrentIsFullscreen) { + val dp2px = AutoSizeUtils.dp2px(context, 16f) + this.outlineProvider = TextureVideoViewOutlineProvider(dp2px.toFloat()) + this.clipToOutline = true + } + } } \ No newline at end of file diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvanceVideoView.kt b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvanceVideoView.kt index 29a678e59a..3a5693e80a 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvanceVideoView.kt +++ b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvanceVideoView.kt @@ -13,9 +13,11 @@ import com.mogo.eagle.core.utilcode.mogo.logger.Logger import com.mogo.eagle.core.utilcode.util.FileUtils import com.mogo.eagle.core.utilcode.util.ThreadUtils import com.mogo.eagle.core.utilcode.util.UiThreadHandler +import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider import com.mogo.och.bus.passenger.R import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack +import me.jessyan.autosize.utils.AutoSizeUtils import java.io.File /** @@ -68,6 +70,9 @@ class AdvanceVideoView @JvmOverloads constructor( layoutParams.addRule(ALIGN_PARENT_RIGHT) layoutParams.addRule(ALIGN_PARENT_TOP) layoutParams.addRule(ALIGN_PARENT_BOTTOM) + val dp2px = AutoSizeUtils.dp2px(context, 16f) + videoRelativeLayout?.outlineProvider = TextureVideoViewOutlineProvider(dp2px.toFloat()) + videoRelativeLayout?.clipToOutline = true videoRelativeLayout?.addView(videoViewPlayer, layoutParams) } diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_fragment.xml b/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_fragment.xml index 350a666cce..fa1b31c186 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_fragment.xml +++ b/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_fragment.xml @@ -62,6 +62,26 @@ app:layout_constraintEnd_toEndOf="@+id/och_shadow_layout" app:layout_constraintStart_toStartOf="@+id/och_shadow_layout"/> + + + + + diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_hpmap_fragment.xml b/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_hpmap_fragment.xml index 851d3a25bb..4962a9f3c9 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_hpmap_fragment.xml +++ b/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_hpmap_fragment.xml @@ -11,24 +11,4 @@ android:layout_width="match_parent" android:layout_height="match_parent"/> - - - - - - \ No newline at end of file From 61ee4d714a22a25cac95572d3f565b2c0c9f69b5 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Fri, 7 Apr 2023 18:24:59 +0800 Subject: [PATCH 4/6] =?UTF-8?q?[m2]=20[3.0.0]=20[=E6=96=87=E6=A1=88?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=81=E9=A1=B5=E9=9D=A2=E5=BE=AE=E8=B0=83?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/jinlvvan/res/values/strings.xml | 2 +- .../src/m2/res/layout/p_m2_fragment.xml | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/values/strings.xml b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/values/strings.xml index e98feed5f5..f921f5e2f3 100644 --- a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/values/strings.xml +++ b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/values/strings.xml @@ -9,5 +9,5 @@ 下一站: 始发站: 请携带好随身物品下车。 - 欢迎乘坐蘑菇车联自动驾驶车。 + 欢迎乘坐\'蘑菇车联\'自动驾驶车。 \ No newline at end of file diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_fragment.xml b/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_fragment.xml index fa1b31c186..e144609f35 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_fragment.xml +++ b/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_fragment.xml @@ -88,11 +88,10 @@ From 429de28e85aa240762f63355fddca467ee8f043a Mon Sep 17 00:00:00 2001 From: yangyakun Date: Fri, 7 Apr 2023 19:27:52 +0800 Subject: [PATCH 5/6] =?UTF-8?q?[m2]=20[3.0.0]=20[shuttleM2=E5=8F=B8?= =?UTF-8?q?=E6=9C=BA=E5=B1=8F=E8=BD=A6=E6=A8=A1=E4=BF=AE=E6=94=B9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 1 + app/functions/och.gradle | 1 + app/productFlavors/fOchShuttleM2.gradle | 56 +++++++++++++++++++ app/productFlavors/flavorsFilterConfig.gradle | 2 + .../mogo/launcher/startup/ConfigStartUp.kt | 7 +-- .../com/mogo/commons/screen/ScreenHelper.java | 3 +- 6 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 app/productFlavors/fOchShuttleM2.gradle diff --git a/app/build.gradle b/app/build.gradle index 01fdee2714..bdaf63a783 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -283,6 +283,7 @@ android { apply from: "./productFlavors/fPadLenovo.gradle" apply from: "./productFlavors/fOchBus.gradle" apply from: "./productFlavors/fOchShuttle.gradle" + apply from: "./productFlavors/fOchShuttleM2.gradle" apply from: "./productFlavors/fOchTaxi.gradle" apply from: "./productFlavors/fOchBusPassenger.gradle" apply from: "./productFlavors/fOchShuttlePassengerM2.gradle" diff --git a/app/functions/och.gradle b/app/functions/och.gradle index 242f2b6437..77d27d856a 100644 --- a/app/functions/och.gradle +++ b/app/functions/och.gradle @@ -58,6 +58,7 @@ project.dependencies { // 多屏幕-taxi司机端 //接驳车司乘端 fOchShuttleImplementation (project(':OCH:mogo-och-shuttle')) + fOchShuttleM2Implementation (project(':OCH:mogo-och-shuttle')) fOchShuttlePassengerImplementation (project(':OCH:mogo-och-shuttle-passenger')) fOchShuttlePassengerM2Implementation (project(':OCH:mogo-och-shuttle-passenger')) diff --git a/app/productFlavors/fOchShuttleM2.gradle b/app/productFlavors/fOchShuttleM2.gradle new file mode 100644 index 0000000000..686a4442c0 --- /dev/null +++ b/app/productFlavors/fOchShuttleM2.gradle @@ -0,0 +1,56 @@ +project.android.productFlavors { + // 衡阳-联想Pad-网约车-小巴车 + fOchShuttleM2 { + externalNativeBuild { + ndk { + // 设置支持的SO库架构 + abiFilters "armeabi-v7a", "arm64-v8a" + } + } + minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo + targetSdkVersion rootProject.ext.android.targetSdkVersionPadLenovo + versionCode rootProject.versionCode as int + versionName rootProject.versionName + // 应用包名 + applicationId rootProject.ext.android.fLauncherApplicationId + dimension "vehicle" + // 和 och/mogo-och-bus-passenger 的flavors的shuttle对应 + matchingFallbacks = ['shuttle'] + + // 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0 + buildConfigField 'int', 'CAR_MACHINE_TYPE', '2' + //高德地图鉴权信息 + manifestPlaceholders = [ + AMAP_API_VALUE : rootProject.ext.android.fLauncherAmapApiValue, + CHANNEL_VALUE : "fOchShuttleM2", ACTIVITY_ROOT: true, + SCREEN_ORIENTATION: "landscape" + ] + + // 是否基于地图 + buildConfigField 'boolean', 'IS_MAP_BASED', 'true' + + // 是否需要实时上报坐标 + buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true' + // GPS数据提供源: 0-Android系统,1-工控机,2-OBU + buildConfigField 'int', 'GPS_PROVIDER', "1" + + // 构建的应用身份类型,具体查看 README.md APP_IDENTITY_MODE规则 + buildConfigField 'String', 'APP_IDENTITY_MODE', "\"Shuttle_Driver_M2\"" + // 连接的工控机IP地址 + buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.8.103\"" + // 构建的是否是演示(美化)模式 + buildConfigField 'boolean', 'IS_DEMO_MODE', 'false' + + // 构建的是否要动态更换模型 + buildConfigField 'boolean', 'IS_CAR_MODEL_CHANGE', 'false' + // 是否需要重写状态栏 + buildConfigField 'boolean', 'IS_REPLACE_STATUSVIEW', 'false' + + + // 构建 是否支持多屏异显异交互 + buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false' + + //Bus不能启动自驾的档位 + buildConfigField 'java.util.Set', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}' + } +} \ No newline at end of file diff --git a/app/productFlavors/flavorsFilterConfig.gradle b/app/productFlavors/flavorsFilterConfig.gradle index 5fa348b865..cb76ba69b5 100644 --- a/app/productFlavors/flavorsFilterConfig.gradle +++ b/app/productFlavors/flavorsFilterConfig.gradle @@ -19,6 +19,7 @@ project.android.variantFilter { variant -> if (names.contains("shuttle")) { //Gradle会忽略满足上述条件的所有变体 if (names.contains("fOchShuttle")) { + } else if (names.contains("fOchShuttleM2")) { } else if (names.contains("fOchShuttlePassenger")) { } else if (names.contains("fOchShuttlePassengerM2")) { } else { @@ -83,6 +84,7 @@ project.android.variantFilter { variant -> if (names.contains("shuttle")) { //Gradle会忽略满足上述条件的所有变体 if (names.contains("fOchShuttle")) { + } else if (names.contains("fOchShuttleM2")) { } else if (names.contains("fOchShuttlePassenger")) { } else if (names.contains("fOchShuttlePassengerM2")) { } else { diff --git a/app/src/main/java/com/mogo/launcher/startup/ConfigStartUp.kt b/app/src/main/java/com/mogo/launcher/startup/ConfigStartUp.kt index 3e8e790b8c..af1f40a436 100644 --- a/app/src/main/java/com/mogo/launcher/startup/ConfigStartUp.kt +++ b/app/src/main/java/com/mogo/launcher/startup/ConfigStartUp.kt @@ -90,19 +90,18 @@ object ConfigStartUp { if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) { HdMapBuildConfig.currentCarVrIconRes = R.raw.chuzuche - }else if (AppIdentityModeUtils.isM2(FunctionBuildConfig.appIdentityMode)){ - HdMapBuildConfig.currentCarVrIconRes = R.raw.m2 } else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) { HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache } else if (AppIdentityModeUtils.isSweeper(FunctionBuildConfig.appIdentityMode)) { HdMapBuildConfig.currentCarVrIconRes = R.raw.huanwei - } else if (AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)){ + } else if (AppIdentityModeUtils.isJL(FunctionBuildConfig.appIdentityMode)){ HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache } else if (AppIdentityModeUtils.isM1(FunctionBuildConfig.appIdentityMode)){ HdMapBuildConfig.currentCarVrIconRes = R.raw.m1 + }else if (AppIdentityModeUtils.isM2(FunctionBuildConfig.appIdentityMode)) { + HdMapBuildConfig.currentCarVrIconRes = R.raw.m2 } - if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) || AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode) diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/screen/ScreenHelper.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/screen/ScreenHelper.java index 49ca031de5..9871608332 100644 --- a/foudations/mogo-commons/src/main/java/com/mogo/commons/screen/ScreenHelper.java +++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/screen/ScreenHelper.java @@ -25,7 +25,8 @@ public class ScreenHelper { AppIdentityModeUtils.isPassenger((FunctionBuildConfig.appIdentityMode))) { baseWidth = 1920; baseHeight = 1080; - } else if (AppIdentityModeUtils.isM2(FunctionBuildConfig.appIdentityMode)) { + } else if (AppIdentityModeUtils.isM2(FunctionBuildConfig.appIdentityMode) && + AppIdentityModeUtils.isPassenger((FunctionBuildConfig.appIdentityMode))) { baseWidth = 1080; baseHeight = 1920; } From 7f67ea90270380063e1e57559ff214249f20f859 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Fri, 7 Apr 2023 20:59:34 +0800 Subject: [PATCH 6/6] =?UTF-8?q?[m2]=20[3.0.0]=20[=E5=B9=BF=E5=91=8A?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E4=BB=8Ejson=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=8E=B7=E5=8F=96=E8=A7=86=E9=A2=91]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/module/wigets/video/AdsDatas.kt | 10 + .../wigets/video/ImageVideoRotationView.kt | 1 - .../wigets/video/VideoPlayerFragment.kt | 91 +------- .../module/wigets/video/VideoPlayerView.kt | 8 +- .../passenger/ui/video/PM2VideoFragment.kt | 196 ++---------------- .../ui/widget/video/AdvancePagerAdapter.kt | 2 +- .../ui/widget/video/ImageAndVideoRotation.kt | 2 + .../passenger/ui/widget/video/RotationItem.kt | 12 -- app/build.gradle | 40 +++- app/config/tempConfig.json | 176 ++++++++++++++++ app/{ => config}/urlConfig.json | 0 .../mogo/launcher/startup/ConfigStartUp.kt | 2 + .../core/data/config/FunctionBuildConfig.kt | 10 + 13 files changed, 263 insertions(+), 287 deletions(-) create mode 100644 OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/AdsDatas.kt delete mode 100644 OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/RotationItem.kt create mode 100644 app/config/tempConfig.json rename app/{ => config}/urlConfig.json (100%) diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/AdsDatas.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/AdsDatas.kt new file mode 100644 index 0000000000..777f13a502 --- /dev/null +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/AdsDatas.kt @@ -0,0 +1,10 @@ +package com.mogo.och.common.module.wigets.video + +data class AdsDatas(val ads:MutableList) + +data class RotationItem( + var path: String, + var type: Int, + var cacheImgPath: String, + var title: String +) diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/ImageVideoRotationView.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/ImageVideoRotationView.kt index 6457ffd54b..cdf8741b67 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/ImageVideoRotationView.kt +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/ImageVideoRotationView.kt @@ -2,7 +2,6 @@ package com.mogo.och.common.module.wigets.video import AdvancePagerAdapter import AdvanceViewPager -import RotationItem import android.annotation.SuppressLint import android.content.Context import android.util.AttributeSet diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/VideoPlayerFragment.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/VideoPlayerFragment.kt index f1a759a353..1e1a3cbd17 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/VideoPlayerFragment.kt +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/VideoPlayerFragment.kt @@ -1,8 +1,10 @@ package com.mogo.och.common.module.wigets.video -import RotationItem +import com.google.gson.reflect.TypeToken import com.mogo.commons.mvp.MvpFragment import com.mogo.commons.mvp.Presenter +import com.mogo.eagle.core.data.config.FunctionBuildConfig +import com.mogo.eagle.core.utilcode.util.GsonUtils import com.mogo.och.common.module.R import kotlinx.android.synthetic.main.fragment_video_player.* @@ -47,87 +49,12 @@ class VideoPlayerFragment : } private fun initResourceData() { - arrayListOf.clear() - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg", - 0, - "", - "1" - ) - ) - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", - 0, - "", - "2" - ) - ) - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4", - 1, - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", - "3" - ) - ) - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", - 0, - "", - "4" - ) - ) - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v", - 1, - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", - "5" - ) - ) - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v", - 1, - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", - "6" - ) - ) - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg", - 0, - "", - "7" - ) - ) - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg", - 0, - "", - "8" - ) - ) - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", - 0, - "", - "9" - ) - ) - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4", - 1, - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", - "10" - ) - ) + try { + arrayListOf.clear() + var datas: AdsDatas = GsonUtils.fromJson(FunctionBuildConfig.tempConfig,object : TypeToken() {}.type) + arrayListOf.addAll(datas.ads) + } catch (e: Exception) { + } } } diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/VideoPlayerView.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/VideoPlayerView.kt index bd43556851..200ebaea1c 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/VideoPlayerView.kt +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/VideoPlayerView.kt @@ -24,6 +24,7 @@ import com.mogo.eagle.core.utilcode.util.ThreadUtils import com.mogo.eagle.core.utilcode.util.UiThreadHandler import com.mogo.och.common.module.R import com.mogo.och.common.module.wigets.video.ImageVideoRotationView +import com.mogo.och.common.module.wigets.video.RotationItem import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack import com.shuyu.gsyvideoplayer.utils.Debuger @@ -456,13 +457,6 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter } } -data class RotationItem( - var path: String, - var type: Int, - var cacheImgPath: String, - var title: String -) - class AdvanceImageView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null ) : RelativeLayout(context, attrs) { diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/video/PM2VideoFragment.kt b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/video/PM2VideoFragment.kt index 6eee9039d4..6b6767c0e6 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/video/PM2VideoFragment.kt +++ b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/video/PM2VideoFragment.kt @@ -1,9 +1,13 @@ package com.mogo.och.bus.passenger.ui.video +import com.google.gson.reflect.TypeToken import com.mogo.commons.mvp.MvpFragment +import com.mogo.eagle.core.data.config.FunctionBuildConfig +import com.mogo.eagle.core.utilcode.util.GsonUtils import com.mogo.och.bus.passenger.R import com.mogo.och.bus.passenger.presenter.PM2VideoPresenter -import com.mogo.och.bus.passenger.ui.widget.video.RotationItem +import com.mogo.och.common.module.wigets.video.AdsDatas +import com.mogo.och.common.module.wigets.video.RotationItem import kotlinx.android.synthetic.m2.p_m2_video_fragment.* /** @@ -48,187 +52,13 @@ class PM2VideoFragment : } private fun initResourceData() { - arrayListOf.clear() - arrayListOf.add( - RotationItem( - "https://img.zhidaohulian.com/fileServer/online_car_hailing/1678946244305/dalim2.mp4", - 1, - "", - "1" - ) - ) -// if (BuildConfig.FLAVOR.contains("dali")){ //大理 目前还都使用的mogo 的cos https://img.zhidaohulian.com/fileServer/online_car_hailing/1678932482045/1080%2A565%20.mp4 -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1678932482045/1080%2A565%20.mp4", -// 1, -// "", -// "1" -// ) -// ) -// }else if (BuildConfig.FLAVOR.contains("yantai")){ //烟台 -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg", -// 0, -// "", -// "1" -// ) -// ) -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", -// 0, -// "", -// "2" -// ) -// ) -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4", -// 1, -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", -// "3" -// ) -// ) -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", -// 0, -// "", -// "4" -// ) -// ) -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v", -// 1, -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", -// "5" -// ) -// ) -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v", -// 1, -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", -// "6" -// ) -// ) -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg", -// 0, -// "", -// "7" -// ) -// ) -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg", -// 0, -// "", -// "8" -// ) -// ) -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", -// 0, -// "", -// "9" -// ) -// ) -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4", -// 1, -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", -// "10" -// ) -// ) -// }else{ // mogo -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg", -// 0, -// "", -// "1" -// ) -// ) -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", -// 0, -// "", -// "2" -// ) -// ) -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4", -// 1, -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", -// "3" -// ) -// ) -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", -// 0, -// "", -// "4" -// ) -// ) -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v", -// 1, -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", -// "5" -// ) -// ) -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v", -// 1, -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", -// "6" -// ) -// ) -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg", -// 0, -// "", -// "7" -// ) -// ) -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg", -// 0, -// "", -// "8" -// ) -// ) -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", -// 0, -// "", -// "9" -// ) -// ) -// arrayListOf.add( -// RotationItem( -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4", -// 1, -// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", -// "10" -// ) -// ) -// } -// + + try { + arrayListOf.clear() + var datas: AdsDatas = GsonUtils.fromJson(FunctionBuildConfig.tempConfig,object : TypeToken() {}.type) + arrayListOf.addAll(datas.ads) + } catch (e: Exception) { + e.printStackTrace() } + } } \ No newline at end of file diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvancePagerAdapter.kt b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvancePagerAdapter.kt index db42808e75..2d68d3b34d 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvancePagerAdapter.kt +++ b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/AdvancePagerAdapter.kt @@ -9,7 +9,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d import com.mogo.eagle.core.utilcode.mogo.logger.Logger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant import com.mogo.eagle.core.utilcode.util.CountDownTimer -import com.mogo.eagle.core.utilcode.util.UiThreadHandler +import com.mogo.och.common.module.wigets.video.RotationItem import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack /** diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/ImageAndVideoRotation.kt b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/ImageAndVideoRotation.kt index 92d3b3dbda..02205dd945 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/ImageAndVideoRotation.kt +++ b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/ImageAndVideoRotation.kt @@ -5,6 +5,8 @@ import android.content.Context import android.util.AttributeSet import android.widget.RelativeLayout import androidx.viewpager.widget.ViewPager +import com.mogo.och.common.module.wigets.video.RotationItem + /** * @author: wangmingjun * @date: 2023/2/6 diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/RotationItem.kt b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/RotationItem.kt deleted file mode 100644 index ed788c6179..0000000000 --- a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/widget/video/RotationItem.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.mogo.och.bus.passenger.ui.widget.video - -/** - * @author: wangmingjun - * @date: 2023/2/6 - * type:0 图片 - * type:1 视频 - */ -data class RotationItem(var path: String, - var type: Int, - var cacheImgPath: String, - var title: String) \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index bdaf63a783..6fb4ed48f6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -228,15 +228,18 @@ android { mogo { dimension "project" buildConfigField 'String', 'URLs', "\"${readFileToJson("mogo").replace("\"", "\\\"")}\"" + buildConfigField 'String', 'tempConfig', "\"${readFileToJsonTemp("mogo").replace("\"", "\\\"")}\"" } yantai { dimension "project" buildConfigField 'String', 'URLs', "\"${readFileToJson("yantai").replace("\"", "\\\"")}\"" + buildConfigField 'String', 'tempConfig', "\"${readFileToJsonTemp("yantai").replace("\"", "\\\"")}\"" } dali { dimension "project" buildConfigField 'String', 'URLs', "\"${readFileToJson("dali").replace("\"", "\\\"")}\"" + buildConfigField 'String', 'tempConfig', "\"${readFileToJsonTemp("dali").replace("\"", "\\\"")}\"" } // 空业务 主要是给鹰眼使用 @@ -461,7 +464,7 @@ boolean isReleaseBuild() { Object readFileToJson(env){ try { // 加载config.json 文件 - File file = new File("${rootDir}/app/urlConfig.json") + File file = new File("${rootDir}/app/config/urlConfig.json") def jsonSlurper = new JsonSlurper() // 解析json def config = jsonSlurper.parse(file) @@ -511,3 +514,38 @@ def variantName() { } +Object readFileToJsonTemp(env){ + try { + // 加载config.json 文件 + File file = new File("${rootDir}/app/config/tempConfig.json") + def jsonSlurper = new JsonSlurper() + // 解析json + def config = jsonSlurper.parse(file) + def flavorNames = variantVehicleName() + def jsonOutput = new JsonOutput() + def getKey = flavorNames + config.get(env).each {key, value -> + // 匹配flavor对应的 json + if(flavorNames.toLowerCase().contains(key)){ + getKey = key + return true + } + } + return jsonOutput.toJson(config.get(env).get(getKey)) + } catch (IOException e) { + e.printStackTrace() + } + return null +} + +def variantVehicleName() { + if(gradle.startParameter.taskNames.size()>0) { + for (String taskName : gradle.startParameter.taskNames) { + if (taskName.contains("Debug") | taskName.contains("Release")) { + return taskName + } + } + } + return "buspassenger" +} + diff --git a/app/config/tempConfig.json b/app/config/tempConfig.json new file mode 100644 index 0000000000..e8d8cb38fb --- /dev/null +++ b/app/config/tempConfig.json @@ -0,0 +1,176 @@ +{ + "mogo": { + "shuttlepassenger": { + "ads": [ + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg", + "type": 0, + "cacheImgPath": "", + "title": "1" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", + "type": 0, + "cacheImgPath": "", + "title": "2" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4", + "type": 1, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", + "title": "3" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", + "type": 0, + "cacheImgPath": "", + "title": "4" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v", + "type": 0, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", + "title": "5" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v", + "type": 1, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", + "title": "6" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg", + "type": 0, + "cacheImgPath": "", + "title": "7" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg", + "type": 0, + "cacheImgPath": "", + "title": "8" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", + "type": 0, + "cacheImgPath": "", + "title": "9" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4", + "type": 1, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", + "title": "10" + } + ] + }, + "shuttlepassengerm2": { + "ads": [ + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1678946244305/dalim2.mp4", + "type": 1, + "cacheImgPath": "", + "title": "1" + } + ] + } + }, + "dali": { + "shuttlepassenger": { + "ads": [ + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg", + "type": 0, + "cacheImgPath": "", + "title": "1" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", + "type": 0, + "cacheImgPath": "", + "title": "2" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4", + "type": 1, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png", + "title": "3" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", + "type": 0, + "cacheImgPath": "", + "title": "4" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v", + "type": 0, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", + "title": "5" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v", + "type": 1, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg", + "title": "6" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg", + "type": 0, + "cacheImgPath": "", + "title": "7" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg", + "type": 0, + "cacheImgPath": "", + "title": "8" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", + "type": 0, + "cacheImgPath": "", + "title": "9" + }, + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4", + "type": 1, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png", + "title": "10" + } + ] + }, + "shuttlepassengerm2": { + "ads": [ + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1678946244305/dalim2.mp4", + "type": 1, + "cacheImgPath": "", + "title": "1" + } + ] + } + }, + "yantai": { + "shuttlepassenger": { + "ads": [ + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1680774790614/yangmadao_photo.jpg", + "type": 1, + "cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1680774847276/yangmadao_video.mp4", + "title": "1" + } + ] + }, + "shuttlepassengerm2": { + "ads": [ + { + "path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1678946244305/dalim2.mp4", + "type": 1, + "cacheImgPath": "", + "title": "1" + } + ] + } + } +} diff --git a/app/urlConfig.json b/app/config/urlConfig.json similarity index 100% rename from app/urlConfig.json rename to app/config/urlConfig.json diff --git a/app/src/main/java/com/mogo/launcher/startup/ConfigStartUp.kt b/app/src/main/java/com/mogo/launcher/startup/ConfigStartUp.kt index af1f40a436..47d371c370 100644 --- a/app/src/main/java/com/mogo/launcher/startup/ConfigStartUp.kt +++ b/app/src/main/java/com/mogo/launcher/startup/ConfigStartUp.kt @@ -46,6 +46,8 @@ object ConfigStartUp { FunctionBuildConfig.urlJson = GsonUtils.fromJson(BuildConfig.URLs, UrlConfig::class.java) //不能启动自动驾驶的档位 FunctionBuildConfig.unableLaunchAutopilotGear = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR + // 临时配置json + FunctionBuildConfig.tempConfig = BuildConfig.tempConfig // // 这里影响当前Activity的身份信息,多进程先保持与原来一样,主进程为司机端,:passenger 进程为乘客端 TODO 暂时不启用,仅做洱海交付,独立乘客屏+宣传视频 // if (ProcessUtils.getCurrentProcessName().contains(":passenger")) { diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt index c02056061b..9403bc2da5 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt @@ -105,6 +105,16 @@ object FunctionBuildConfig { @JvmField var appIdentityMode = "Taxi_Driver_Base" + /** + * 临时配置json + * 广告json + * + */ + @Volatile + @JvmField + var tempConfig = "" + + /** * 配置连接工控机的IP地址 * 小巴车 192.168.8.102