diff --git a/app/build.gradle b/app/build.gradle index 7aa3af751c..c1354c58fc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,75 +4,83 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'android-aspectjx' apply plugin: 'bugly' -apply plugin: 'apm-plugin' + +if (!isAndroidTestBuild()) { + apply plugin: 'apm-plugin' +} //apply ByteX宿主 -apply plugin: 'bytex' -ByteX { - enable true - enableInDebug true - logLevel "DEBUG" + +if (!isAndroidTestBuild()) { + apply plugin: 'bytex' + ByteX { + enable true + enableInDebug true + logLevel "DEBUG" + } } -apply plugin: 'bytex.threadOpt' +if (!isAndroidTestBuild()) { + apply plugin: 'bytex.threadOpt' + thread_opt { + enable true + enableInDebug true + rxJavaIoReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getIoPool@@()Ljava/util/concurrent/ExecutorService;' + rxJavaComputationReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getCpuPool@@()Ljava/util/concurrent/ExecutorService;' + coroutineIoReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getIoPool@@()Ljava/util/concurrent/ExecutorService;' + coroutineDefaultReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getCpuPool@@()Ljava/util/concurrent/ExecutorService;' + } -thread_opt { - enable true - enableInDebug true - rxJavaIoReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getIoPool@@()Ljava/util/concurrent/ExecutorService;' - rxJavaComputationReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getCpuPool@@()Ljava/util/concurrent/ExecutorService;' - coroutineIoReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getIoPool@@()Ljava/util/concurrent/ExecutorService;' - coroutineDefaultReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getCpuPool@@()Ljava/util/concurrent/ExecutorService;' + /** + * 方便使用systrace工具,在工程侧打点,便于分析工程侧性能问题 + */ + apply plugin: 'bytex.systrace' + systrace { + /** + * 交付时要关闭,会有性能损耗 + */ + enable false + enableInDebug false + /** + * - 是否使用[Trace.beginAsyncSection(String, int)/Trace.endAsyncSection(String, int)]进行打点 + * - 默认使用[Trace.beginSection(String)/Trace.endSection()]进行打点 + */ + isTraceAsync false + /** + * - 是否在运行时只针对主线程打点,其它线程不打 + */ + isOnlyMainThread false + + /** + * - 是否忽略对类的静态构造方法打点 + * - 默认不忽略 + */ + isIgnoreClinitMethod false + + /** + * - 是否忽略对类中的简单方法打点 + * 简单方法定义: + * - 空方法 + * - get/set 方法 + * - 单独的方法,方法体内没有调用其它方法 + * - 默认不忽略 + */ + isIgnoreSampleMethod false + + /** + * - 针对特定类集合,配置打点白名单,在此集合中的类中的所有方法不打点 + * - 支持正则表达式 + */ + whiteListForClass = [] + + /** + * - 针对特定包名集合,配置打点白名单,所有类以此包名为前缀的类不打点 + * - 支持正则表达式 + */ + whiteListForPackage = [] + } } -/** - * 方便使用systrace工具,在工程侧打点,便于分析工程侧性能问题 - */ -apply plugin: 'bytex.systrace' -systrace { - /** - * 交付时要关闭,会有性能损耗 - */ - enable false - enableInDebug false - /** - * - 是否使用[Trace.beginAsyncSection(String, int)/Trace.endAsyncSection(String, int)]进行打点 - * - 默认使用[Trace.beginSection(String)/Trace.endSection()]进行打点 - */ - isTraceAsync false - /** - * - 是否在运行时只针对主线程打点,其它线程不打 - */ - isOnlyMainThread false - - /** - * - 是否忽略对类的静态构造方法打点 - * - 默认不忽略 - */ - isIgnoreClinitMethod false - - /** - * - 是否忽略对类中的简单方法打点 - * 简单方法定义: - * - 空方法 - * - get/set 方法 - * - 单独的方法,方法体内没有调用其它方法 - * - 默认不忽略 - */ - isIgnoreSampleMethod false - - /** - * - 针对特定类集合,配置打点白名单,在此集合中的类中的所有方法不打点 - * - 支持正则表达式 - */ - whiteListForClass = [] - - /** - * - 针对特定包名集合,配置打点白名单,所有类以此包名为前缀的类不打点 - * - 支持正则表达式 - */ - whiteListForPackage = [] -} /*apply plugin: 'chain.log.hook' hooklog{ @@ -146,6 +154,10 @@ android { targetCompatibility 1.8 } + kotlinOptions { + jvmTarget = '1.8' + } + sourceSets { main { manifest.srcFile 'src/main/AndroidManifest.xml' @@ -199,6 +211,10 @@ android { packagingOptions { exclude 'META-INF/io.netty.versions.properties' } + + useLibrary 'android.test.runner' + useLibrary 'android.test.base' + useLibrary 'android.test.mock' } repositories { @@ -236,31 +252,38 @@ dependencies { apply from: "./functions/tts.gradle" apply from: "./functions/och.gradle" - + androidTestImplementation rootProject.ext.dependencies.androidx_test_core + androidTestImplementation rootProject.ext.dependencies.androidx_test_core_ktx + androidTestImplementation rootProject.ext.dependencies.androidx_unit_ext + androidTestImplementation rootProject.ext.dependencies.androidx_unit_ext_ktx + androidTestImplementation rootProject.ext.dependencies.androidx_runner + androidTestImplementation rootProject.ext.dependencies.androidx_espresso_core } -ApmPlugin { - // 是否进行插桩 - enable true - // 是否在Debug包插桩,默认不插桩 - enableInDebug true - // DEBUG("DEBUG"), INFO("INFO"), WARN("WARN"), ERROR("ERROR"); - // INFO 级别Log会汇总所有被插桩处理的类供查看,路径 app/build/ByteX/ApmPlugin - logLevel "DEBUG" - // 启动分析开关:监控App启动耗时,需要同时开启pageLoadSwitch - startSwitch = true - // 页面响应开关:监控Activity的生命周期耗时 - pageLoadSwitch = true - // 网络监控开关:监控okhttp3的网络请求 - okHttp3Switch = true - // 白名单下的包进行插桩,需要填写要插装类所在的包名,支持前缀配置 - whiteList = [ - "com.mogo" - ] - // 黑名单包下类不进行插桩,可以配置包名和类名,没有可以填空 - blackList = [ +if (!isAndroidTestBuild()) { + ApmPlugin { + // 是否进行插桩 + enable true + // 是否在Debug包插桩,默认不插桩 + enableInDebug true + // DEBUG("DEBUG"), INFO("INFO"), WARN("WARN"), ERROR("ERROR"); + // INFO 级别Log会汇总所有被插桩处理的类供查看,路径 app/build/ByteX/ApmPlugin + logLevel "DEBUG" + // 启动分析开关:监控App启动耗时,需要同时开启pageLoadSwitch + startSwitch = true + // 页面响应开关:监控Activity的生命周期耗时 + pageLoadSwitch = true + // 网络监控开关:监控okhttp3的网络请求 + okHttp3Switch = true + // 白名单下的包进行插桩,需要填写要插装类所在的包名,支持前缀配置 + whiteList = [ + "com.mogo" + ] + // 黑名单包下类不进行插桩,可以配置包名和类名,没有可以填空 + blackList = [ - ] + ] + } } android.applicationVariants.all { variant -> @@ -298,10 +321,20 @@ def getWorkingBranchName() { */ def getWorkingBranchHash() { def workingBranchHash = "" - def proc = "git log -n1 --format=format:\"%h\"".execute() + def proc = "git log -n1 --format=format:%h".execute() proc.in.eachLine { line -> workingBranchHash = line } proc.err.eachLine { line -> println line } proc.waitFor() println "Working branch hash: " + workingBranchHash - return workingBranchHash + return "\"${workingBranchHash}\"" +} + + +boolean isAndroidTestBuild() { + for (String s : gradle.startParameter.taskNames) { + if (s.contains("AndroidTest")) { + return true + } + } + return false } diff --git a/app/src/androidTest/java/com/mogo/functions/test/AutoPilotBadCaseTest.kt b/app/src/androidTest/java/com/mogo/functions/test/AutoPilotBadCaseTest.kt new file mode 100644 index 0000000000..8657b3107e --- /dev/null +++ b/app/src/androidTest/java/com/mogo/functions/test/AutoPilotBadCaseTest.kt @@ -0,0 +1,145 @@ +package com.mogo.functions.test + +import androidx.lifecycle.lifecycleScope +import androidx.test.core.app.ActivityScenario +import androidx.test.ext.junit.runners.AndroidJUnit4 +import androidx.test.filters.LargeTest +import com.mogo.eagle.core.data.autopilot.AutoPilotRecordResult +import com.mogo.eagle.core.function.hmi.ui.MoGoHmiFragment +import com.mogo.eagle.core.function.main.MainLauncherActivity +import kotlinx.coroutines.* +import kotlinx.coroutines.flow.* +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import java.text.SimpleDateFormat +import java.util.* +import java.util.concurrent.Executors +import java.util.concurrent.TimeUnit +import kotlin.random.Random + +@RunWith(AndroidJUnit4::class) +@LargeTest +class AutoPilotBadCaseTest { + + lateinit var launch: ActivityScenario + + @Before + fun launch() { + launch = ActivityScenario.launch(MainLauncherActivity::class.java) + } + + @ExperimentalCoroutinesApi @Test + fun showBadCaseEntrance1(): Unit = runBlocking(Dispatchers.Main) { + val f = ensureMoGoHmiFragmentShow() + var index = 0 + (1 until 50) + .map { it } + .asFlow() + .onEach { + delay(TimeUnit.SECONDS.toMillis(5)) + f.onAutopilotRecordResult(AutoPilotRecordResult().also { + it.diskFree = 100 + index + it.duration = 60.0 + it.fileName = "/user/general/record_$index.log" + it.id = 10 + index + it.key = "yyy_$index" + it.stat = 100 + it.type = 1 + it.timestamp = SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(Date()) + index++ + }) + } + .flowOn(Dispatchers.Default) + .collect() + delay(TimeUnit.HOURS.toMillis(2)) + } + + + @ExperimentalCoroutinesApi @Test + fun showBadCaseEntrance2():Unit = runBlocking(Dispatchers.Main) { + val f = ensureMoGoHmiFragmentShow() + var index = 0 + (1 until 50) + .map { it } + .asFlow() + .onEach { + if (index in 1..4) { + delay(TimeUnit.SECONDS.toMillis(15)) + } else { + delay(Random(20).nextLong()) + } + f.onAutopilotRecordResult(AutoPilotRecordResult().also { + it.diskFree = 100 + index + it.duration = 60.0 + it.fileName = "/user/general/record_$index.log" + it.id = 10 + index + it.key = "yyy_$index" + it.stat = 100 + it.type = 1 + it.timestamp = SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(Date()) + index++ + }) + + if (index == 5) { + f.lifecycleScope.cancel() + } + + } + .flowOn(Dispatchers.Default) + .collect() + delay(TimeUnit.HOURS.toMillis(2)) + } + + @ExperimentalCoroutinesApi @Test + fun showBadCaseEntrance3(): Unit = runBlocking(Dispatchers.Main) { + val f = ensureMoGoHmiFragmentShow() + var index = 0 + (1 until 50) + .map { it } + .asFlow() + .onEach { + delay(TimeUnit.SECONDS.toMillis(20)) + f.onAutopilotRecordResult(AutoPilotRecordResult().also { + it.diskFree = 100 + index + it.duration = 60.0 + it.fileName = "/user/general/record_$index.log" + it.id = 10 + index + it.key = "yyy_$index" + it.stat = 100 + it.type = 1 + it.timestamp = SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(Date()) + index++ + }) + } + .flowOn(Dispatchers.Default) + .collect() + delay(TimeUnit.HOURS.toMillis(2)) + } + + + private suspend fun ensureMoGoHmiFragmentShow(): MoGoHmiFragment = suspendCancellableCoroutine { + launch.onActivity { itx -> + val executor = Executors.newSingleThreadScheduledExecutor() + executor.scheduleAtFixedRate({ + var find = + itx.supportFragmentManager.fragments.find { it is MoGoHmiFragment } as? MoGoHmiFragment + while (find == null) { + find = + itx.supportFragmentManager.fragments.find { it is MoGoHmiFragment } as? MoGoHmiFragment + + } + while (!find.isResumed) { + Thread.sleep(500) + } + it.resumeWith(Result.success(find)) + try { + Thread.sleep(500) + executor.shutdownNow() + } catch (e: Throwable) { + e.printStackTrace() + } + }, 50, 500, TimeUnit.MILLISECONDS) + } + } +} \ No newline at end of file diff --git a/config.gradle b/config.gradle index 7b02452c5e..3019aeb491 100644 --- a/config.gradle +++ b/config.gradle @@ -114,7 +114,7 @@ ext { obusdk : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.3", mogoobu : 'com.zhidao.support.obu:mogoobu:1.0.0.19', mogoami : 'com.zhidao.support.obu.ami:mogoami:1.0.0.10', - adasHigh : 'com.zhidao.support.adas:high:1.2.1.2_bate3', + adasHigh : 'com.zhidao.support.adas:high:1.2.1.2_bate6', // google googlezxing : "com.google.zxing:core:3.3.3", @@ -246,7 +246,16 @@ ext { life_cycle_scope : "androidx.lifecycle:lifecycle-runtime-ktx:2.2.0", view_model_scope : "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0", - live_data_scope : "androidx.lifecycle:lifecycle-livedata-ktx:2.2.0" + live_data_scope : "androidx.lifecycle:lifecycle-livedata-ktx:2.2.0", + + + //========================== Unit Test ====================== + androidx_test_core : "androidx.test:core:1.2.1", + androidx_test_core_ktx : "androidx.test:core-ktx:1.2.0", + androidx_unit_ext : "androidx.test.ext:junit:1.1.2", + androidx_unit_ext_ktx : "androidx.test.ext:junit-ktx:1.1.2", + androidx_runner : "androidx.test:runner:1.3.0", + androidx_espresso_core : "androidx.test.espresso:espresso-core:3.3.0", ] } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt index 0b9dccb483..9607b973e4 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt @@ -13,7 +13,6 @@ import com.mogo.eagle.core.utilcode.util.GsonUtils import com.mogo.eagle.core.utilcode.util.LogUtils import com.mogo.eagle.core.utilcode.util.ThreadUtils import com.zhidao.support.adas.high.AdasManager -import com.zhidao.support.adas.high.bean.IPCPowerInfo import com.zhidao.support.adas.high.common.CupidLogUtils import java.util.concurrent.TimeUnit @@ -104,10 +103,14 @@ class MoGoAutopilotProvider : } override fun setIPCShutDown() { - AdasManager.getInstance().sendBaseInfo(IPCPowerInfo.shutdown()) + AdasManager.getInstance().shutdownIPC() } override fun setIPCReboot() { - AdasManager.getInstance().sendBaseInfo(IPCPowerInfo.reboot()) + AdasManager.getInstance().rebootIPC() + } + + override fun recordCause(key: String?, name: String?, id: String?, reason: String?) { + AdasManager.getInstance().recordCause(key, name, id, reason) } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/notification/WarningFloat.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/notification/WarningFloat.kt index 158e2c132d..dd0750ac92 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/notification/WarningFloat.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/notification/WarningFloat.kt @@ -147,6 +147,14 @@ class WarningFloat { } } + fun setWindowWidth(width: Int) = apply { + this.config.width = width + } + + fun setWindowHeight(height: Int) = apply { + this.config.height = height + } + /** * 创建浮窗,包括Activity浮窗和系统浮窗,如若系统浮窗无权限,先进行权限申请 */ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/notification/WarningFloatWindowHelper.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/notification/WarningFloatWindowHelper.kt index 20c9b90796..639df0470b 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/notification/WarningFloatWindowHelper.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/notification/WarningFloatWindowHelper.kt @@ -65,8 +65,8 @@ internal class WarningFloatWindowHelper( // 没有边界限制,允许窗口扩展到屏幕外 WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL or WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS else WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL - width = WindowManager.LayoutParams.WRAP_CONTENT - height = WindowManager.LayoutParams.WRAP_CONTENT + width = config.width + height = config.height // 如若设置了固定坐标,直接定位 if (config.locationPair != Pair(0, 0)) { diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/notification/WarningNotificationConfig.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/notification/WarningNotificationConfig.kt index edb0f3e1d1..dcf1151adb 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/notification/WarningNotificationConfig.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/notification/WarningNotificationConfig.kt @@ -1,6 +1,7 @@ package com.mogo.eagle.core.function.hmi.notification import android.view.View +import android.view.WindowManager import com.mogo.eagle.core.function.hmi.notification.anim.DefaultAnimator import com.mogo.eagle.core.function.hmi.notification.enums.ShowPattern import com.mogo.eagle.core.function.hmi.notification.enums.SidePattern @@ -59,4 +60,9 @@ data class WarningNotificationConfig( // Callbacks var callbacks: OnFloatCallbacks? = null, + // 窗口宽度 + var width: Int = WindowManager.LayoutParams.WRAP_CONTENT, + + // 窗口高度 + var height: Int = WindowManager.LayoutParams.WRAP_CONTENT ) \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/receiver/TurnLightBroadcastReceiver.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/receiver/TurnLightBroadcastReceiver.kt index 602986cc1b..5fcdff1252 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/receiver/TurnLightBroadcastReceiver.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/receiver/TurnLightBroadcastReceiver.kt @@ -30,7 +30,6 @@ class TurnLightBroadcastReceiver : BroadcastReceiver() { try { val type = intent.getIntExtra("type", 0) val lightInt = intent.getIntExtra("light", 0) - Logger.d("liyz", "TurnLightBroadcastReceiver type = $type ---- lightInt = $lightInt") showTurnLight(type, lightInt) } catch (e: Exception) { e.printStackTrace() diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt index 4dbd81db85..625c3f6fd5 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt @@ -1,23 +1,30 @@ package com.mogo.eagle.core.function.hmi.ui import android.animation.Animator +import android.os.Bundle +import android.os.Handler import android.text.TextUtils import android.util.Log -import android.view.Gravity -import android.view.View -import android.view.WindowManager +import android.view.* import android.view.animation.OvershootInterpolator +import androidx.annotation.VisibleForTesting +import androidx.lifecycle.lifecycleScope import com.alibaba.android.arouter.facade.annotation.Route +import com.mogo.cloud.passport.MoGoAiCloudClientConfig import com.mogo.commons.mvp.MvpFragment import com.mogo.commons.voice.AIAssist +import com.mogo.eagle.core.data.autopilot.AutoPilotRecordResult import com.mogo.eagle.core.data.camera.CameraEntity import com.mogo.eagle.core.data.config.HmiBuildConfig import com.mogo.eagle.core.data.constants.MoGoFragmentPaths import com.mogo.eagle.core.data.enums.WarningDirectionEnum import com.mogo.eagle.core.data.notice.NoticeNormalData import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData +import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWaringProvider import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager +import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager import com.mogo.eagle.core.function.call.check.CallerCheckManager import com.mogo.eagle.core.function.call.monitor.CallerMonitorManager import com.mogo.eagle.core.function.hmi.R @@ -30,12 +37,21 @@ import com.mogo.eagle.core.function.hmi.ui.notice.NoticeBannerView import com.mogo.eagle.core.function.hmi.ui.notice.NoticeNormalBannerView import com.mogo.eagle.core.function.hmi.ui.setting.DebugSettingView import com.mogo.eagle.core.function.hmi.ui.tools.AutoPilotAndCheckView +import com.mogo.eagle.core.function.hmi.ui.tools.AutoPilotBadCaseView +import com.mogo.eagle.core.function.hmi.ui.tools.post import com.mogo.eagle.core.function.hmi.ui.widget.V2XNotificationView +import com.mogo.eagle.core.utilcode.kotlin.onClick import com.mogo.eagle.core.utilcode.mogo.logger.Logger import com.mogo.eagle.core.utilcode.util.ThreadUtils import com.mogo.eagle.core.utilcode.util.ToastUtils import com.mogo.module.common.enums.EventTypeEnum import kotlinx.android.synthetic.main.fragment_hmi.* +import kotlinx.coroutines.* +import kotlinx.coroutines.channels.Channel +import kotlinx.coroutines.channels.Channel.Factory.UNLIMITED +import java.text.SimpleDateFormat +import java.util.* +import java.util.concurrent.TimeUnit /** * @author xiaoyuzhou @@ -45,7 +61,7 @@ import kotlinx.android.synthetic.main.fragment_hmi.* @Route(path = MoGoFragmentPaths.PATH_FRAGMENT_HMI) class MoGoHmiFragment : MvpFragment(), IMoGoWaringProvider, - MoGoWarningContract.View { + MoGoWarningContract.View, IMoGoAutopilotIdentifyListener { private val TAG = "MoGoHmiFragment" // DebugSettingView @@ -64,9 +80,106 @@ class MoGoHmiFragment : MvpFragment private var toolsView: AutoPilotAndCheckView? = null + private var autoPilotToolsFloat: WarningFloat.Builder? = null + // 检测、自动驾驶速度设置 private var toolsViewFloat: WarningFloat.Builder? = null + @Volatile + private var autoPilotBadCaseEntrance: View? = null + + private var autoPilotBadCaseView: AutoPilotBadCaseView? = null + + companion object { + private const val MSG_WHAT_DISMISS_BAD_CASE_ENTRY = 0x1010 + private val DURATION_FOR_DISMISS = TimeUnit.HOURS.toMillis(4) + } + + @ExperimentalCoroutinesApi + private val channel by lazy { + Channel(UNLIMITED).also { + lifecycleScope.launchWhenResumed { + withContext(Dispatchers.Default) { + while (!it.isClosedForReceive) { + try { + val entrance = autoPilotBadCaseEntrance + val old = entrance?.getTag(R.id.autopilot_badcase_record) as? AutoPilotRecordResult + if (entrance == null || old == null || old.consumed) { + Logger.d(TAG, "-- step -- 1 --") + var oldT = try { + old?.timestamp?.takeIf { it.isNotBlank() }?.let { + SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.getDefault()).parse(it)?.time ?: 0L + } ?: 0L + } catch (t: Throwable) { + t.printStackTrace() + 0L + } + var record: AutoPilotRecordResult? = null + var newT = try { + it.receive()?.also { record = it }?.timestamp?.takeIf { it.isNotBlank() }?.let { + SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.getDefault()).parse(it)?.time + ?: 0L + } ?: 0L + } catch (t: Throwable) { + t.printStackTrace() + 0L + } + + if (oldT == 0L || (newT > 0L && (newT - oldT > 0L) && (newT - oldT) < DURATION_FOR_DISMISS)) { + Logger.d(TAG, "-- step -- 2 --") + record?.takeIf { it.key != old?.key && it.timestamp != old?.timestamp }?.also { + Logger.d(TAG, "record: [$record] is displaying and consuming ~~~" ) + showBadCaseEntrance(it) + } + continue + } + + while (oldT != 0L && newT != 0L && (newT - oldT) >= DURATION_FOR_DISMISS) { + Logger.d(TAG, "record: [$record] has been discarded, because it has been timeout." ) + oldT = newT + newT = try { + it.receive()?.also { + record = it + }?.timestamp?.takeIf { it.isNotBlank() }?.let { + SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.getDefault()).parse(it)?.time ?: 0L + } ?: 0L + } catch (t: Throwable) { + t.printStackTrace() + 0L + } + } + record?.takeIf { it.key != old?.key && it.timestamp != old?.timestamp }?.also { + Logger.d(TAG, "record: [$record] is displaying for rest ..." ) + showBadCaseEntrance(it) + } + } else { + Logger.d(TAG, "record: [$old] hasn't been consumed~~~~" ) + } + } finally { + delay(1000) + } + } + } + } + } + } + + private val handler by lazy { + Handler(Handler.Callback { + if (it.what == MSG_WHAT_DISMISS_BAD_CASE_ENTRY) { + val entrance = autoPilotBadCaseEntrance + if (entrance != null && entrance.visibility == View.VISIBLE) { + Logger.d(TAG, "${DURATION_FOR_DISMISS}毫秒后BadCase入口消失") + (entrance.getTag(R.id.autopilot_badcase_record) as? AutoPilotRecordResult)?.let { itx -> + itx.consumed = true + } + entrance.visibility = View.GONE + } + return@Callback true + } + return@Callback false + }) + } override fun vipIdentification(visible: Boolean) { ThreadUtils.runOnUiThread { @@ -94,50 +207,157 @@ class MoGoHmiFragment : MvpFragment } viewShowDebugView.setOnLongClickListener { - Log.d(TAG, "长按显示状态工具栏") - context?.let { - if (mDebugSettingViewFloat != null) { - WarningFloat.dismiss(mDebugSettingViewFloat!!.config.floatTag, false) - mDebugSettingViewFloat = null - mDebugSettingView = null - } else { - if (mDebugSettingView == null) { - mDebugSettingView = DebugSettingView(it) - } - mDebugSettingViewFloat = WarningFloat.with(it) - .setTag("DebugSettingView") - .setLayout(mDebugSettingView!!) - .setSidePattern(SidePattern.RIGHT) - .setGravity(Gravity.RIGHT, offsetY = 70) - .setImmersionStatusBar(true) - .setAnimator(object : DefaultAnimator() { - override fun enterAnim( - view: View, - params: WindowManager.LayoutParams, - windowManager: WindowManager, - sidePattern: SidePattern - ): Animator? = - super.enterAnim(view, params, windowManager, sidePattern) - ?.apply { - interpolator = OvershootInterpolator() - } - - override fun exitAnim( - view: View, - params: WindowManager.LayoutParams, - windowManager: WindowManager, - sidePattern: SidePattern - ): Animator? = - super.exitAnim(view, params, windowManager, sidePattern) - ?.setDuration(200) - }) - .show() - } - } + toggleDebugView() true } } + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + CallerAutopilotIdentifyListenerManager.addListener(TAG, this) + } + + @ExperimentalCoroutinesApi + override fun onAutopilotRecordResult(record: AutoPilotRecordResult?) { + record ?: return + Logger.d(TAG, "onAutopilotRecordResult:$record") + if (record.type == 1 && record.stat == 100) { + lifecycleScope.launchWhenResumed { + channel.send(record) + } + } + } + + override fun onDestroyView() { + super.onDestroyView() + CallerAutopilotIdentifyListenerManager.removeListener(TAG) + } + + @VisibleForTesting + fun showBadCaseEntrance(record: AutoPilotRecordResult) { + Logger.d(TAG, "showBadCaseEntrance:$record") + lifecycleScope.launch { + if (vs_bad_case_entrance?.parent != null) { + val inflateView = vs_bad_case_entrance.inflate() + autoPilotBadCaseEntrance = inflateView + } + val entrance = autoPilotBadCaseEntrance + if (entrance != null) { + if (entrance.visibility != View.VISIBLE) { + entrance.visibility = View.VISIBLE + } + entrance.setTag(R.id.autopilot_badcase_record, record) + entrance.onClick { + showBadCasesFloat { + it.visibility = View.GONE + } + } + dismissBadCaseEntryAfterSomeTime() + } + } + } + + private fun showBadCasesFloat(dismiss: (() -> Unit)?) { + Logger.d(TAG, "showBadCaseToolsFloat") + context?.let { it -> + if (autoPilotToolsFloat == null) { + if (autoPilotBadCaseView == null) { + autoPilotBadCaseView = AutoPilotBadCaseView(it).also { itx -> + itx.onDismiss { + val record = + autoPilotBadCaseEntrance?.getTag(R.id.autopilot_badcase_record) as? AutoPilotRecordResult + dismissBadCaseFloatView() + } + itx.onSelect { + lifecycleScope.launch { + val record = + autoPilotBadCaseEntrance?.getTag(R.id.autopilot_badcase_record) as? AutoPilotRecordResult + try { + val params = mutableMapOf() + autoPilotBadCaseEntrance?.apply { + params["carLicense"] = + MoGoAiCloudClientConfig.getInstance().sn + params["filename"] = record?.fileName ?: "" + params["filesize"] = record?.total.toString() + params["key"] = record?.key ?: "" + params["reason"] = it.reason ?: "" + params["timestamp"] = System.currentTimeMillis().toString() + } + val response = post(params) + if (response.isSuccessful) { + val body = response.body() + if (body == null) { + Logger.e(TAG, "返回的body是空的~~~") + return@launch + } + if (body.code == 200) { + Logger.i(TAG, "ok:${body}") + dismissBadCaseFloatView() + dismiss?.invoke() + CallerAutoPilotManager.recordCause( + record?.key, + record?.fileName, + it.id, it.reason) + ToastUtils.showShort("接管反馈成功~") + record?.consumed = true + return@launch + } + Logger.e(TAG, "fail:${body}") + } + } catch (t: Throwable) { + t.printStackTrace() + ToastUtils.showShort("网络请求失败,请尝试联网~") + Logger.e(TAG, "exception:${t.message}") + } + } + } + } + } + autoPilotToolsFloat = WarningFloat.with(it) + .setTag("BadCaseCollectFloat") + .setLayout(autoPilotBadCaseView!!) + .setSidePattern(SidePattern.LEFT) + .setGravity(Gravity.LEFT, offsetY = 72) + .setImmersionStatusBar(true) + .setAnimator(object : DefaultAnimator() { + override fun enterAnim( + view: View, + params: WindowManager.LayoutParams, + windowManager: WindowManager, + sidePattern: SidePattern + ): Animator? = + super.enterAnim(view, params, windowManager, sidePattern) + ?.apply { + interpolator = OvershootInterpolator() + } + + override fun exitAnim( + view: View, + params: WindowManager.LayoutParams, + windowManager: WindowManager, + sidePattern: SidePattern + ): Animator? = + super.exitAnim(view, params, windowManager, sidePattern) + ?.setDuration(200) + }) + .addWarningStatusListener(object : IMoGoWarningStatusListener { + override fun onDismiss() { + autoPilotToolsFloat = null + autoPilotBadCaseView = null + } + }) + .show() + } else { + autoPilotToolsFloat?.show() + } + } + } + + private fun dismissBadCaseEntryAfterSomeTime() { + handler.removeMessages(MSG_WHAT_DISMISS_BAD_CASE_ENTRY) + handler.sendEmptyMessageDelayed(MSG_WHAT_DISMISS_BAD_CASE_ENTRY, DURATION_FOR_DISMISS) + } + private fun showToolsFloat() { Logger.d(TAG, "showToolsFloat") context?.let { @@ -154,6 +374,10 @@ class MoGoHmiFragment : MvpFragment override fun onClose(v: View) { dismissToolsFloatView() } + + override fun showDebugPanelView() { + toggleDebugView() + } }) } toolsViewFloat = WarningFloat.with(it) @@ -259,6 +483,52 @@ class MoGoHmiFragment : MvpFragment ivToolsIcon?.visibility = visibility } + /** + * 开关DebugView + */ + override fun toggleDebugView() { + Log.d(TAG, "长按显示状态工具栏") + context?.let { + if (mDebugSettingViewFloat != null) { + WarningFloat.dismiss(mDebugSettingViewFloat!!.config.floatTag, false) + mDebugSettingViewFloat = null + mDebugSettingView = null + } else { + if (mDebugSettingView == null) { + mDebugSettingView = DebugSettingView(it) + } + mDebugSettingViewFloat = WarningFloat.with(it) + .setTag("DebugSettingView") + .setLayout(mDebugSettingView!!) + .setSidePattern(SidePattern.RIGHT) + .setGravity(Gravity.RIGHT, offsetY = 70) + .setImmersionStatusBar(true) + .setAnimator(object : DefaultAnimator() { + override fun enterAnim( + view: View, + params: WindowManager.LayoutParams, + windowManager: WindowManager, + sidePattern: SidePattern + ): Animator? = + super.enterAnim(view, params, windowManager, sidePattern) + ?.apply { + interpolator = OvershootInterpolator() + } + + override fun exitAnim( + view: View, + params: WindowManager.LayoutParams, + windowManager: WindowManager, + sidePattern: SidePattern + ): Animator? = + super.exitAnim(view, params, windowManager, sidePattern) + ?.setDuration(200) + }) + .show() + } + } + } + /** * 展示VR下V2X预警 * @@ -637,12 +907,10 @@ class MoGoHmiFragment : MvpFragment } /** - * 显示转向灯效果 TODO + * 显示转向灯效果 */ override fun showTurnLight(light: Int) { - //Logger.d("liyz", "hmiFragment showTurnLight --- light = $light") -// turnLightView?.visibility = View.VISIBLE - turnLightView.setTurnLight(light) +// turnLightView.setTurnLight(light) } @@ -650,15 +918,66 @@ class MoGoHmiFragment : MvpFragment * 显示刹车效果 */ override fun showBrakeLight(light: Int) { - //Logger.d("liyz", "hmiFragment showBrakeLight --- light = $light") -// brakeView?.visibility = View.VISIBLE - brakeView.setBrakeLight(light) +// brakeView.setBrakeLight(light) } + /** + * 展示工控机下载状态信息 + * @param downloadVersion 下载版本 + * @param downloadStatus 下载状态(0:下载完成;1:正在下载;2:下载失败) + * @param downloadProgress 下载进度 + */ + override fun showAdDownloadStatus( + downloadVersion: String, + downloadStatus: Int, + downloadProgress: Int + ) { +// if (downloadProgress>0){ +// //新版工控机包处于下载中或已下载完成状态,展示工具箱提示角标 +// viewUpgradeTips.visibility = View.VISIBLE +// } + if(downloadStatus==0){ + //新版本工控机包下载完成,处于可升级状态,展示工具箱提示角标 + viewUpgradeTips.visibility = View.VISIBLE + }else if(downloadStatus==1){ + //新版本工控机包正在下载中,展示工具箱提示角标 + viewUpgradeTips.visibility = View.VISIBLE + }else if(downloadStatus==2){ + //新版本工控机包下载失败,隐藏工具箱提交角标 + viewUpgradeTips.visibility = View.GONE + } + + } + + /** + * 展示工控机升级状态信息 + * @param upgradeStatus 升级状态(true代表升级成功、false代表升级不成功) + */ + override fun showAdUpgradeStatus(upgradeStatus: Boolean) { + if(upgradeStatus){ + //工控机升级成功,隐藏工具箱提示角标 + viewUpgradeTips.visibility = View.GONE + }else{ + //工控机升级失败,展示工具箱提示角标 + viewUpgradeTips.visibility = View.VISIBLE + } + //TODO 给工具箱空间传递状态 +// toolsView?.setStatus(true) + } + + private fun dismissBadCaseFloatView() { + autoPilotToolsFloat?.let { + WarningFloat.dismiss(it.config.floatTag, false) + autoPilotToolsFloat = null + autoPilotBadCaseView = null + } + } + override fun onDestroy() { super.onDestroy() Log.d(TAG, "onDestroy") + handler.removeCallbacksAndMessages(null) } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt index 0ae3ac68c7..0ee7fecf7d 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt @@ -81,17 +81,26 @@ class AutoPilotAndCheckView @JvmOverloads constructor( viewCheckStatus.setOnClickListener { clickListener?.go2CheckPage() } + ivDebugPanel.setOnClickListener { + clickListener?.showDebugPanelView() + } etInputSpeed.setOnTouchListener { v, _ -> - if (etInputSpeed.hasFocusable()) { - if (keyBoardUtil == null) { - keyBoardUtil = KeyBoardUtil(sKeyBoardView, etInputSpeed) + if (!connectStatus) { + ToastUtils.showShort("设置车速失败,请启动域控制器") + keyBoardUtil?.hideKeyboard() + return@setOnTouchListener true + } else { + if (etInputSpeed.hasFocusable()) { + if (keyBoardUtil == null) { + keyBoardUtil = KeyBoardUtil(sKeyBoardView, etInputSpeed) + } + keyBoardUtil?.showKeyboard() } - keyBoardUtil?.showKeyboard() + if (!etInputSpeed.hasFocus()) { + etInputSpeed.requestFocus() + } + return@setOnTouchListener false } - if (!etInputSpeed.hasFocus()) { - etInputSpeed.requestFocus() - } - return@setOnTouchListener false } // // 比如需要设置默认速度 // val speed = "30" @@ -124,5 +133,6 @@ class AutoPilotAndCheckView @JvmOverloads constructor( interface ClickListener { fun go2CheckPage() fun onClose(v: View) + fun showDebugPanelView() } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotBadCase.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotBadCase.kt new file mode 100644 index 0000000000..eeefae7d24 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotBadCase.kt @@ -0,0 +1,338 @@ +package com.mogo.eagle.core.function.hmi.ui.tools + +import android.annotation.SuppressLint +import android.content.Context +import android.content.Context.MODE_PRIVATE +import android.graphics.Color +import android.graphics.drawable.ColorDrawable +import android.graphics.drawable.GradientDrawable +import android.graphics.drawable.StateListDrawable +import android.os.Handler +import android.util.AttributeSet +import android.util.StateSet +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.ImageView +import android.widget.TextView +import androidx.annotation.Keep +import androidx.constraintlayout.widget.ConstraintLayout +import androidx.core.content.ContextCompat +import androidx.recyclerview.widget.LinearLayoutManager +import androidx.recyclerview.widget.RecyclerView +import com.google.gson.annotations.Expose +import com.mogo.commons.debug.DebugConfig +import com.mogo.commons.debug.DebugConfig.getNetMode +import com.mogo.eagle.core.function.hmi.R +import com.mogo.eagle.core.function.hmi.ui.tools.BadCaseEntity.Reason +import com.mogo.eagle.core.network.RetrofitFactory +import com.mogo.eagle.core.network.utils.GsonUtil +import com.mogo.eagle.core.utilcode.kotlin.* +import com.mogo.eagle.core.utilcode.util.ThreadUtils +import com.mogo.eagle.core.utilcode.util.Utils +import kotlinx.android.synthetic.main.layout_badcase_collect.view.* +import kotlinx.coroutines.* +import kotlinx.coroutines.android.asCoroutineDispatcher +import retrofit2.Response +import retrofit2.http.FieldMap +import retrofit2.http.FormUrlEncoded +import retrofit2.http.GET +import retrofit2.http.POST +import kotlin.Result.Companion.failure +import kotlin.Result.Companion.success + + +private typealias OnDismissCallback = () -> Unit +private typealias OnSelectCallback = (Reason) -> Unit + +interface BadCaseApi { + + @FormUrlEncoded + @POST("/yycp-vehicle-management-service/tool/badcase/add") + suspend fun post(@FieldMap map: Map): Response + + @GET("/yycp-vehicle-management-service/tool/badcase/reasons") + suspend fun get(): Response +} + +@Keep +class BadCaseEntity { + var code: Int = -1 + var data: List? = null + var msg: String? = null + var success: Boolean = false + var total: Int = -1 + + @Expose(serialize = false, deserialize = false) + var isBuildIn: Boolean = false + + @Keep + class Reason { + var id: String? = null + var reason: String? = null + + /** + * 业务字段,不参与序列化和反序列化 + */ + @Expose(deserialize = false, serialize = false) + var isChecked: Boolean = false + } +} + +@Keep +class PostResult { + var code: Int = -1 + var msg: String? = null + var data: Array? = null + var success: Boolean = false + + override fun toString(): String { + return "Result(code=$code, msg=$msg, data=${data?.contentToString()}, success=$success)" + } +} + +private fun getHost(): String = if (getNetMode() == DebugConfig.NET_MODE_RELEASE) "http://dzt.zhidaozhixing.com" else "http://front.zdjs-private-test.myghost.zhidaoauto.com" + +internal suspend fun post(map: Map): Response { + return RetrofitFactory.getInstance(getHost()).create(BadCaseApi::class.java).post(map) +} + +private suspend fun get(): Response? { + return try { RetrofitFactory.getInstance(getHost()).create(BadCaseApi::class.java).get() } catch (t: Throwable) { t.printStackTrace(); null} +} + +private suspend fun updateCache(entity: BadCaseEntity) = suspendCancellableCoroutine { + try { + val future = ThreadUtils.getIoPool().submit { + try { + val gson = GsonUtil.jsonFromObject(entity) + Sp.saveBody(gson) + it.resumeWith(success(Unit)) + } catch (t: Throwable) { + it.resumeWith(failure(t)) + } + } + it.invokeOnCancellation { + future.cancel(true) + } + } catch (e: Throwable) { + it.resumeWith(failure(e)) + } +} + +private suspend fun getCache(): BadCaseEntity? = suspendCancellableCoroutine { + try { + val body = Sp.getBody() + if (body != null && body.isNotEmpty()) { + val future = ThreadUtils.getIoPool().submit { + try { + val result = GsonUtil.objectFromJson(body, BadCaseEntity::class.java) + it.resumeWith(success(result)) + } catch (t: Throwable) { + it.resumeWith(success(null)) + } + } + it.invokeOnCancellation { + future.cancel(true) + } + } + } catch (t: Throwable) { + it.resumeWith(success(null)) + } +} + +private fun getBuildIn(): BadCaseEntity = BadCaseEntity().also { itx -> + val data = mutableListOf() + data += Reason().also { + it.reason = "变道有干扰" + } + data += Reason().also { + it.reason = "遇红绿灯未停车" + } + data += Reason().also { + it.reason = "遇障碍物未停车" + } + itx.data = data + itx.isBuildIn = true +} + +internal object Sp { + + private val sp by lazy { + Utils.getApp().getSharedPreferences("bad_case_prefs", MODE_PRIVATE) + } + + @SuppressLint("ApplySharedPref") + fun saveBody(body: String) { + sp.edit().putString("prefs", body).commit() + } + + fun getBody(): String? { + return sp.getString("prefs", null) + } +} + +class AutoPilotBadCaseView: ConstraintLayout { + + private var dismiss: OnDismissCallback? = null + private var select: OnSelectCallback? = null + private var cases: List? = null + + private var selectCase: Reason? = null + + private val scope = CoroutineScope(Handler().asCoroutineDispatcher() + SupervisorJob()) + + constructor(context: Context) : this(context, null) + + constructor(context: Context, attrs: AttributeSet?) : this(context, attrs, 0) + + constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) { + LayoutInflater.from(context).inflate(R.layout.layout_badcase_collect, this, true) + background = ColorDrawable(Color.parseColor("#F0151D41")) + isClickable = true + layoutParams = ViewGroup.LayoutParams(960.toPixels().toInt(), 1528.toPixels().toInt()) + + close?.onClick { + dismiss?.invoke() + } + cancel?.also { + it.background = shape(solid = Color.parseColor("#3B4577"), radius = 16) + it.onClick { + dismiss?.invoke() + } + } + ok?.also { + val enabled = gradient(radius = 16.toPixels().toInt(), orientation = GradientDrawable.Orientation.LEFT_RIGHT, centerX = 0.06f, startColor = Color.rgb(35, 146, 252), endColor = Color.rgb(28, 75, 252)) + val disabled = gradient(radius = 16.toPixels().toInt(), orientation = GradientDrawable.Orientation.LEFT_RIGHT, centerX = 0.06f, startColor = Color.rgb(24, 71, 129), endColor = Color.rgb(21, 46, 129)) + it.background = object : StateListDrawable() {}.also { itx -> + itx.addState(intArrayOf(android.R.attr.state_enabled), enabled) + itx.addState(StateSet.WILD_CARD, disabled) + } + it.onClick { + val case = selectCase + if (case != null) { + select?.invoke(case) + } + } + } + } + + override fun onAttachedToWindow() { + super.onAttachedToWindow() + val adapter = rv_take_over?.adapter + if (adapter != null && adapter.itemCount > 0) { + return + } + scope.launch { + showLoading() + try { + get()?.takeIf { it.isSuccessful && it.body() != null && it.body()?.code == 200 }?.let { + val entity = it.body()!! + try { + updateCache(entity) + } catch (t: Throwable) { + t.printStackTrace() + } finally { + updateBadCaseList(entity) + } + } + ?: + getCache()?.also { + updateBadCaseList(it) + } + ?: + updateBadCaseList(getBuildIn()) + } finally { + hideLoading() + } + } + } + + private fun updateBadCaseList(body: BadCaseEntity) { + cases = body.data + rv_take_over?.let { + it.layoutManager = LinearLayoutManager(it.context, LinearLayoutManager.VERTICAL, false) + it.adapter = object : RecyclerView.Adapter() { + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BadCaseViewHolder = BadCaseViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.layout_badcase_item, parent, false)) + override fun onBindViewHolder(holder: BadCaseViewHolder, position: Int) { + val cases = cases + if (cases == null || cases.isEmpty()) { + return + } + if (position >= cases.size) { + return + } + val case = cases[position] + holder.bindData(case) + } + override fun getItemCount(): Int = cases?.size ?: 0 + } + } + } + + override fun onDetachedFromWindow() { + super.onDetachedFromWindow() + scope.cancel("Cancel all for AutoPilotBadCaseView#onDetachedFromWindow") + } + + private fun showLoading() { + pb?.let { + it.visibility = View.VISIBLE + } + } + + private fun hideLoading() { + pb?.let { + it.visibility = View.INVISIBLE + } + } + + private inner class BadCaseViewHolder(item: View) : RecyclerView.ViewHolder(item) { + + private val check: ImageView = item.findViewById(R.id.check) + private val reason: TextView = item.findViewById(R.id.reason) + + init { + check.background = StateListDrawable().also { + it.addState(intArrayOf(android.R.attr.state_selected), ContextCompat.getDrawable(itemView.context, R.drawable.icon_ap_badcase_check)) + it.addState(StateSet.WILD_CARD, ContextCompat.getDrawable(itemView.context, R.drawable.icon_ap_badcase_default)) + } + } + + @SuppressLint("NotifyDataSetChanged") + fun bindData(case: Reason) { + check.isSelected = case.isChecked + reason.text = case.reason ?: "" + if (case.isChecked) { + ok?.isSelected = true + } + itemView.onClick { + case.isChecked = !case.isChecked + selectCase = case + cancelOtherChecked(case) + ok?.isEnabled = hasCheckedItem() + rv_take_over?.adapter?.notifyDataSetChanged() + } + } + + private fun hasCheckedItem(): Boolean = cases?.find { it.isChecked } != null + + private fun cancelOtherChecked(case: Reason) { + val cases = cases + if (cases == null || cases.isEmpty()) { + return + } + cases.filterNot { it == case }.forEach { + it.isChecked = false + } + } + } + + fun onDismiss(dismiss:() -> Unit) { + this.dismiss = dismiss + } + + fun onSelect(cb:(Reason) -> Unit) { + this.select = cb + } +} \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/BrakeViewStatus.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/BrakeViewStatus.kt index a165c7d89e..eb15c8d42a 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/BrakeViewStatus.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/BrakeViewStatus.kt @@ -33,46 +33,53 @@ class BrakeViewStatus @JvmOverloads constructor( LayoutInflater.from(context).inflate(R.layout.view_brake_light_status, this, true) } + private var isBrake :Boolean = false + /** * 刹车动画 */ fun setBrakeLight(brakeLight: Int) { if (brakeLight == 1) { //TODO 暂时还不知道数据,如果一直猜会怎样? - var appearAnimation = AlphaAnimation(0f, 1f) - appearAnimation.duration = 300 - layout_brake.startAnimation(appearAnimation) - image_brake.startAnimation(appearAnimation) - tv_brake.startAnimation(appearAnimation) - layout_brake.visibility = View.VISIBLE - image_brake.visibility = View.VISIBLE - tv_brake.visibility = View.VISIBLE - - } else { //不踩刹车,就消失 - GlobalScope.launch(Dispatchers.Main) { - scaleImageAndTv() + if (!isBrake) { + var appearAnimation = AlphaAnimation(0f, 1f) + appearAnimation.duration = 300 + layout_brake.startAnimation(appearAnimation) + image_brake.startAnimation(appearAnimation) + tv_brake.startAnimation(appearAnimation) + layout_brake.visibility = View.VISIBLE + image_brake.visibility = View.VISIBLE + tv_brake.visibility = View.VISIBLE + isBrake = true } - - var disappearAnimation = AlphaAnimation(1f, 0f) - disappearAnimation.duration = 1200 - layout_brake.startAnimation(disappearAnimation) - image_brake.startAnimation(disappearAnimation) - tv_brake.startAnimation(disappearAnimation) - - disappearAnimation.setAnimationListener(object: Animation.AnimationListener{ - override fun onAnimationRepeat(p0: Animation?) { + } else { //不踩刹车,就消失 + if (isBrake) { + isBrake = false + GlobalScope.launch(Dispatchers.Main) { + scaleImageAndTv() } - override fun onAnimationStart(p0: Animation?) { - } + var disappearAnimation = AlphaAnimation(1f, 0f) + disappearAnimation.duration = 1200 + layout_brake.startAnimation(disappearAnimation) + image_brake.startAnimation(disappearAnimation) + tv_brake.startAnimation(disappearAnimation) - override fun onAnimationEnd(p0: Animation?) { - layout_brake.visibility = View.GONE - image_brake.visibility = View.GONE - tv_brake.visibility = View.GONE + disappearAnimation.setAnimationListener(object: Animation.AnimationListener{ + override fun onAnimationRepeat(p0: Animation?) { + } - stopAnimate() - } - }) + override fun onAnimationStart(p0: Animation?) { + } + + override fun onAnimationEnd(p0: Animation?) { + layout_brake.visibility = View.GONE + image_brake.visibility = View.GONE + tv_brake.visibility = View.GONE + + stopAnimate() + } + }) + } } } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt index ecd6a13c84..476fccc2af 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt @@ -30,11 +30,55 @@ class TurnLightViewStatus @JvmOverloads constructor( LayoutInflater.from(context).inflate(R.layout.view_turn_light_status, this, true) } + private var isShowNormalBg :Boolean = false + private var isLeftLight :Boolean = false + private var isRightLight :Boolean = false + private var isDisappare :Boolean = false + /** * 转向灯动画 */ fun setTurnLight(directionLight: Int) { - //显示背景 + if (!isShowNormalBg && (directionLight == 1 || directionLight == 2)) { + showNormalAnimation() + isShowNormalBg = true + } + + //根据左右进行显示和隐藏,实际要判断每个来的时间和频度 + if (directionLight == 1) { //左转向 + if (!isLeftLight) { + left_select_image.visibility = View.VISIBLE + right_select_image.visibility = View.GONE + right_select_image.clearAnimation() + setAnimation(left_select_image) + isLeftLight = true + isRightLight = false + isDisappare = false + } + } else if (directionLight == 2) { //右转向 + if (!isRightLight) { + left_select_image.visibility = View.GONE + right_select_image.visibility = View.VISIBLE + left_select_image.clearAnimation() + setAnimation(right_select_image) + isRightLight = true + isLeftLight = false + isDisappare = false + } + + } else { //消失 + if (!isDisappare) { + animationDisappear() + isDisappare = true + isShowNormalBg = false + isLeftLight = false + isDisappare = false + } + } + } + + //显示背景 + private fun showNormalAnimation() { val appearAnimation = AlphaAnimation(0f, 1.0f) appearAnimation.duration = 600 val appearAnimationImage = AlphaAnimation(0f, 1.0f) @@ -46,36 +90,24 @@ class TurnLightViewStatus @JvmOverloads constructor( turn_light_layout.visibility = View.VISIBLE left_nor_image.visibility = View.VISIBLE right_nor_image.visibility = View.VISIBLE - - //根据左右进行显示和隐藏,实际要判断每个来的时间和频度 - if (directionLight == 1) { //左转向 - left_select_image.visibility = View.VISIBLE - right_select_image.visibility = View.GONE - right_select_image.clearAnimation() - setAnimation(left_select_image) - } else if (directionLight == 2) { //右转向 - left_select_image.visibility = View.GONE - right_select_image.visibility = View.VISIBLE - left_select_image.clearAnimation() - setAnimation(right_select_image) - } else { //消失 - animationDisappear() - stopAnimate() - } } //消失动画,当转向等数据为空时候 private fun animationDisappear() { left_select_image.visibility = View.GONE right_select_image.visibility = View.GONE + left_select_image.clearAnimation() + right_select_image.clearAnimation() + val disappearAnimationLeft = AlphaAnimation(1.0f, 0f) - disappearAnimationLeft.duration = 200 + disappearAnimationLeft.duration = 300 val disappearAnimationBg = AlphaAnimation(1.0f, 0f) - disappearAnimationBg.duration = 1000 - turn_light_layout.startAnimation(disappearAnimationBg) + disappearAnimationBg.duration = 1200 + left_nor_image.startAnimation(disappearAnimationLeft) right_nor_image.startAnimation(disappearAnimationLeft) + turn_light_layout.startAnimation(disappearAnimationBg) disappearAnimationLeft.setAnimationListener(object : Animation.AnimationListener { override fun onAnimationRepeat(p0: Animation?) { @@ -99,6 +131,7 @@ class TurnLightViewStatus @JvmOverloads constructor( override fun onAnimationEnd(p0: Animation?) { turn_light_layout.visibility = View.GONE + stopAnimate() } }) } @@ -114,8 +147,9 @@ class TurnLightViewStatus @JvmOverloads constructor( } private fun stopAnimate() { - left_select_image.clearAnimation() - right_select_image.clearAnimation() + turn_light_layout.clearAnimation() + left_nor_image.clearAnimation() + right_nor_image.clearAnimation() } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/CircularProgressView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/CircularProgressView.kt new file mode 100644 index 0000000000..66be06132d --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/CircularProgressView.kt @@ -0,0 +1,191 @@ +package com.mogo.eagle.core.function.hmi.ui.widget + +import android.animation.ValueAnimator +import android.content.Context +import android.content.res.TypedArray +import android.graphics.* +import android.util.AttributeSet +import android.view.View +import android.view.animation.OvershootInterpolator +import androidx.core.content.ContextCompat +import com.mogo.eagle.core.function.hmi.R + +/** + * @author XuXinChao + * @description 自定义圆形进度条 + * @since: 2022/1/14 + */ +class CircularProgressView @JvmOverloads constructor( + context: Context, attrs: AttributeSet?, defStyleAttr : Int) + : View(context, attrs, defStyleAttr){ + + val typedArray : TypedArray = context.obtainStyledAttributes(attrs, R.styleable.CircularProgressView) + // 绘制画笔 + private val mBackPaint : Paint = Paint() + private val mProgPaint : Paint = Paint() + // 绘制区域 + private var mRectF : RectF? = null + // 圆环渐变色 + private var mColorArray : IntArray?=null + // 圆环进度(0-100) 初始化进度 + private var mProgress : Int = typedArray.getInteger(R.styleable.CircularProgressView_progress, 0) + + constructor(context : Context) : this(context,null) + + constructor(context : Context,attrs : AttributeSet?) :this(context, attrs, 0) + + init { + // 初始化背景圆环画笔 + mBackPaint.style = Paint.Style.STROKE // 只描边,不填充 + mBackPaint.strokeCap = Paint.Cap.ROUND // 设置圆角 + mBackPaint.isAntiAlias = true // 设置抗锯齿 + mBackPaint.isDither = true // 设置抖动 + mBackPaint.strokeWidth = typedArray.getDimension(R.styleable.CircularProgressView_backWidth, 5.0f) + mBackPaint.color = typedArray.getColor(R.styleable.CircularProgressView_backColor, Color.LTGRAY) + // 初始化进度圆环画笔 + mProgPaint.style = Paint.Style.STROKE // 只描边,不填充 + mProgPaint.strokeCap = Paint.Cap.ROUND // 设置圆角 + mProgPaint.isAntiAlias = true // 设置抗锯齿 + mProgPaint.isDither = true // 设置抖动 + mProgPaint.strokeWidth = typedArray.getDimension(R.styleable.CircularProgressView_progWidth, 10.0f) + mProgPaint.color = typedArray.getColor(R.styleable.CircularProgressView_progColor, Color.BLUE) + // 初始化进度圆环渐变色 + val startColor = typedArray.getColor(R.styleable.CircularProgressView_progStartColor, -1) + val firstColor = typedArray.getColor(R.styleable.CircularProgressView_progFirstColor, -1) + if(startColor != -1 && firstColor != -1){ + mColorArray = intArrayOf(startColor,firstColor) + }else{ + mColorArray = null + } + + + typedArray.recycle(); + } + + override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { + super.onMeasure(widthMeasureSpec, heightMeasureSpec) + val viewWide = getMeasuredWidth() - getPaddingLeft() - getPaddingRight(); + val viewHigh = getMeasuredHeight() - getPaddingTop() - getPaddingBottom(); + val mRectLength = + ((if (viewWide > viewHigh) viewHigh else viewWide) - if (mBackPaint.strokeWidth > mProgPaint.strokeWidth) mBackPaint.strokeWidth else mProgPaint.strokeWidth).toInt() + val mRectL = getPaddingLeft() + (viewWide - mRectLength) / 2 + val mRectT = getPaddingTop() + (viewHigh - mRectLength) / 2 + mRectF = RectF(mRectL.toFloat(), mRectT.toFloat(), (mRectL + mRectLength).toFloat(), + (mRectT + mRectLength).toFloat()) + // 设置进度圆环渐变色 + mColorArray?.let { + mProgPaint.shader = LinearGradient( + 0.0f, 0.0f, 0.0f, + measuredWidth.toFloat(), it, null, Shader.TileMode.MIRROR) + } + + } + + override fun onDraw(canvas: Canvas?) { + super.onDraw(canvas) + canvas?.let { + mRectF?.let { it1 -> it.drawArc(it1, 0.0f, 360.0f, false, mBackPaint) } + mRectF?.let { it1 -> it.drawArc(it1, 275.0f, + (360 * mProgress / 100).toFloat(), false, mProgPaint) } + } + + } + + /** + * 获取当前进度 + * @return 当前进度(0-100) + */ + fun getProgress() : Int{ + return mProgress + } + + /** + * 设置当前进度 + * @param progress 当前进度(0-100) + */ + fun setProgress(progress : Int){ + mProgress = progress + invalidate() + } + + /** + * 设置当前进度,并展示进度动画。如果动画时间小于等于0,则不展示动画 + * @param progress 当前进度(0-100) + * @param animTime 动画时间(毫秒) + */ + fun setProgress(progress : Int, animTime : Long){ + if (animTime<=0){ + setProgress(progress) + } else{ + val animator = ValueAnimator.ofInt(mProgress, progress) + animator.addUpdateListener{ + mProgress = it.animatedValue as Int + invalidate() + } + animator.interpolator = OvershootInterpolator() + animator.duration = animTime + animator.start() + } + } + + /** + * 设置背景圆环宽度 + * @param width 背景圆环宽度 + */ + fun setBackWidth(width : Int){ + mBackPaint.strokeWidth = width.toFloat() + invalidate() + } + + /** + * 设置背景圆环颜色 + * @param color 背景圆环颜色 + */ + fun setBackColor(color : Int){ + mBackPaint.color = ContextCompat.getColor(context,color) + invalidate() + } + + /** + * 设置进度圆环宽度 + * @param width 进度圆环宽度 + */ + fun setProgWidth(width : Int){ + mProgPaint.strokeWidth = width.toFloat() + invalidate() + } + + /** + * 设置进度圆环颜色 + * @param color 景圆环颜色 + */ + fun setProgColor(color : Int){ + mProgPaint.color = ContextCompat.getColor(context,color) + mProgPaint.shader = null + invalidate() + } + + fun setProgColor(startColor : Int,endColor: Int){ + mColorArray = intArrayOf(ContextCompat.getColor(context,startColor),ContextCompat.getColor(context,endColor)) + mColorArray?.let { + mProgPaint.shader = LinearGradient(0f, 0f, 0f, + getMeasuredWidth().toFloat(), it, null, Shader.TileMode.MIRROR) + } + + } + + fun setProgColor(colorArray : IntArray){ + colorArray.let { + if(it.size<2){ + return + } + mColorArray = it.copyOf() + mColorArray?.let{ + mProgPaint.shader = LinearGradient(0f, 0f, 0f, + getMeasuredWidth().toFloat(), it, null, Shader.TileMode.MIRROR) + } + } + + } + +} \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SystemVersionView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SystemVersionView.kt index 69f5f076af..58e9a52bc1 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SystemVersionView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SystemVersionView.kt @@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.hmi.ui.widget import android.content.Context import android.util.AttributeSet import android.view.LayoutInflater +import android.view.View import androidx.constraintlayout.widget.ConstraintLayout import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener @@ -10,6 +11,8 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.ui.tools.AdUpgradeDialog import com.mogo.eagle.core.utilcode.mogo.logger.Logger +import com.mogo.eagle.core.utilcode.util.AppUtils +import com.mogo.eagle.core.utilcode.util.ToastUtils import kotlinx.android.synthetic.main.view_system_version.view.* /** @@ -25,10 +28,18 @@ class SystemVersionView @JvmOverloads constructor( companion object { const val TAG = "SystemVersionView" + + const val AD_LATEST_VERSION = 1 //AD最新版 + const val AD_DOWNING = 2 //AD下载中 + const val AD_DOWNLOAD_FAIL = 3 //AD下载失败 + const val AD_UPGRADEABLE = 4 //AD下载成功,可升级状态 + const val AD_UPGRADING = 5 //AD升级中 + const val AD_UPGRADE_FAIL = 6 //AD升级失败 } private var connectStatus = false private var adUpgradeDialog : AdUpgradeDialog? = null + private var adStatus = AD_LATEST_VERSION //工控机默认为最新版 init { LayoutInflater.from(context).inflate(R.layout.view_system_version, this, true) @@ -36,6 +47,9 @@ class SystemVersionView @JvmOverloads constructor( } private fun initView(){ + showCurrentPadVersion() + showCurrentAdVersion() + //鹰眼版本视图点击事件 ivPadVersion.setOnClickListener { Logger.i(TAG,"pad version view clicked") @@ -43,10 +57,104 @@ class SystemVersionView @JvmOverloads constructor( //工控机版本视图点击事件 ivAdVersion.setOnClickListener { Logger.i(TAG,"ad version view clicked") - if(adUpgradeDialog == null){ - adUpgradeDialog = AdUpgradeDialog(context) + when(adStatus){ + AD_LATEST_VERSION -> { + //最新版 + + } + AD_DOWNING -> { + //下载中 + //TODO 需要向工控机要下载时间 + ToastUtils.showShort("新版本下载中,预计XX分钟下载完成") + } + AD_DOWNLOAD_FAIL -> { + //下载失败 + + } + AD_UPGRADEABLE -> { + //下载成功,可升级,点击弹起升级确认弹窗 + if(adUpgradeDialog == null){ + adUpgradeDialog = AdUpgradeDialog(context) + } + adUpgradeDialog?.showUpgradeDialog() + } + AD_UPGRADING -> { + //升级中 + ToastUtils.showShort("新版本升级中,预计5分钟升级完成") + } + AD_UPGRADE_FAIL -> { + //升级失败 + ToastUtils.showShort("升级失败,请联系运维人员") + } + } - adUpgradeDialog?.showUpgradeDialog() + + } + + } + + /** + * 展示当前鹰眼版本 + */ + private fun showCurrentPadVersion(){ + tvPadVersionContent?.let { + it.text = AppUtils.getAppVersionName() + } + } + + /** + * 展示当前工控机版本 + */ + private fun showCurrentAdVersion(){ + tvAdVersionContent?.let { +// it.text = AdasManager.getInstance().getAdasConfig().getDockVersion()) + } + } + + /** + * 展示工控机下载状态信息 + * @param downloadVersion 下载版本 + * @param downloadStatus 下载状态(0:下载完成;1:正在下载;2:下载失败) + * @param downloadProgress 下载进度 + */ + fun showAdDownloadStatus(downloadVersion : String,downloadStatus : Int,downloadProgress : Int){ + if(downloadStatus==0){ + //下载完成,处于可升级状态,展示“可升级”角标,将AD背景变为蓝色,并隐藏下载进度条 + adStatus = AD_UPGRADEABLE + ivAdStatus?.setImageResource(R.drawable.icon_upgradeable) + ivAdVersion?.setBackgroundResource(R.drawable.version_upgradeable_background) + adCircularProgressView?.visibility = View.GONE + }else if(downloadStatus==1){ + //正在下载,展示“下载中”角标,展示进度条,并设置当前下载进度 + adStatus = AD_DOWNING + ivAdStatus?.setImageResource(R.drawable.icon_downloading) + adCircularProgressView?.let { + it.visibility = View.VISIBLE + it.setProgress(downloadProgress) + } + }else if(downloadStatus==2){ + //下载失败,目前暂时将状态设为“最新版”角标,并隐藏进度条 + adStatus = AD_DOWNLOAD_FAIL + ivAdStatus?.setImageResource(R.drawable.icon_latest_version) + adCircularProgressView?.visibility = View.GONE + } + + + } + + /** + * 展示工控机升级状态信息 + * @param upgradeStatus 升级状态(true代表升级成功、false代表升级不成功) + */ + fun showAdUpgradeStatus(upgradeStatus : Boolean){ + if(upgradeStatus){ + //AD升级成功,工控机图标展示最新版样式 + adStatus = AD_LATEST_VERSION + ivAdStatus?.setImageResource(R.drawable.icon_latest_version) + }else{ + //AD升级失败,工控机图标展示升级失败样式 + adStatus = AD_UPGRADE_FAIL + ivAdStatus?.setImageResource(R.drawable.icon_upgrade_failed) } } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/check_car_nor.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/check_car_nor.png index 7d7d3726ad..68b4049608 100644 Binary files a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/check_car_nor.png and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/check_car_nor.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/check_reboot.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/check_reboot.png index 1dc23567a1..6551231c43 100644 Binary files a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/check_reboot.png and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/check_reboot.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/check_shut_down.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/check_shut_down.png index b4f0fcb27c..2e2017cb27 100644 Binary files a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/check_shut_down.png and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/check_shut_down.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/debug_icon_nor.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/debug_icon_nor.png new file mode 100644 index 0000000000..541b6040d1 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/debug_icon_nor.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_ap_badcase_check.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_ap_badcase_check.png new file mode 100644 index 0000000000..3f05565483 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_ap_badcase_check.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_ap_badcase_default.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_ap_badcase_default.png new file mode 100644 index 0000000000..0114bb4f2b Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_ap_badcase_default.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_car_ap_badcase_entrance.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_car_ap_badcase_entrance.png new file mode 100644 index 0000000000..89a6eaa5dc Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_car_ap_badcase_entrance.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_downloading.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_downloading.png new file mode 100644 index 0000000000..c43939ea59 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_downloading.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_upgrade_failed.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_upgrade_failed.png new file mode 100644 index 0000000000..4e4966b6ce Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_upgrade_failed.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_upgradeable.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_upgradeable.png new file mode 100644 index 0000000000..8255b8d564 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_upgradeable.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_upgrading.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_upgrading.png new file mode 100644 index 0000000000..61e58db5d6 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/icon_upgrading.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml index b4e0c7aabf..1e207d28c8 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml @@ -97,6 +97,18 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toEndOf="@+id/viewPerspectiveSwitch" app:layout_goneMarginStart="50px" /> + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/layout_badcase_item.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/layout_badcase_item.xml new file mode 100644 index 0000000000..d8bbe22a3b --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/layout_badcase_item.xml @@ -0,0 +1,28 @@ + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_ap_badcase_entrance.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_ap_badcase_entrance.xml new file mode 100644 index 0000000000..d77bcfe7a3 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_ap_badcase_entrance.xml @@ -0,0 +1,11 @@ + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml index b04aa31518..54641ba41e 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml @@ -58,6 +58,28 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/viewCheckStatus" /> + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/values/ids.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/values/ids.xml new file mode 100644 index 0000000000..df10b924c5 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/values/ids.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml index cd38032747..1f76aa9980 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml @@ -1,5 +1,5 @@ - mogo-module-push + mogo-core-function-hmi 查看 最小化 @@ -20,6 +20,7 @@ 日志加载中... 车辆检测 + 调试面板 车速设置 系统运行 关机 diff --git a/core/function-impl/mogo-core-function-main/build.gradle b/core/function-impl/mogo-core-function-main/build.gradle index 271fc0660b..577bdb204c 100644 --- a/core/function-impl/mogo-core-function-main/build.gradle +++ b/core/function-impl/mogo-core-function-main/build.gradle @@ -70,10 +70,7 @@ dependencies { api rootProject.ext.dependencies.mogoservice api rootProject.ext.dependencies.moduleshare api rootProject.ext.dependencies.moduleextensions - api rootProject.ext.dependencies.modulemap api rootProject.ext.dependencies.moduleADAS - api rootProject.ext.dependencies.modulepushbase - api rootProject.ext.dependencies.modulepush api rootProject.ext.dependencies.callchat api rootProject.ext.dependencies.callchatprovider api rootProject.ext.dependencies.mapcustom @@ -100,12 +97,8 @@ dependencies { api project(':foudations:mogo-commons') api project(':modules:mogo-module-common') api project(':modules:mogo-module-service') - api project(':modules:mogo-module-share') api project(':modules:mogo-module-extensions') - api project(':modules:mogo-module-map') api project(':modules:mogo-module-adas') - api project(":modules:mogo-module-push-base") - api project(":modules:mogo-module-push") api project(':modules:mogo-module-carchatting') api project(':modules:mogo-module-carchattingprovider') api project(':libraries:map-custom') diff --git a/core/function-impl/mogo-core-function-main/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java b/core/function-impl/mogo-core-function-main/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java index 6fadf4f8ae..4fd2c059ec 100644 --- a/core/function-impl/mogo-core-function-main/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java +++ b/core/function-impl/mogo-core-function-main/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java @@ -31,7 +31,6 @@ import com.mogo.module.common.MogoModule; import com.mogo.module.common.MogoModulePaths; import com.mogo.module.common.constants.HostConst; import com.mogo.module.service.ServiceConst; -import com.mogo.module.share.constant.ShareConstants; import com.mogo.service.IMogoServiceApis; import com.mogo.service.cloud.socket.IMogoLifecycleListener; import com.mogo.test.crashreport.CrashReportConstants; @@ -306,19 +305,10 @@ public abstract class MainMoGoApplication extends AbsMogoApplication { } MogoModulePaths.addBaseModule(new MogoModule(MapApiPath.PATH, "CustomMapApiBuilder")); - MogoModulePaths.addBaseModule(new MogoModule(ServiceConst.PATH_TTS_CONFIG, ServiceConst.PATH_TTS_CONFIG)); - MogoModulePaths.addBaseModule(new MogoModule(ShareConstants.TAG, ShareConstants.MODEL_NAME)); - MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_TANLU_API, "TanluApi")); - MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_TRAFFIC_UPLOAD, "TrafficUpload")); - MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_SHARE, "ShareControl")); MogoModulePaths.addBaseModule(new MogoModule(ServiceConst.PATH_REFRESH_STRATEGY, ServiceConst.PATH_REFRESH_STRATEGY)); // MogoModulePaths.addBaseModule(new MogoModule(V2XConst.PATH_V2X_UI, V2XConst.MODULE_NAME)); - MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_STRATEGY_SHARE, "StrategyShare")); - MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_GAODE_AIMLESS_SHARE, "GaoDeAimlessShare")); - //mogo deva tools MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_DEVA_TOOLS, "IMoGoDevaToolsProvider")); - // 域控制器模块(新) MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_AUTO_PILOT, "IMoGoAutoPilotProvider")); // OBU 模块 @@ -327,7 +317,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication { MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_AI_MONITORING, "IMoGoMonitoringProvider")); // 云公告发布 MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_AI_NOTICE, "IMoGoNoticeProvider")); - // V2X 模块 MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_V2X_MODULE, "V2XProvider")); // 自动驾驶系统检测模块 diff --git a/core/function-impl/mogo-core-function-map/build.gradle b/core/function-impl/mogo-core-function-map/build.gradle index ab14ac4055..cc7eeed20f 100644 --- a/core/function-impl/mogo-core-function-map/build.gradle +++ b/core/function-impl/mogo-core-function-map/build.gradle @@ -60,6 +60,9 @@ dependencies { implementation rootProject.ext.dependencies.mogo_core_utils implementation rootProject.ext.dependencies.mogo_core_function_api implementation rootProject.ext.dependencies.mogo_core_function_call + + implementation rootProject.ext.dependencies.mogomap + implementation rootProject.ext.dependencies.mogomapapi } else { implementation project(':modules:mogo-module-common') implementation project(':services:mogo-service-api') @@ -68,6 +71,9 @@ dependencies { implementation project(':core:mogo-core-utils') implementation project(':core:mogo-core-function-api') implementation project(':core:mogo-core-function-call') + + implementation project(":libraries:mogo-map") + implementation project(":libraries:mogo-map-api") } } diff --git a/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapFragment.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java similarity index 94% rename from modules/mogo-module-map/src/main/java/com/mogo/module/map/MapFragment.java rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java index 22c5e923e3..451ad1fae9 100644 --- a/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapFragment.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java @@ -1,4 +1,4 @@ -package com.mogo.module.map; +package com.mogo.eagle.core.function.map; import android.content.Context; import android.os.Bundle; @@ -94,7 +94,6 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > mMogoMap = mMogoMapView.getMap(); if ( mMogoMap != null ) { mMogoMap.getUIController().showMyLocation( true ); - mMogoMap.getUIController().recoverLockMode();// 启动锁车 } } @@ -128,7 +127,6 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > if ( mMogoMapView != null ) { mMogoMapView.onPause(); } - MapBroadCastHelper.getInstance( getContext() ).mapBackground(); } @Override @@ -140,7 +138,6 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > if ( mMogoMapView != null ) { mMogoMapView.onResume(); } - MapBroadCastHelper.getInstance( getContext() ).mapFrount(); } @Override @@ -178,9 +175,6 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > uiSettings.setZoomControlsEnabled( false ); //设置双指缩放手势是否可用。 uiSettings.setZoomGesturesEnabled( true ); - if ( mMogoMap.getUIController() != null ) { - mMogoMap.getUIController().changeMapMode( EnumMapUI.CarUp_2D ); - } } } @@ -196,7 +190,6 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > @Override public void onDestroyView() { - MapBroadCastHelper.getInstance( getContext() ).release(); if ( mMogoMapView != null ) { mMogoMapView.onDestroy(); mMogoMapView = null; @@ -222,17 +215,16 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > mMogoMapView.getMap().getUIController().changeCurrentIcon(iconId); } - /** * sight mode * @param mode */ - public static final int SIGHT_MODE_NORMAL = 0; public static final int SIGHT_MODE_TOP = 1; public static final int SIGHT_MODE_BACK = 2; public static final int SIGHT_MODE_CROSS = 3; public static final int SIGHT_MODE_FAR = 4; + @Override public void setMapDAngle(int mode) { float angle = getSightModeAngle(mode); diff --git a/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapFrameController.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFrameController.java similarity index 96% rename from modules/mogo-module-map/src/main/java/com/mogo/module/map/MapFrameController.java rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFrameController.java index c48ddf8126..9218ddbf0c 100644 --- a/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapFrameController.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFrameController.java @@ -1,4 +1,4 @@ -package com.mogo.module.map; +package com.mogo.eagle.core.function.map; import android.content.Context; diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPresenter.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPresenter.java new file mode 100644 index 0000000000..86223a257a --- /dev/null +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPresenter.java @@ -0,0 +1,19 @@ +package com.mogo.eagle.core.function.map; + +import com.mogo.commons.mvp.Presenter; + +/** + * @author congtaowang + * @since 2019-12-23 + *

+ * 描述 + */ +public class MapPresenter extends Presenter { + + private static final String TAG = "MapPresenter"; + + public MapPresenter(MapView view) { + super(view); + } + +} diff --git a/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapView.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapView.java similarity index 88% rename from modules/mogo-module-map/src/main/java/com/mogo/module/map/MapView.java rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapView.java index 8bb8ae2a88..ac3adb7d4c 100644 --- a/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapView.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapView.java @@ -1,4 +1,4 @@ -package com.mogo.module.map; +package com.mogo.eagle.core.function.map; import com.mogo.commons.mvp.IView; import com.mogo.map.uicontroller.IMogoMapUIController; diff --git a/modules/mogo-module-map/src/main/res/layout/module_map_fragment_map.xml b/core/function-impl/mogo-core-function-map/src/main/res/layout/module_map_fragment_map.xml similarity index 100% rename from modules/mogo-module-map/src/main/res/layout/module_map_fragment_map.xml rename to core/function-impl/mogo-core-function-map/src/main/res/layout/module_map_fragment_map.xml diff --git a/modules/mogo-module-map/src/main/res/values-xhdpi/dimens.xml b/core/function-impl/mogo-core-function-map/src/main/res/values-xhdpi/dimens.xml similarity index 100% rename from modules/mogo-module-map/src/main/res/values-xhdpi/dimens.xml rename to core/function-impl/mogo-core-function-map/src/main/res/values-xhdpi/dimens.xml diff --git a/modules/mogo-module-map/src/main/res/values/dimens.xml b/core/function-impl/mogo-core-function-map/src/main/res/values/dimens.xml similarity index 100% rename from modules/mogo-module-map/src/main/res/values/dimens.xml rename to core/function-impl/mogo-core-function-map/src/main/res/values/dimens.xml diff --git a/core/function-impl/mogo-core-function-map/src/main/res/values/strings.xml b/core/function-impl/mogo-core-function-map/src/main/res/values/strings.xml new file mode 100644 index 0000000000..d32a85d33b --- /dev/null +++ b/core/function-impl/mogo-core-function-map/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + mogo-core-function-map + diff --git a/core/function-impl/mogo-core-function-notice/src/main/java/com/mogo/eagle/core/function/notice/fragment/MessageHistoryFragment.java b/core/function-impl/mogo-core-function-notice/src/main/java/com/mogo/eagle/core/function/notice/fragment/MessageHistoryFragment.java index e0c02a3839..8d166c37e1 100644 --- a/core/function-impl/mogo-core-function-notice/src/main/java/com/mogo/eagle/core/function/notice/fragment/MessageHistoryFragment.java +++ b/core/function-impl/mogo-core-function-notice/src/main/java/com/mogo/eagle/core/function/notice/fragment/MessageHistoryFragment.java @@ -10,34 +10,31 @@ import androidx.recyclerview.widget.RecyclerView; import com.mogo.commons.AbsMogoApplication; import com.mogo.commons.analytics.AnalyticsUtils; import com.mogo.commons.mvp.MvpFragment; -import com.mogo.eagle.core.function.notice.R; -import com.mogo.eagle.core.function.notice.utils.AnimatorUtilsKt; -import com.mogo.eagle.core.function.notice.view.GlobalToolsKt; -import com.mogo.eagle.core.function.notice.view.PushItemAnimator; -import com.mogo.eagle.core.function.notice.view.SwipeItemLayout; -import com.mogo.eagle.core.utilcode.util.UiThreadHandler; -import com.mogo.module.common.view.OnPreventFastClickListener; import com.mogo.eagle.core.function.notice.Config; +import com.mogo.eagle.core.function.notice.R; import com.mogo.eagle.core.function.notice.adapter.PushMessageAdapter; import com.mogo.eagle.core.function.notice.model.PushBean; import com.mogo.eagle.core.function.notice.repository.PushRepository; +import com.mogo.eagle.core.function.notice.utils.AnimatorUtilsKt; import com.mogo.eagle.core.function.notice.utils.HandlerUtils; +import com.mogo.eagle.core.function.notice.view.PushItemAnimator; +import com.mogo.eagle.core.function.notice.view.SwipeItemLayout; import com.mogo.eagle.core.function.notice.viewmodel.MessageViewModel; -import com.mogo.service.statusmanager.IMogoMsgCenterListener; +import com.mogo.eagle.core.utilcode.util.UiThreadHandler; +import com.mogo.module.common.view.OnPreventFastClickListener; import org.jetbrains.annotations.NotNull; import java.util.HashMap; import java.util.Map; -public /** * @author congtaowang * @since 2020/9/1 * * 描述 */ -class MessageHistoryFragment extends MvpFragment< MessageHistoryView, MessageHistoryPresenter > implements MessageHistoryView, IMogoMsgCenterListener { +public class MessageHistoryFragment extends MvpFragment< MessageHistoryView, MessageHistoryPresenter > implements MessageHistoryView { private static final String TAG = "MessageHistoryFragment"; @@ -143,7 +140,6 @@ class MessageHistoryFragment extends MvpFragment< MessageHistoryView, MessageHis mRootView.setOnClickListener( view -> { } ); - GlobalToolsKt.getApis( getContext() ).getMsgCenterApi().registerMsgCenterListener( this ); } private void exitSelf() { @@ -178,13 +174,6 @@ class MessageHistoryFragment extends MvpFragment< MessageHistoryView, MessageHis } ); } - @Override - public void onMsgChanged( boolean hasMsg, int amount ) { - HandlerUtils.INSTANCE.getMBgHandler().post( () -> { - mViewModel.setList( PushRepository.Companion.getPushRepository().getAll() ); - } ); - } - @Override public void onResume() { super.onResume(); @@ -199,6 +188,5 @@ class MessageHistoryFragment extends MvpFragment< MessageHistoryView, MessageHis @Override public void onDestroyView() { super.onDestroyView(); - GlobalToolsKt.getApis( getContext() ).getMsgCenterApi().unregisterMsgCenterListener( this ); } } diff --git a/core/function-impl/mogo-core-function-notice/src/main/java/com/mogo/eagle/core/function/notice/repository/PushRepository.kt b/core/function-impl/mogo-core-function-notice/src/main/java/com/mogo/eagle/core/function/notice/repository/PushRepository.kt index 0e6f2bfb31..7309604347 100644 --- a/core/function-impl/mogo-core-function-notice/src/main/java/com/mogo/eagle/core/function/notice/repository/PushRepository.kt +++ b/core/function-impl/mogo-core-function-notice/src/main/java/com/mogo/eagle/core/function/notice/repository/PushRepository.kt @@ -43,7 +43,6 @@ class PushRepository(mContext: Context) { private val pushViewModel: PushViewModel = PushViewModel(mContext, this) private val pushBeanQueue: Queue = LinkedList() private val statusManager = getApis(mContext).statusManagerApi - private val msgCenter = getApis(mContext).msgCenterApi val pushBeanDao by lazy { Room.databaseBuilder(appContext, PushBeanDatabase::class.java, "database_push").build() .pushBeanDao() @@ -59,37 +58,6 @@ class PushRepository(mContext: Context) { } init { - // 注册push通道监听 type 100时为push消息 lixp TODO -// getApis(mContext).getSocketManagerApi(mContext) -// .registerOnMessageListener(Config.PUSH_TYPE, object : IMogoOnMessageListener { -// override fun target(): Class { -// return PushBean::class.java -// } -// -// override fun onMsgReceived(bean: PushBean?) { -// Log.d("PushRepository", "pushBean = $bean") -// if (bean != null) { -// AnalyticsUtils.track(Config.NEWS_ARRIVE, "title", bean.title) -// if (bean.mainSchema.isBlank()) { -// bean.mainSchema = "" -// } -// if (bean.imageUrl.isBlank()) { -// bean.imageUrl = "" -// } -// if (bean.appIcon.isBlank()) { -// bean.appIcon = "" -// } -// pushBeanQueue.offer(bean) -// } -// if ( bean != null) { -// HandlerUtils.mBgHandler.post { -// pushBeanDao.insertAll(bean) -// updateMsgNum() -// } -// } -// startIterate() -// } -// }) HandlerUtils.mBgHandler.postDelayed({ updateMsgNum() }, 5000) @@ -102,9 +70,7 @@ class PushRepository(mContext: Context) { updateMsgNum() return } - mHandler.post { - msgCenter.setMsgStatus(num > 0, num) - } + } private fun startIterate() { @@ -215,9 +181,6 @@ class PushRepository(mContext: Context) { fun deleteAll() { HandlerUtils.mBgHandler.post { pushBeanDao.deleteAll() - mHandler.post { - msgCenter.setMsgStatus(false, 0) - } } } diff --git a/core/function-impl/mogo-core-function-notice/src/main/res/values/strings.xml b/core/function-impl/mogo-core-function-notice/src/main/res/values/strings.xml index 808d1e2474..648d863848 100644 --- a/core/function-impl/mogo-core-function-notice/src/main/res/values/strings.xml +++ b/core/function-impl/mogo-core-function-notice/src/main/res/values/strings.xml @@ -1,5 +1,5 @@ - mogo-module-push + mogo-core-function-notice 清除 清空历史消息 暂无消息 diff --git a/core/function-impl/mogo-core-function-smp/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java b/core/function-impl/mogo-core-function-smp/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java index 527c66ff1a..a4fd036d2b 100644 --- a/core/function-impl/mogo-core-function-smp/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java +++ b/core/function-impl/mogo-core-function-smp/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java @@ -166,6 +166,9 @@ public class SmallMapDirectionView @Override public void onLocationChanged(@Nullable MogoLocation location) { //Logger.d(TAG, "onCarLocationChanged2 :" + location.getLatitude()+":"+location.getLongitude()); + if (location == null){ + return; + } LatLng currentLatLng = new LatLng(location.getLatitude(), location.getLongitude()); //更新车辆位置 if (mCarMarker != null) { diff --git a/core/function-impl/mogo-core-function-v2x/src/main/AndroidManifest.xml b/core/function-impl/mogo-core-function-v2x/src/main/AndroidManifest.xml index af9b0fa90e..6ccd24e6c8 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/AndroidManifest.xml +++ b/core/function-impl/mogo-core-function-v2x/src/main/AndroidManifest.xml @@ -1,4 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/V2XEventManager.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/V2XEventManager.kt index 87f484d1fc..548c7704a5 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/V2XEventManager.kt +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/V2XEventManager.kt @@ -410,11 +410,6 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb // 存储本地,出行动态作展示 saveLocalStory(V2XTypeEnum.ALERT_ROAD_WARNING, v2XRoadEventEntity.noveltyInfo) - //如果poiType是道路拥堵,则调用接口查询拥堵状态 - val poiType = v2XRoadEventEntity.poiType - if (poiType != null && poiType == FOURS_BLOCK_UP.poiType) { - BridgeApi.trafficUpload()?.verifyCurrentTrafficStatus() - } } } diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/V2XShareEventAdapter.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/V2XShareEventAdapter.java index 588b919ba4..974848203f 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/V2XShareEventAdapter.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/V2XShareEventAdapter.java @@ -193,8 +193,9 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter { - V2XEventPanelFragment.Companion.getInstance().hidePanel(); - mApis.getShareManager().showShareDialog(); + // TODO +// V2XEventPanelFragment.Companion.getInstance().hidePanel(); +// mApis.getShareManager().showShareDialog(); }); TextView refresh = itemView.findViewById(R.id.refresh_button); diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XBaseViewHolder.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XBaseViewHolder.java index 777654e927..3a63c832a9 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XBaseViewHolder.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XBaseViewHolder.java @@ -10,7 +10,6 @@ import androidx.recyclerview.widget.RecyclerView; import com.alibaba.android.arouter.launcher.ARouter; import com.mogo.commons.voice.AIAssist; -import com.mogo.eagle.core.data.map.MogoLatLng; import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi; import com.mogo.eagle.core.function.v2x.events.consts.V2XConst; import com.mogo.eagle.core.function.v2x.events.network.V2XRefreshModel; @@ -19,10 +18,10 @@ import com.mogo.eagle.core.function.v2x.events.utils.ChartingUtil; import com.mogo.eagle.core.function.v2x.events.utils.RoadConditionUtils; import com.mogo.eagle.core.function.v2x.events.utils.TrackUtils; import com.mogo.eagle.core.function.v2x.events.utils.V2XSQLiteUtils; +import com.mogo.eagle.core.utilcode.mogo.logger.Logger; import com.mogo.eagle.core.utilcode.mogo.toast.TipToast; import com.mogo.eagle.core.utilcode.util.TimeUtils; import com.mogo.eagle.core.utilcode.util.Utils; -import com.mogo.map.navi.IMogoNavi; import com.mogo.map.navi.IMogoNaviListener; import com.mogo.map.navi.MogoNaviInfo; import com.mogo.map.navi.MogoTraffic; @@ -30,7 +29,6 @@ import com.mogo.module.common.entity.MarkerExploreWay; import com.mogo.module.common.entity.MarkerLocation; import com.mogo.module.common.entity.V2XEventZanData; import com.mogo.service.module.IMogoRegisterCenter; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; import com.zhidao.carchattingprovider.CallChattingProviderConstant; import com.zhidao.carchattingprovider.ICarsChattingProvider; import com.zhidao.carchattingprovider.MogoDriverInfo; @@ -193,34 +191,6 @@ public abstract class V2XBaseViewHolder delayedCloseWindow(); } - /** - * 导航规划路线 - */ - public void triggerStartNavi(MarkerExploreWay noveltyInfo) { - try { - IMogoRegisterCenter registerCenter = BridgeApi.INSTANCE.registerCenter(); - if (registerCenter != null) { - registerCenter.registerMogoNaviListener(MODULE_NAME, this); - } - MogoLatLng endPoint = new MogoLatLng( - noveltyInfo.getLocation().getLat(), - noveltyInfo.getLocation().getLon()); - - IMogoNavi navi = BridgeApi.INSTANCE.navi(); - if (navi != null) { - navi.naviTo(endPoint); - } - TrackUtils.trackV2xRoadEvent( - noveltyInfo.getInfoId(), - noveltyInfo.getSn(), - V2XConst.V2X_ROAD_NAVI); - } catch (Exception e) { - e.printStackTrace(); - TipToast.tip("路况信息异常"); - } - delayedCloseWindow(); - } - public void triggerCancel(){ delayedCloseWindow(); } @@ -263,11 +233,6 @@ public abstract class V2XBaseViewHolder @Override public void onCalculateSuccess() { Logger.w(TAG, "onCalculateSuccess"); - - IMogoNavi navi = BridgeApi.INSTANCE.navi(); - if (navi != null) { - navi.startNavi(true); - } IMogoRegisterCenter registerCenter = BridgeApi.INSTANCE.registerCenter(); if (registerCenter != null) { diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XEventUgcVH.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XEventUgcVH.java index b564d863be..1aa3f6afde 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XEventUgcVH.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XEventUgcVH.java @@ -11,7 +11,6 @@ import android.widget.TextView; import com.mogo.commons.voice.AIAssist; import com.mogo.commons.voice.IMogoVoiceCmdCallBack; -import com.mogo.eagle.core.data.map.MogoLatLng; import com.mogo.eagle.core.function.v2x.R; import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi; import com.mogo.eagle.core.function.v2x.events.consts.V2XConst; @@ -27,8 +26,6 @@ import com.mogo.module.common.entity.V2XRoadEventEntity; import com.mogo.module.common.enums.EventTypeEnum; import com.mogo.module.v2x.voice.V2XVoiceManager; import com.mogo.service.analytics.IMogoAnalytics; -import com.mogo.service.share.IMogoTanluProvider; -import com.mogo.service.share.TanluUploadParams; import java.util.HashMap; import java.util.Map; @@ -181,19 +178,19 @@ public class V2XEventUgcVH extends V2XBaseViewHolder { unRegisterVoice(); if (status == 1) { - // 上报事故 - TanluUploadParams params = - new TanluUploadParams( - mNoveltyInfo.getPoiType(), - IMogoTanluProvider.UPLOAD_FROM_STRATEGY_UGC, - mNoveltyInfo.getInfoIdInt(), - new MogoLatLng(mNoveltyInfo.getLocation().getLat(), - mNoveltyInfo.getLocation().getLon()) - ); - IMogoTanluProvider tanlu = BridgeApi.INSTANCE.tanlu(); - if (tanlu != null) { - tanlu.uploadRoadCondition(params); - } +// // 上报事故 +// TanluUploadParams params = +// new TanluUploadParams( +// mNoveltyInfo.getPoiType(), +// IMogoTanluProvider.UPLOAD_FROM_STRATEGY_UGC, +// mNoveltyInfo.getInfoIdInt(), +// new MogoLatLng(mNoveltyInfo.getLocation().getLat(), +// mNoveltyInfo.getLocation().getLon()) +// ); +// IMogoTanluProvider tanlu = BridgeApi.INSTANCE.tanlu(); +// if (tanlu != null) { +// tanlu.uploadRoadCondition(params); +// } dataStatistics(1); } else if (status == 0) { dataStatistics(2); diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XFatigueDrivingVH.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XFatigueDrivingVH.java index 95800e9af1..f9c8dc2dff 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XFatigueDrivingVH.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XFatigueDrivingVH.java @@ -32,12 +32,11 @@ import com.mogo.module.v2x.voice.V2XVoiceManager; public class V2XFatigueDrivingVH extends V2XBaseViewHolder { private TextView mTvAddress, mTvAddressDistance; - private ImageView mIvToNav, mIvClose; + private ImageView mIvClose; private MarkerExploreWay mNoveltyInfo; private V2XPushMessageEntity mV2XPushMessageEntity; // 语音控制导航 - private V2XVoiceCallbackListener mNaviCb = (command, intent) -> triggerStartNavi(mNoveltyInfo); private V2XVoiceCallbackListener mNaviCancel = (command, intent) -> triggerCancel(); public V2XFatigueDrivingVH(ViewGroup viewGroup, IV2XWindow v2XWindow) { @@ -46,9 +45,7 @@ public class V2XFatigueDrivingVH extends V2XBaseViewHolder { , v2XWindow); mTvAddress = itemView.findViewById(R.id.tvAddress); mTvAddressDistance = itemView.findViewById(R.id.tvAddressDistance); - mIvToNav = itemView.findViewById(R.id.ivToNav); mIvClose = itemView.findViewById(R.id.ivClose); - mIvToNav.setOnClickListener(v -> triggerStartNavi(mNoveltyInfo)); mIvClose.setOnClickListener(v -> delayedCloseWindow()); // 设置视图状态监听 @@ -56,13 +53,6 @@ public class V2XFatigueDrivingVH extends V2XBaseViewHolder { @Override public void onViewAttachedToWindow(View v) { //Logger.w(MODULE_NAME, "列表View V2XPushEventDetailVH 触发 onViewAttachedToWindow"); - // 注册语音交互 - V2XVoiceManager.INSTANCE - .registerWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_NAVI, - mNaviCb) - .registerUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_NAVI_UN_WAKEUP, - mNaviCb); - V2XVoiceManager.INSTANCE .registerUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_CANCEL_NAVI_UN_WAKEUP,mNaviCancel); diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XHistoryBaseViewHolder.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XHistoryBaseViewHolder.java index b2689a11a1..13d007bc2f 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XHistoryBaseViewHolder.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XHistoryBaseViewHolder.java @@ -10,25 +10,23 @@ import androidx.recyclerview.widget.RecyclerView; import com.alibaba.android.arouter.launcher.ARouter; import com.mogo.commons.voice.AIAssist; -import com.mogo.eagle.core.data.map.MogoLatLng; import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi; import com.mogo.eagle.core.function.v2x.events.consts.V2XConst; import com.mogo.eagle.core.function.v2x.events.utils.ChartingUtil; import com.mogo.eagle.core.function.v2x.events.utils.RoadConditionUtils; import com.mogo.eagle.core.function.v2x.events.utils.TrackUtils; import com.mogo.eagle.core.function.v2x.events.utils.V2XSQLiteUtils; +import com.mogo.eagle.core.utilcode.mogo.logger.Logger; +import com.mogo.eagle.core.utilcode.mogo.toast.TipToast; import com.mogo.eagle.core.utilcode.util.TimeUtils; import com.mogo.eagle.core.utilcode.util.Utils; -import com.mogo.map.navi.IMogoNavi; 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.V2XEventZanData; -import com.mogo.eagle.core.utilcode.mogo.toast.TipToast; import com.mogo.service.module.IMogoRegisterCenter; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; import com.zhidao.carchattingprovider.CallChattingProviderConstant; import com.zhidao.carchattingprovider.ICarsChattingProvider; import com.zhidao.carchattingprovider.MogoDriverInfo; @@ -180,36 +178,6 @@ public abstract class V2XHistoryBaseViewHolder delayedCloseWindow(); } - /** - * 导航规划路线 - */ - public void triggerStartNavi(MarkerExploreWay noveltyInfo) { - try { - - IMogoRegisterCenter registerCenter = BridgeApi.INSTANCE.registerCenter(); - if (registerCenter != null) { - registerCenter.registerMogoNaviListener(MODULE_NAME, this); - } - MogoLatLng endPoint = new MogoLatLng( - noveltyInfo.getLocation().getLat(), - noveltyInfo.getLocation().getLon()); - - IMogoNavi navi = BridgeApi.INSTANCE.navi(); - if (navi != null) { - navi.naviTo(endPoint); - } - TrackUtils.trackV2xRoadEvent( - noveltyInfo.getInfoId(), - noveltyInfo.getSn(), - V2XConst.V2X_ROAD_NAVI); - } catch (Exception e) { - e.printStackTrace(); - TipToast.tip("路况信息异常"); - } - delayedCloseWindow(); - } - - /** * 显示自定义 Toast * @@ -247,10 +215,6 @@ public abstract class V2XHistoryBaseViewHolder @Override public void onCalculateSuccess() { Logger.w(TAG, "onCalculateSuccess"); - IMogoNavi navi = BridgeApi.INSTANCE.navi(); - if (navi != null) { - navi.startNavi(true); - } IMogoRegisterCenter registerCenter = BridgeApi.INSTANCE.registerCenter(); if (registerCenter != null) { registerCenter.unregisterMogoNaviListener(MODULE_NAME); diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XOtherSeekHelpVH.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XOtherSeekHelpVH.java index a6d2cb2415..3a0aad5820 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XOtherSeekHelpVH.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XOtherSeekHelpVH.java @@ -55,15 +55,12 @@ public class V2XOtherSeekHelpVH extends V2XBaseViewHolder { private TextView tvDistance; private TextView tvEventTime; private ImageView ivCall; - private ImageView ivNavi; private V2XPushMessageEntity mV2XPushMessageEntity; private MarkerExploreWay mNoveltyInfo; // 上传事件的用户信息 private MarkerUserInfo mUserInfo = new MarkerUserInfo(); - // 语音控制导航 - private V2XVoiceCallbackListener mNaviCb = (command, intent) -> triggerStartNavi(mNoveltyInfo); // 语音控制拨打电话 private V2XVoiceCallbackListener mCallChartingCb = (command, intent) -> { try { @@ -88,14 +85,6 @@ public class V2XOtherSeekHelpVH extends V2XBaseViewHolder { tvDistance = itemView.findViewById(R.id.tvFaultHelpDistance); tvEventTime = itemView.findViewById(R.id.tvFaultHelpEventTime); ivCall = itemView.findViewById(R.id.ivFaultHelpEventCall); - ivNavi = itemView.findViewById(R.id.ivFaultHelpEventNavi); - ivNavi.setOnClickListener(v -> { - triggerStartNavi(mNoveltyInfo); - V2XRefreshModel v2XRefreshModel = BridgeApi.INSTANCE.refreshModel(); - if (v2XRefreshModel != null) { - v2XRefreshModel.respondingToHelp(mUserInfo.getSn()); - } - }); // 设置视图状态监听 itemView.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() { @@ -104,10 +93,6 @@ public class V2XOtherSeekHelpVH extends V2XBaseViewHolder { //Logger.w(MODULE_NAME, "列表View V2XPushEventDetailVH 触发 onViewAttachedToWindow"); // 注册语音交互 V2XVoiceManager.INSTANCE - .registerWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_NAVI, - mNaviCb) - .registerUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_NAVI_UN_WAKEUP, - mNaviCb) .registerWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_CALL_CHATTING, mCallChartingCb) .registerUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_CHAT_MORE_UN_WAKEUP, @@ -121,8 +106,6 @@ public class V2XOtherSeekHelpVH extends V2XBaseViewHolder { //Logger.w(MODULE_NAME, "列表View V2XPushEventDetailVH 触发 onViewDetachedFromWindow"); // 反注册语音交互 V2XVoiceManager.INSTANCE - .unRegisterWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_NAVI) - .unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_NAVI_UN_WAKEUP) .unRegisterWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_CALL_CHATTING) .unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_CHAT_MORE_UN_WAKEUP) .unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_OPEN_CAR_INFO_UN_WAKEUP); diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XPushEventVH.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XPushEventVH.java index 43eb867adf..dd5e3af218 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XPushEventVH.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XPushEventVH.java @@ -40,7 +40,6 @@ public class V2XPushEventVH extends V2XBaseViewHolder { private ImageView ivRoadReportTrue; private ImageView ivRoadReportErr; private ImageView ivRoadCallChart; - private ImageView ivRoadEventNav; private ImageView ivRoadEventLike; // 上传事件的用户信息 @@ -49,8 +48,6 @@ public class V2XPushEventVH extends V2XBaseViewHolder { private V2XPushMessageEntity mV2XRoadEventEntity; private MarkerExploreWay mNoveltyInfo; - // 语音控制导航 - private V2XVoiceCallbackListener mNaviCb = (command, intent) -> triggerStartNavi(mNoveltyInfo); // 语音控制拨打电话 private V2XVoiceCallbackListener mCallChartingCb = (command, intent) -> { try { @@ -78,11 +75,8 @@ public class V2XPushEventVH extends V2XBaseViewHolder { ivRoadReportTrue = itemView.findViewById(R.id.ivRoadReportTrue); ivRoadReportErr = itemView.findViewById(R.id.ivRoadReportErr); ivRoadCallChart = itemView.findViewById(R.id.ivRoadCallChart); - ivRoadEventNav = itemView.findViewById(R.id.ivRoadEventNav); ivRoadEventLike = itemView.findViewById(R.id.ivRoadEventLike); - ivRoadEventNav.getParent().getParent().requestDisallowInterceptTouchEvent(true); - ivRoadEventNav.setOnClickListener(v -> triggerStartNavi(mNoveltyInfo)); ivRoadCallChart.setOnClickListener(v -> { try { mUserInfo.setSn(mV2XRoadEventEntity.getSn()); @@ -105,10 +99,6 @@ public class V2XPushEventVH extends V2XBaseViewHolder { //Logger.w(MODULE_NAME, "列表View V2XPushEventDetailVH 触发 onViewAttachedToWindow"); // 注册语音交互 V2XVoiceManager.INSTANCE - .registerWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_NAVI, - mNaviCb) - .registerUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_NAVI_UN_WAKEUP, - mNaviCb) .registerWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_CALL_CHATTING, mCallChartingCb) .registerUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_CHAT_MORE_UN_WAKEUP, @@ -128,8 +118,6 @@ public class V2XPushEventVH extends V2XBaseViewHolder { } // 反注册语音交互 V2XVoiceManager.INSTANCE - .unRegisterWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_NAVI) - .unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_NAVI_UN_WAKEUP) .unRegisterWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_CLOSE_WINDOW) .unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_CLOSE_WINDOW_UN_WAKEUP) .unRegisterWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_CALL_CHATTING) @@ -171,7 +159,6 @@ public class V2XPushEventVH extends V2XBaseViewHolder { switch (mV2XRoadEventEntity.getSceneId()) { case "100015"://取快递 case "100016"://顺风车 - ivRoadEventNav.setVisibility(View.VISIBLE); ivRoadCallChart.setVisibility(View.VISIBLE); ivRoadReportTrue.setVisibility(View.GONE); ivRoadReportErr.setVisibility(View.GONE); @@ -182,7 +169,6 @@ public class V2XPushEventVH extends V2XBaseViewHolder { case "100018"://故障车辆推送 ivRoadEventLike.setVisibility(View.VISIBLE); ivRoadCallChart.setVisibility(View.GONE); - ivRoadEventNav.setVisibility(View.GONE); ivRoadReportTrue.setVisibility(View.GONE); ivRoadReportErr.setVisibility(View.GONE); break; diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XRecommendRouteVH.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XRecommendRouteVH.kt index 9125cf48d8..eb38f3905a 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XRecommendRouteVH.kt +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XRecommendRouteVH.kt @@ -31,16 +31,13 @@ import kotlinx.coroutines.launch class V2XRecommendRouteVH(viewGroup: ViewGroup, v2XWindow: IV2XWindow<*>) : V2XBaseViewHolder( LayoutInflater.from(viewGroup.context).inflate(R.layout.item_v2x_recommend_route, viewGroup, false), v2XWindow), V2XVoiceCallbackListener { private var mTvAddress: TextView? = null - private var mIvToNav: ImageView? = null private var mIvClose: ImageView? = null private var mNoveltyInfo: MarkerExploreWay? = null private val mainScope = MainScope() init { - mTvAddress = itemView.findViewById(R.id.tvAddress) - mIvToNav = itemView.findViewById(R.id.ivToNav) - mIvClose = itemView.findViewById(R.id.ivClose) - mIvToNav?.setOnClickListener { triggerStartNavi(mNoveltyInfo) } + mTvAddress = itemView.findViewById(R.id.tvAddress) + mIvClose = itemView.findViewById(R.id.ivClose) mIvClose?.setOnClickListener { delayedCloseWindow() } itemView.addOnAttachStateChangeListener(object : View.OnAttachStateChangeListener { override fun onViewAttachedToWindow(view: View) { @@ -75,7 +72,6 @@ class V2XRecommendRouteVH(viewGroup: ViewGroup, v2XWindow: IV2XWindow<*>) : V2XB override fun onCallback(command: String?, intent: Intent?) { when (command) { - V2XVoiceConstants.V2X_CONFIRM_ACTION -> triggerStartNavi(mNoveltyInfo) V2XVoiceConstants.V2X_CANCLE_ACTION -> delayedCloseWindow() } } diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XScenarioHistoryOtherSeekHelpVH.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XScenarioHistoryOtherSeekHelpVH.java index 6d9202f598..df6dea320f 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XScenarioHistoryOtherSeekHelpVH.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/adapter/holder/V2XScenarioHistoryOtherSeekHelpVH.java @@ -1,5 +1,8 @@ package com.mogo.eagle.core.function.v2x.events.adapter.holder; +import static android.view.View.GONE; +import static android.view.View.VISIBLE; + import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; @@ -28,9 +31,6 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; -import static android.view.View.GONE; -import static android.view.View.VISIBLE; - /** * 出行动态中的他人故障求助 * @@ -45,7 +45,6 @@ public class V2XScenarioHistoryOtherSeekHelpVH extends V2XHistoryBaseViewHolder< private TextView mTvFaultHelpEventTime; private TextView mTvFaultHelpDistance; private ImageView mIvFaultHelpEventCall; - private ImageView mIvFaultHelpEventNavi; private MarkerExploreWay mNoveltyInfo; // 上传事件的用户信息 @@ -63,7 +62,6 @@ public class V2XScenarioHistoryOtherSeekHelpVH extends V2XHistoryBaseViewHolder< mTvFaultHelpEventTime = itemView.findViewById(R.id.tvFaultHelpEventTime); mTvFaultHelpDistance = itemView.findViewById(R.id.tvFaultHelpDistance); mIvFaultHelpEventCall = itemView.findViewById(R.id.ivFaultHelpEventCall); - mIvFaultHelpEventNavi = itemView.findViewById(R.id.ivFaultHelpEventNavi); } @Override @@ -118,11 +116,6 @@ public class V2XScenarioHistoryOtherSeekHelpVH extends V2XHistoryBaseViewHolder< e.printStackTrace(); } - mIvFaultHelpEventNavi.setOnClickListener(v -> { - BridgeApi.INSTANCE.refreshModel().respondingToHelp(mUserInfo.getSn()); - triggerStartNavi(mNoveltyInfo); - }); - // M1低配车机限制 // 不展示打电话按钮 // 不能查看用户详情 diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/bridge/BridgeApi.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/bridge/BridgeApi.kt index c41c2ca72e..66ba33fcdb 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/bridge/BridgeApi.kt +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/bridge/BridgeApi.kt @@ -80,8 +80,6 @@ internal object BridgeApi { fun analytics() = apis?.analyticsApi - fun navi() = apis?.mapServiceApi?.getNavi(context()) - fun overlay() = apis?.mapServiceApi?.getOverlayManager(context()) fun carChatProvider() = carChatProvider @@ -104,14 +102,10 @@ internal object BridgeApi { fun registerCenter() = apis?.registerCenterApi - fun entranceButton() = apis?.entranceButtonController - fun imageLoader() = apis?.imageLoaderApi fun windowManager() = apis?.windowManagerApi - fun tanlu() = apis?.tanluApi - fun displayEffects() = apis?.displayEffectsManager fun intentManager() = apis?.intentManagerApi @@ -120,9 +114,5 @@ internal object BridgeApi { fun locationClient() = apis?.mapServiceApi?.getSingletonLocationClient(context()) - fun share() = apis?.shareManager - fun markerService() = apis?.markerService - - fun trafficUpload() = apis?.trafficUploadApi } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/fragment/V2XEventPanelFragment.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/fragment/V2XEventPanelFragment.kt index e2390fadb7..78a1c62f58 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/fragment/V2XEventPanelFragment.kt +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/fragment/V2XEventPanelFragment.kt @@ -241,30 +241,9 @@ class V2XEventPanelFragment : MvpFragment mBitmapFrames = new ArrayList<>(); - for (int i : sFrameVr) { - mBitmapFrames.add(BitmapFactory.decodeResource(AbsMogoApplication.getApp().getResources(), i)); - } - optionsRipple.icons(mBitmapFrames); - optionsRipple.period(20); - optionsRipple.scale(0.4f); - IMogoMarkerManager marker = BridgeApi.INSTANCE.marker(); - if (marker != null) { - mAlarmInfoMarker = marker.addMarker(V2X_EVENT_ALARM_POI, optionsRipple); - } - - MogoMarkerOptions options = new MogoMarkerOptions().data(roadEventEntity) - .latitude(roadEventEntity.getLocation().getLat()).longitude(roadEventEntity.getLocation().getLon()); - options.anchor(0.5f, 0.5f); - options.icon3DRes(R.raw.special_vehicle); - options.anchorColor("#FFBF29FF"); - if (marker != null) { - m3DMarker = marker.addMarker(V2X_EVENT_ALARM_POI, options); - } - if (m3DMarker != null) { - m3DMarker.setToTop(); - } - } else { - optionsRipple.icons(V2XMarkerAdapter.getV2XRoadEventViewGif(context, roadEventEntity)); - optionsRipple.period(100); - IMogoMarkerManager marker = BridgeApi.INSTANCE.marker(); - if (marker != null) { - mAlarmInfoMarker = marker.addMarker(V2X_EVENT_ALARM_POI, optionsRipple); - } - // 当前Marker设置为最上面 - if (mAlarmInfoMarker != null) { - mAlarmInfoMarker.setToTop(); - } - } - } - - // 绘制连接线 - IMoGoV2XPolylineManager iMoGoV2XPolylineManager = BridgeApi.INSTANCE.v2xPolyline(); - if (iMoGoV2XPolylineManager != null) { - iMoGoV2XPolylineManager.drawablePolyline(context, roadEventEntity); - } - // 缩放地图 - MapUtils.zoomMap( - new MogoLatLng(roadEventEntity.getLocation().getLat(), - roadEventEntity.getLocation().getLon() - ), context); - } else { - Logger.e(MODULE_NAME, "Location 必须进行初始化!!!!!"); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Override - public void clearSpecialCarPOI() { - boolean isOtherSeekHelpPOIShow = false; - IMoGoV2XStatusManager iMoGoV2XStatusManager = BridgeApi.INSTANCE.v2xStatus(); - if (iMoGoV2XStatusManager != null) { - isOtherSeekHelpPOIShow = iMoGoV2XStatusManager.isOtherSeekHelpPOIShow(); - } - if (isOtherSeekHelpPOIShow) { - iMoGoV2XStatusManager.setOtherSeekHelpPOIShow(TAG, false); - // 重置告警信息 - V2XStatusManager.getInstance().setAlarmInfo(null); - if (mAlarmInfoMarker != null) { - mAlarmInfoMarker.remove(); - } - if (m3DMarker != null) { - m3DMarker.remove(); - } - } - } @Override public void drawableLiveCarPOI(List markerOnlineCars, IMogoMarkerClickListener clickListener) { @@ -691,8 +538,6 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager { } if (isVrMode) { mAlarmInfoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl(markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_HIGH, clickListener); -// mAlarmInfoMarker.setInfoWindowAdapter(new RoadConditionInfoWindow3DAdapter(markerShowEntity, AbsMogoApplication.getApp(), mAlarmInfoMarker.getMogoMarkerOptions())); -// mAlarmInfoMarker.showInfoWindow(); } else { optionsRipple.icon(V2XMarkerAdapter.getV2XRoadEventViewPng(context, roadEventEntity)); IMogoMarkerManager marker = BridgeApi.INSTANCE.marker(); diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XPolylineManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XPolylineManager.java index 243e66c0f9..88e6536cb2 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XPolylineManager.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XPolylineManager.java @@ -9,10 +9,10 @@ import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths; import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XPolylineManager; import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusManager; import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusManager; -import com.mogo.map.navi.IMogoNavi; import com.mogo.map.overlay.IMogoOverlayManager; import com.mogo.map.overlay.IMogoPolyline; import com.mogo.map.overlay.MogoPolylineOptions; +import com.mogo.module.common.MogoApisHandler; import com.mogo.module.common.entity.V2XRoadEventEntity; import com.mogo.module.common.enums.EventTypeEnum; import com.mogo.service.statusmanager.IMogoStatusManager; @@ -76,11 +76,11 @@ public class MoGoV2XPolylineManager implements IMoGoV2XPolylineManager { options.width(10).useGradient(true).colorValues(colors); // 当前车辆位置 - IMogoNavi navi = BridgeApi.INSTANCE.navi(); - MogoLatLng carLocation = null; - if (navi != null) { - carLocation = navi.getCarLocation(); - } + MogoLatLng carLocation = new MogoLatLng( + MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat(), + MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLon() + ); + if (carLocation != null) { options.add(carLocation); } else { diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/receiver/TestPanelBroadcastReceiver.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/receiver/TestPanelBroadcastReceiver.java new file mode 100644 index 0000000000..3f1f8049e9 --- /dev/null +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/receiver/TestPanelBroadcastReceiver.java @@ -0,0 +1,195 @@ +package com.mogo.eagle.core.function.v2x.events.receiver; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; + +import androidx.localbroadcastmanager.content.LocalBroadcastManager; + +import com.mogo.eagle.core.data.map.MogoLatLng; +import com.mogo.eagle.core.function.call.map.CallerSmpManager; +import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi; +import com.mogo.eagle.core.function.v2x.events.consts.V2XConst; +import com.mogo.eagle.core.function.v2x.events.entity.net.V2XOptimalRouteDataRes; +import com.mogo.eagle.core.function.v2x.events.entity.net.V2XSpecialCarRes; +import com.mogo.eagle.core.function.v2x.events.scenario.scene.livecar.V2XVoiceCallLiveBiz; +import com.mogo.eagle.core.function.v2x.events.utils.TestOnLineCarUtils; +import com.mogo.eagle.core.function.v2x.events.utils.V2XSQLiteUtils; +import com.mogo.eagle.core.utilcode.mogo.logger.Logger; +import com.mogo.module.common.entity.MarkerExploreWay; +import com.mogo.module.common.entity.V2XMessageEntity; +import com.mogo.module.common.entity.V2XPushMessageEntity; +import com.mogo.module.common.entity.V2XRoadEventEntity; +import com.mogo.service.statusmanager.IMogoStatusManager; +import com.zhidao.carchattingprovider.ICarsChattingProvider; +import com.zhidao.carchattingprovider.MogoDriverInfo; + +import java.util.List; + +import static android.text.style.TtsSpan.GENDER_MALE; + +/** + * V2X 测试面板广播接收,目的是可以通过广播调用起来面板 + * + * @author donghongyu + */ +public class TestPanelBroadcastReceiver extends BroadcastReceiver { + private static final String TAG = V2XConst.MODULE_NAME + "_TestPanelBroadcastReceiver"; + + private Context mContext; + + @Override + public void onReceive(Context context, Intent intent) { + try { + this.mContext = context; + int sceneType = intent.getIntExtra(V2XConst.BROADCAST_TEST_PANEL_CONTROL_TYPE_EXTRA_KEY, 0); + Logger.d(TAG, "textPanelOpenType:" + sceneType); + + // 分发场景 + dispatchSceneTest(sceneType); + } catch (Exception e) { + e.printStackTrace(); + } + } + + + /** + * 分发处理场景 + * + * @param sceneType 场景类型 + */ + private void dispatchSceneTest(int sceneType) { + Logger.d(TAG, "sceneType=" + sceneType); + if (sceneType == 0) {//打开用户信息 + MogoDriverInfo mogoDriverInfo = new MogoDriverInfo(); + mogoDriverInfo.setAge(24); + mogoDriverInfo.setGender(GENDER_MALE); + mogoDriverInfo.setSn("12345678"); + mogoDriverInfo.setUserName("测试"); + mogoDriverInfo.setUserHead("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600872867592&di=994e371880ca6ae2814f553e0d0e4139&imgtype=0&src=http%3A%2F%2Fp3.ssl.cdn.btime.com%2Ft014c5d8a1e5cef12ba.jpg%3Fsize%3D506x543"); + ICarsChattingProvider provider = BridgeApi.INSTANCE.carChatProvider(); + if (provider != null) { + provider.showUserWindow("CAR_CALL_USER_TO_" + V2XConst.MODULE_NAME, mogoDriverInfo, mContext); + } + } else if (sceneType == 1) {// 触发道路事件 + V2XMessageEntity v2XMessageEntity = + TestOnLineCarUtils.getV2XScenarioRoadEventData(); + + Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION); + intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity); + LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent); + + // 存储本地,出行动态作展示 + saveLocalStory(V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING, + v2XMessageEntity.getContent().getNoveltyInfo()); + } else if (sceneType == 3) {//触发H5推送事件 + V2XMessageEntity v2XMessageEntity = + TestOnLineCarUtils.getV2XScenarioPushEventData(); + + Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION); + intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity); + LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent); + } else if (sceneType == 4) {//触发H5推送直播事件 + V2XMessageEntity v2XMessageEntity = + TestOnLineCarUtils.getV2XScenarioPushLiveEventData(); + + Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION); + intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity); + LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent); + } else if (sceneType == 5) {//H5推送触发V2X动画 + V2XMessageEntity v2XMessageEntity = + TestOnLineCarUtils.getV2XScenarioAnimationEventData(); + + Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION); + intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity); + LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent); + } else if (sceneType == 6) {//查看前车直播 + V2XVoiceCallLiveBiz.getInstance().getFrontCarLive(); + } else if (sceneType == 7) {//查看前方路口直播 + V2XVoiceCallLiveBiz.getInstance().getOpenRoadCameraLive(); + } else if (sceneType == 8) {//触发疲劳驾驶 + V2XMessageEntity v2XMessageEntity = + TestOnLineCarUtils.getV2XScenarioFatigueDrivingData(); + + Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION); + intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity); + LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent); + } else if (sceneType == 9) {//触发他人发起道路求助事件 + V2XMessageEntity> v2XMessageEntity = + TestOnLineCarUtils.getV2XScenarioSeekHelpData(); + + Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION); + intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity); + LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent); + } else if (sceneType == 10) {//触发事件UGC + V2XMessageEntity v2XMessageEntity = + TestOnLineCarUtils.getV2XScenarioRoadEventUGCData(); + + Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION); + intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity); + LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent); + } else if (sceneType == 11) {//触发违章停车事件 + V2XMessageEntity> v2XMessageEntity = + TestOnLineCarUtils.getV2XIllegalParkData(); + + Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION); + intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity); + LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent); + } else if (sceneType == 12) {//车路云场景预警-右侧 + V2XMessageEntity messageEntity = TestOnLineCarUtils.getV2XScenarioPushFrontWarningEventData("right"); + Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION); + intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, messageEntity); + LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent); + } else if (sceneType == 13) {//车路云场景预警-左侧 + V2XMessageEntity messageEntity = TestOnLineCarUtils.getV2XScenarioPushFrontWarningEventData("left"); + Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION); + intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, messageEntity); + LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent); + } else if (sceneType == 14) {//行人预警,行人路线预测 车路云预警-前方行人 + V2XMessageEntity messageEntity = TestOnLineCarUtils.getV2XScenarioPushFrontWarningEventData("pedestrians"); + Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION); + intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, messageEntity); + LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent); + } /*else if (sceneType == 16) {//触发基于目的地预测的线路推荐 + V2XRefreshModel model = BridgeApi.INSTANCE.refreshModel(); + model. + V2XServiceManager.getV2XRefreshModel().queryRoadData("F803EB2046PZD00149"); + } */else if (sceneType == 17) {//最优路线推荐 + V2XMessageEntity v2XMessageEntity = + TestOnLineCarUtils.getV2XOptimalRoute(); + + Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION); + intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity); + LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent); + } else if (sceneType == 18) {// 自车求助 + V2XMessageEntity v2XMessageEntity = + TestOnLineCarUtils.getV2XScenarioCarForHelpEventData(); + Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION); + intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity); + LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent); + IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager(); + if (statusManager != null) { + statusManager.setSeekHelping(V2XConst.MODULE_NAME, true); + } + } else if (sceneType == 20) {// 小地图绘制线 + List coordinates = TestOnLineCarUtils.getTestCoordinates(); + CallerSmpManager.drawablePolyline(coordinates); + } else if (sceneType == 21) {// 小地图清除绘制线 + CallerSmpManager.clearPolyline(); + } + } + + + /** + * 存储本地数据 + * + * @param v2XRoadEventEntity 要存储的场景 + */ + public void saveLocalStory(int scenarioType, MarkerExploreWay v2XRoadEventEntity) { + try { + V2XSQLiteUtils.saveLocalStory(scenarioType, v2XRoadEventEntity, v2XRoadEventEntity.hashCode()); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/V2XScenarioManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/V2XScenarioManager.java index f71973af53..1d2f2ecba7 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/V2XScenarioManager.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/V2XScenarioManager.java @@ -1,11 +1,15 @@ package com.mogo.eagle.core.function.v2x.events.scenario.impl; +import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.MODULE_NAME; +import static com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum.ALERT_RECOMMEND_PARKING; + import android.content.Intent; + import androidx.localbroadcastmanager.content.LocalBroadcastManager; + import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi; import com.mogo.eagle.core.function.v2x.events.consts.V2XConst; import com.mogo.eagle.core.function.v2x.events.scenario.IV2XScenarioManager; -import com.mogo.eagle.core.function.v2x.events.scenario.scene.animation.V2XAnimationScenario; import com.mogo.eagle.core.function.v2x.events.scenario.scene.fatigue.V2XFatigueDrivingScenario; import com.mogo.eagle.core.function.v2x.events.scenario.scene.help.V2XCarForHelpScenario; import com.mogo.eagle.core.function.v2x.events.scenario.scene.livecar.V2XPushLiveCarScenario; @@ -17,19 +21,16 @@ import com.mogo.eagle.core.function.v2x.events.scenario.scene.route.V2XOptimalRo import com.mogo.eagle.core.function.v2x.events.scenario.scene.seek.V2XSeekHelpScenario; import com.mogo.eagle.core.function.v2x.events.scenario.scene.ugc.V2XEventUgcScenario; import com.mogo.eagle.core.function.v2x.events.scenario.scene.warning.V2XFrontWarningScenario; +import com.mogo.eagle.core.utilcode.mogo.logger.Logger; +import com.mogo.eagle.core.utilcode.mogo.toast.TipToast; import com.mogo.eagle.core.utilcode.util.ThreadUtils; import com.mogo.eagle.core.utilcode.util.Utils; import com.mogo.map.uicontroller.IMogoMapUIController; import com.mogo.map.uicontroller.VisualAngleMode; import com.mogo.module.common.entity.V2XMessageEntity; import com.mogo.module.v2x.scenario.scene.destination.V2XRecommendRouteScenario; -import com.mogo.eagle.core.utilcode.mogo.toast.TipToast; import com.mogo.service.statusmanager.IMogoStatusManager; import com.mogo.service.strategy.IMogoOnlineCarListPanelProvider; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; - -import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.MODULE_NAME; -import static com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum.ALERT_RECOMMEND_PARKING; /** * author : donghongyu @@ -89,9 +90,6 @@ public class V2XScenarioManager implements IV2XScenarioManager { case V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_LIVE_CAR_WARNING: mV2XScenario = new V2XPushLiveCarScenario(); break; - case V2XMessageEntity.V2XTypeEnum.ALERT_ANIMATION_WARNING: - mV2XScenario = new V2XAnimationScenario(); - break; case V2XMessageEntity.V2XTypeEnum.ALERT_CAR_FOR_HELP: mV2XScenario = new V2XCarForHelpScenario(); break; diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/animation/V2XAnimationScenario.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/animation/V2XAnimationScenario.java deleted file mode 100644 index 9037ed1130..0000000000 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/animation/V2XAnimationScenario.java +++ /dev/null @@ -1,127 +0,0 @@ -package com.mogo.eagle.core.function.v2x.events.scenario.scene.animation; - -import androidx.annotation.Nullable; - -import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi; -import com.mogo.eagle.core.function.v2x.events.consts.V2XConst; -import com.mogo.eagle.core.function.v2x.events.listener.V2XWindowStatusListener; -import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusManager; -import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario; -import com.mogo.eagle.core.function.v2x.events.utils.ADASUtils; -import com.mogo.module.common.entity.V2XMessageEntity; -import com.mogo.module.common.entity.V2XPushMessageEntity; -import com.mogo.service.statusmanager.IMogoStatusManager; -import com.mogo.service.windowview.IMogoWindowManager; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; - -/** - * author : donghongyu - * e-mail : 1358506549@qq.com - * date : 2020/5/15 5:37 PM - * desc : 场景动画的场景展示,目前这里仅在演示DEMO中使用 - * version: 1.0 - */ -public class V2XAnimationScenario extends AbsV2XScenario { - - public V2XAnimationScenario() { - setV2XWindow(new V2XAnimationWindow()); - } - - @Override - public void init(@Nullable V2XMessageEntity v2XMessageEntity) { - boolean isMainPageOnResume = false; - IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager(); - if (statusManager != null) { - isMainPageOnResume = statusManager.isMainPageOnResume(); - } - if (!isSameScenario(v2XMessageEntity) - && isMainPageOnResume) { - boolean isV2XAnimationShow = false; - IMoGoV2XStatusManager v2xStatus = BridgeApi.INSTANCE.v2xStatus(); - if (v2xStatus != null) { - isV2XAnimationShow = v2xStatus.isV2XAnimationShow(); - } - if (isV2XAnimationShow) { - close(); - } - setV2XMessageEntity(v2XMessageEntity); - show(); - } else { - setV2XMessageEntity(v2XMessageEntity); - Logger.w(V2XConst.MODULE_NAME, "要处理的场景已经存在,丢弃这次初始化"); - } - } - - @Override - public void show() { - showWindow(); - } - - @Override - public void showWindow() { - if (getV2XWindow() != null) { - getV2XWindow().setWindowStatusListener(new V2XWindowStatusListener() { - @Override - public void onViewShow() { - ADASUtils.broadcastToADAS(BridgeApi.INSTANCE.context(), getV2XMessageEntity().getContent()); - } - - @Override - public void onViewClose() { - closeWindow(); - clearPOI(); - } - }); - getV2XWindow().show(getV2XMessageEntity().getContent()); - - IMogoWindowManager windowManager = BridgeApi.INSTANCE.windowManager(); - if (windowManager != null) { - windowManager.addView(getV2XWindow().getView(), 0, 0, false); - } - IMoGoV2XStatusManager v2xStatus = BridgeApi.INSTANCE.v2xStatus(); - if (v2xStatus != null) { - v2xStatus.setV2XAnimationWindowShow(TAG, true); - } - } - } - - @Override - public void closeWindow() { - if (getV2XWindow() != null) { - getV2XWindow().close(); - } - IMoGoV2XStatusManager v2xStatus = BridgeApi.INSTANCE.v2xStatus(); - if (v2xStatus != null) { - v2xStatus.setV2XAnimationWindowShow(TAG, false); - } - } - - @Override - public void showButton() { - if (getV2XButton() != null) { - getV2XButton().show(); - } - } - - @Override - public void closeButton() { - if (getV2XButton() != null) { - getV2XButton().close(); - } - } - - @Override - public void drawPOI() { - if (getV2XMarker() != null) { - getV2XMarker().drawPOI(getV2XMessageEntity().getContent()); - } - } - - @Override - public void clearPOI() { - setV2XMessageEntity(null); - if (getV2XMarker() != null) { - getV2XMarker().clearPOI(); - } - } -} diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/animation/V2XAnimationWindow.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/animation/V2XAnimationWindow.java deleted file mode 100644 index 443c1bdd17..0000000000 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/animation/V2XAnimationWindow.java +++ /dev/null @@ -1,145 +0,0 @@ -package com.mogo.eagle.core.function.v2x.events.scenario.scene.animation; - -import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.MODULE_NAME; - -import android.content.Context; -import android.net.Uri; -import android.util.AttributeSet; -import android.view.LayoutInflater; -import android.view.View; - -import androidx.constraintlayout.widget.ConstraintLayout; - -import com.mogo.commons.voice.AIAssist; -import com.mogo.eagle.core.function.v2x.R; -import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi; -import com.mogo.eagle.core.function.v2x.events.listener.V2XWindowStatusListener; -import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XWindow; -import com.mogo.module.common.entity.V2XPushMessageEntity; -import com.mogo.eagle.core.widget.TextureVideoView; -import com.mogo.service.windowview.IMogoTopViewManager; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; - -/** - * author : donghongyu - * e-mail : 1358506549@qq.com - * date : 2020/4/24 11:34 AM - * desc : TODO 前瞻演示功能场景动画 - * version: 1.0 - */ -public class V2XAnimationWindow extends ConstraintLayout implements IV2XWindow { - // 弹窗状态监听 - private V2XWindowStatusListener mV2XWindowStatusListener; - private TextureVideoView vvCarAnimation; - - public V2XAnimationWindow() { - this(BridgeApi.INSTANCE.context(), null); - } - - public V2XAnimationWindow(Context context) { - this(context, null); - } - - public V2XAnimationWindow(Context context, AttributeSet attrs) { - this(context, attrs, 0); - } - - public V2XAnimationWindow(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - initView(context); - } - - public void initView(Context context) { - Logger.w(MODULE_NAME, "初始化场景动画View。。。。。"); - LayoutInflater.from(context).inflate(R.layout.window_animation, this); - vvCarAnimation = findViewById(R.id.vvCarAnimation); - } - - /** - * 展示道路事件详情Windows - */ - @Override - public void show(V2XPushMessageEntity entity) { - Uri videoUri = null; - String tts = null; - switch (entity.getSceneId()) { - // 前车紧急制动告警 - case "100005": - 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); - tts = "注意路口车辆"; - break; - // 岔路口碰撞预警 - case "100007": - 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); - break; - // 应急车辆优先通行 - case "100012": - 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); - break; - default: - Logger.e(MODULE_NAME, "未定义的类型:" + entity.getSceneId()); - } - String path = "https://v.youku.com/v_show/id_XNjAzNzI3MDA0.html"; - - if (videoUri != null) { -// vvCarAnimation.setVideoPath(path); - vvCarAnimation.setVideoURI(videoUri); - vvCarAnimation.setOnPreparedListener(mediaPlayer -> { - Logger.w(MODULE_NAME, "场景动画准备。。。。。"); - }); - vvCarAnimation.setOnCompletionListener(mediaPlayer -> { - Logger.w(MODULE_NAME, "动画播放结束..."); - if (mV2XWindowStatusListener != null) { - mV2XWindowStatusListener.onViewClose(); - } - }); - vvCarAnimation.start(); - Logger.w(MODULE_NAME, "开始播放动画。。。。。"); - if (mV2XWindowStatusListener != null) { - mV2XWindowStatusListener.onViewShow(); - } - } - if (tts != null) { - AIAssist.getInstance(BridgeApi.INSTANCE.context()).speakTTSVoice(tts); - } - } - - @Override - public void close() { - //移除窗体 - IMogoTopViewManager topViewManager = BridgeApi.INSTANCE.topViewManager(); - if (topViewManager != null) { - topViewManager.removeView(this); - } - } - - @Override - protected void onDetachedFromWindow() { - super.onDetachedFromWindow(); - if (vvCarAnimation != null) { - vvCarAnimation.stopPlayback(); - } - } - - @Override - public View getView() { - return this; - } - - @Override - public void setWindowStatusListener(V2XWindowStatusListener listener) { - this.mV2XWindowStatusListener = listener; - } -} diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/fatigue/V2XFatigueDrivingScenario.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/fatigue/V2XFatigueDrivingScenario.java index 1b0d745477..a3d952412b 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/fatigue/V2XFatigueDrivingScenario.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/fatigue/V2XFatigueDrivingScenario.java @@ -6,22 +6,18 @@ import android.view.View; import android.view.ViewGroup; import androidx.annotation.Nullable; -import com.mogo.eagle.core.data.map.MogoLatLng; + import com.mogo.eagle.core.function.v2x.R; import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi; import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusManager; import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario; -import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceCallbackListener; -import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceConstants; +import com.mogo.eagle.core.utilcode.mogo.logger.Logger; import com.mogo.eagle.core.utilcode.util.Utils; -import com.mogo.map.navi.IMogoNavi; import com.mogo.module.common.entity.V2XMessageEntity; import com.mogo.module.common.entity.V2XPushMessageEntity; -import com.mogo.module.v2x.voice.V2XVoiceManager; import com.mogo.service.statusmanager.IMogoStatusManager; import com.mogo.service.windowview.IMogoTopViewManager; import com.mogo.service.windowview.IMogoTopViewStatusListener; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; /** @@ -34,9 +30,6 @@ import com.mogo.eagle.core.utilcode.mogo.logger.Logger; */ public class V2XFatigueDrivingScenario extends AbsV2XScenario implements IMogoTopViewStatusListener { - // 语音控制导航 - private V2XVoiceCallbackListener mNaviCb = (command, intent) -> startNavi(); - public V2XFatigueDrivingScenario() { setV2XWindow(new V2XFatigueDrivingWindow()); } @@ -56,10 +49,6 @@ public class V2XFatigueDrivingScenario extends AbsV2XScenario implements IM showButton(); mySeekHelpCountDownTimerCancel(); mySeekHelpCountDownTimerStart(); - if (cancelCb == null) { - cancelCb = (command, intent) -> { - IMogoEntranceButtonController entranceButton = BridgeApi.INSTANCE.entranceButton(); - TextView tv = entranceButton != null ? entranceButton.getButton(ButtonIndex.BUTTON2) : null; - if (tv != null) { - showDialog(); - } - }; - } unregisterSeekHelpButtonCmd(); V2XVoiceManager.INSTANCE.registerWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_CANCEL_HELP, cancelCb); V2XVoiceManager.INSTANCE.registerUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_CANCEL_FOR_HELP_UN_WAKEUP, cancelCb); @@ -109,7 +96,7 @@ public class V2XCarForHelpScenario extends AbsV2XScenario implements IM if (getV2XButton() != null) { getV2XButton().setOnActionListener(this::showDialog); getV2XButton().show(); - // V2XServiceManager.getMogoEntranceButtonController().showLeftNoticeByType(IMogoEntranceButtonController.NOTICE_TYPE_SEEK_HELP, R.drawable.module_v2x_left_notice_seek_help, "正在发起求助..."); + // V2XServiceManager.getMogoEntranceButtonController().showLeftNoticeByType(IMogoEntranceButtonController.NOTICE_TYPE_SEEK_HELP, R.drawable.module_v2x_left_notice_seek_help, "正在发起求助..."); } }); } @@ -123,10 +110,6 @@ public class V2XCarForHelpScenario extends AbsV2XScenario implements IM } if (isSeekHelping) { Logger.d(TAG, "关闭自车求助按钮!"); - IMogoEntranceButtonController entranceButton = BridgeApi.INSTANCE.entranceButton(); - if (entranceButton != null) { - entranceButton.hideLeftNoticeByType(IMogoEntranceButtonController.NOTICE_TYPE_SEEK_HELP); - } statusManager.setSeekHelping(TAG, false); if (getV2XButton() != null) { getV2XButton().close(); @@ -149,8 +132,6 @@ public class V2XCarForHelpScenario extends AbsV2XScenario implements IM IMoGoV2XMarkerManager v2xMarker = BridgeApi.INSTANCE.v2xMarker(); if (v2xMarker != null) { - // 移除事件POI - v2xMarker.clearSpecialCarPOI(); // 绘制上次的数据 v2xMarker.drawableLastAllPOI(); } @@ -246,33 +227,6 @@ public class V2XCarForHelpScenario extends AbsV2XScenario implements IM entity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_CAR_FOR_HELP); entity.setContent(isTrue); init(entity); - } else if (descriptor == StatusDescriptor.VR_MODE) { - boolean isSeekHelping = false; - IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager(); - if (statusManager != null) { - isSeekHelping = statusManager.isSeekHelping(); - } - if (isSeekHelping) { - if (isTrue) { - ((V2XSeekHelpButton) getV2XButton()).showTopView(); - IMogoEntranceButtonController entranceButton = BridgeApi.INSTANCE.entranceButton(); - if (entranceButton != null) { - TextView button = entranceButton.getButton(ButtonIndex.BUTTON2); - if (button != null) { - button.setVisibility(View.GONE); - } - } - } else { - ((V2XSeekHelpButton) getV2XButton()).closeTopView(); - IMogoEntranceButtonController entranceButton = BridgeApi.INSTANCE.entranceButton(); - if (entranceButton != null) { - TextView button = entranceButton.getButton(ButtonIndex.BUTTON2); - if (button != null) { - button.setVisibility(View.VISIBLE); - } - } - } - } } } } diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/help/V2XSeekHelpButton.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/help/V2XSeekHelpButton.java index 66941c9b0a..3469b9681a 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/help/V2XSeekHelpButton.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/help/V2XSeekHelpButton.java @@ -5,8 +5,8 @@ import android.view.View; import android.view.ViewGroup; import android.widget.TextView; -import com.mogo.eagle.core.data.BaseData; import com.mogo.commons.voice.AIAssist; +import com.mogo.eagle.core.data.BaseData; import com.mogo.eagle.core.function.v2x.R; import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi; import com.mogo.eagle.core.function.v2x.events.network.V2XRefreshCallback; @@ -17,9 +17,6 @@ import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceCallbackListener; import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceConstants; import com.mogo.eagle.core.utilcode.util.Utils; import com.mogo.module.v2x.voice.V2XVoiceManager; -import com.mogo.service.entrance.ButtonIndex; -import com.mogo.service.entrance.IMogoEntranceButtonController; -import com.mogo.service.statusmanager.IMogoStatusManager; import com.mogo.service.windowview.IMogoTopViewManager; /** @@ -57,34 +54,6 @@ public class V2XSeekHelpButton implements IV2XButton { @Override public void show() { registerVoice(); - try { - IMogoEntranceButtonController entranceButton = BridgeApi.INSTANCE.entranceButton(); - - tv = entranceButton != null ? entranceButton.getButton(ButtonIndex.BUTTON2) : null; - if (tv != null) { - tv.setText("取消\n求助"); - tv.setOnClickListener(v -> { - //调用取消求助接口 - // TODO: 2020/5/18 回调,显示对话框 - doAction(); - }); - } - boolean isVrMode = false; - IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager(); - if (statusManager != null) { - isVrMode = statusManager.isVrMode(); - } - if (isVrMode) { - showTopView(); - tv.setVisibility(View.GONE); - } else { - closeTopView(); - tv.setVisibility(View.VISIBLE); - } - - } catch (Exception e) { - e.printStackTrace(); - } } public void showTopView() { diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventButton.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventButton.java index 6785a9ddc6..46cf61460c 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventButton.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventButton.java @@ -4,15 +4,11 @@ import android.content.Intent; import android.view.View; import android.widget.TextView; -import com.mogo.eagle.core.function.v2x.R; -import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi; import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XButton; import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XButtonListener; import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceCallbackListener; import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceConstants; import com.mogo.module.v2x.voice.V2XVoiceManager; -import com.mogo.service.entrance.ButtonIndex; -import com.mogo.service.entrance.IMogoEntranceButtonController; /** * 道路实况按钮 @@ -36,19 +32,6 @@ public class V2XRoadEventButton implements IV2XButton { public void show() { // 注册语音交互 registerVoice(); - IMogoEntranceButtonController entranceButton = BridgeApi.INSTANCE.entranceButton(); - tv = entranceButton != null ? entranceButton.getButton(ButtonIndex.BUTTON1) : null; - if (tv != null){ - tv.setText("查看\n详情"); - tv.setBackgroundResource(R.drawable.bg_v2x_event_live_show); - tv.setVisibility(View.VISIBLE); - tv.setOnClickListener(v -> { - if (mListener != null) { - mListener.onAction(); - } - close(); - }); - } } @Override diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/LocationUtils.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/LocationUtils.java index d018faf0f1..c4ec1421f9 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/LocationUtils.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/LocationUtils.java @@ -1,14 +1,13 @@ package com.mogo.eagle.core.function.v2x.events.utils; -import android.location.Location; import android.util.Log; import com.mogo.eagle.core.data.map.MogoLatLng; import com.mogo.eagle.core.data.map.MogoLocation; import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi; import com.mogo.map.location.IMogoLocationClient; -import com.mogo.map.navi.IMogoNavi; import com.mogo.map.uicontroller.IMogoMapUIController; +import com.mogo.module.common.MogoApisHandler; /** * author : donghongyu @@ -26,31 +25,21 @@ public class LocationUtils { * @return 当前位置 */ public static MogoLatLng getCurrentLatLon() { - IMogoNavi navi = BridgeApi.INSTANCE.navi(); - MogoLatLng latLon = null; - if (navi != null) { - latLon = navi.getCarLocation(); - if (latLon == null) { - Location location = navi.getCarLocation2(); - if (location != null) { - latLon = new MogoLatLng(location.getLatitude(), location.getLongitude()); - } + // 当前车辆位置 + MogoLatLng latLon = new MogoLatLng( + MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat(), + MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLon() + ); + IMogoLocationClient locationClient = BridgeApi.INSTANCE.locationClient(); + if (locationClient != null) { + MogoLocation location = locationClient.getLastKnowLocation(); + if (location != null) { + latLon = new MogoLatLng(location.getLatitude(), location.getLongitude()); } } - if (latLon == null) { - IMogoLocationClient locationClient = BridgeApi.INSTANCE.locationClient(); - if (locationClient != null) { - MogoLocation location = locationClient.getLastKnowLocation(); - if (location != null) { - latLon = new MogoLatLng(location.getLatitude(), location.getLongitude()); - } - } - } - if (latLon == null) { - IMogoMapUIController mapUiController = BridgeApi.INSTANCE.mapUiController(); - if (mapUiController != null) { - latLon = mapUiController.getWindowCenterLocation(); - } + IMogoMapUIController mapUiController = BridgeApi.INSTANCE.mapUiController(); + if (mapUiController != null) { + latLon = mapUiController.getWindowCenterLocation(); } return latLon; } diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/MapUtils.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/MapUtils.kt index 070bce59f9..15c3630c06 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/MapUtils.kt +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/MapUtils.kt @@ -5,6 +5,7 @@ import android.graphics.Rect import com.mogo.eagle.core.data.map.MogoLatLng import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi import com.mogo.eagle.core.utilcode.util.WindowUtils +import com.mogo.module.common.MogoApisHandler import com.mogo.module.common.utils.CarSeries import java.lang.Exception @@ -18,8 +19,6 @@ class MapUtils { if (latLng == null) { return } - // 当前车辆位置 - val navi = BridgeApi.navi() ?: return //Logger.d(V2XConst.MODULE_NAME, "重新调整地图缩放比:" + latLng); val mBoundRect = Rect() val paddingTop: Int @@ -41,7 +40,11 @@ class MapUtils { mBoundRect.top = paddingTop mBoundRect.left = paddingLeft mBoundRect.right = paddingRight - val carLocation = navi.carLocation + // 当前车辆位置 + val carLocation = MogoLatLng( + MogoApisHandler.getInstance().apis.adasControllerApi.lastLat, + MogoApisHandler.getInstance().apis.adasControllerApi.lastLon + ) // 调整自适应的地图镜头 carLocation?.let { BridgeApi.mapUiController()?.showBounds("MapUtils", it, listOf(latLng), mBoundRect, true) diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/TestOnLineCarUtils.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/TestOnLineCarUtils.java new file mode 100644 index 0000000000..8267396b79 --- /dev/null +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/TestOnLineCarUtils.java @@ -0,0 +1,516 @@ +package com.mogo.eagle.core.function.v2x.events.utils; + +import com.mogo.eagle.core.data.map.MogoLatLng; +import com.mogo.eagle.core.function.v2x.R; +import com.mogo.eagle.core.function.v2x.events.entity.net.V2XOptimalRouteDataRes; +import com.mogo.eagle.core.function.v2x.events.entity.net.V2XSpecialCarRes; +import com.mogo.eagle.core.network.utils.GsonUtil; +import com.mogo.eagle.core.utilcode.util.Utils; +import com.mogo.module.common.entity.MarkerExploreWay; +import com.mogo.module.common.entity.MarkerResponse; +import com.mogo.module.common.entity.V2XMessageEntity; +import com.mogo.module.common.entity.V2XPushMessageEntity; +import com.mogo.module.common.entity.V2XRoadEventEntity; +import com.mogo.module.common.entity.V2XWarningEntity; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.util.List; + +/** + * author : donghongyu + * e-mail : 1358506549@qq.com + * date : 2020-01-0918:20 + * desc : 生成测试数据 + * version: 1.0 + */ +public class TestOnLineCarUtils { + + + /** + * 获取测试的违章停车数据 + */ + public static V2XMessageEntity> getV2XIllegalParkData() { + try { + InputStream inputStream = Utils.getApp().getResources().openRawResource(R.raw.illegal_park_data); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int len = -1; + byte[] buffer = new byte[1024]; + while ((len = inputStream.read(buffer)) != -1) { + baos.write(buffer, 0, len); + } + inputStream.close(); + + // 加载数据源 + MarkerResponse markerResponse = GsonUtil.objectFromJson(baos.toString(), MarkerResponse.class); + + V2XMessageEntity> v2xMessageEntity = new V2XMessageEntity<>(); + // 控制类型 + v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_ILLEGAL_PARK_WARNING); + // 设置数据 + v2xMessageEntity.setContent(markerResponse.getResult().getExploreWay()); + // 控制展示状态 + v2xMessageEntity.setShowState(true); + return v2xMessageEntity; + + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + + /** + * 模拟道路事件测试数据 + */ + public static V2XMessageEntity getV2XScenarioRoadEventData() { + try { + InputStream inputStream = Utils.getApp() + .getResources() + .openRawResource(R.raw.scenario_road_event_data); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int len = -1; + byte[] buffer = new byte[1024]; + while ((len = inputStream.read(buffer)) != -1) { + baos.write(buffer, 0, len); + } + inputStream.close(); + + // 加载数据源 + V2XRoadEventEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XRoadEventEntity.class); + + V2XMessageEntity v2xMessageEntity = new V2XMessageEntity<>(); + // 控制类型 + v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING); + // 设置数据 + v2xMessageEntity.setContent(v2xRoadEventEntity); + // 控制展示状态 + v2xMessageEntity.setShowState(true); + return v2xMessageEntity; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + + /** + * 模拟道路事件UGC测试数据 + */ + public static V2XMessageEntity getV2XScenarioRoadEventUGCData() { + try { + InputStream inputStream = Utils.getApp() + .getResources() + .openRawResource(R.raw.scenario_road_event_data); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int len = -1; + byte[] buffer = new byte[1024]; + while ((len = inputStream.read(buffer)) != -1) { + baos.write(buffer, 0, len); + } + inputStream.close(); + + // 加载数据源 + V2XRoadEventEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XRoadEventEntity.class); + + V2XMessageEntity v2xMessageEntity = new V2XMessageEntity<>(); + // 控制类型 + v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_EVENT_UGC_WARNING); + // 设置数据 + v2xMessageEntity.setContent(v2xRoadEventEntity); + // 控制展示状态 + v2xMessageEntity.setShowState(true); + return v2xMessageEntity; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * 模拟H5推送数据 + */ + public static V2XMessageEntity getV2XScenarioPushEventData() { + try { + InputStream inputStream = Utils.getApp() + .getResources() + .openRawResource(R.raw.scenario_push_event_data); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int len = -1; + byte[] buffer = new byte[1024]; + while ((len = inputStream.read(buffer)) != -1) { + baos.write(buffer, 0, len); + } + inputStream.close(); + + // 加载数据源 + V2XPushMessageEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XPushMessageEntity.class); + + V2XMessageEntity v2xMessageEntity = new V2XMessageEntity<>(); + // 控制类型 + v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_WINDOW_WARNING); + // 设置数据 + v2xMessageEntity.setContent(v2xRoadEventEntity); + // 控制展示状态 + v2xMessageEntity.setShowState(true); + return v2xMessageEntity; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * 测试数据 + */ + public static V2XMessageEntity getV2XScenarioPushFrontWarningEventData(String adasResult) { + + try { + int id = R.raw.scenario_warning_event_data_right; + switch (adasResult) { + case "left": + id = R.raw.scenario_warning_event_data_left; + break; + case "pedestrians": + id = R.raw.scenario_warning_event_data_pedestrians; + break; + default: + } + InputStream inputStream = Utils.getApp() + .getResources() + .openRawResource(id); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int len = -1; + byte[] buffer = new byte[1024]; + while ((len = inputStream.read(buffer)) != -1) { + baos.write(buffer, 0, len); + } + inputStream.close(); + + // 加载数据源 + V2XWarningEntity warningEntity = GsonUtil.objectFromJson(baos.toString(), V2XWarningEntity.class); + V2XMessageEntity messageEntity = new V2XMessageEntity(); + messageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_WEAKNESS); + messageEntity.setContent(warningEntity); + return messageEntity; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * 模拟H5推送直播数据 + */ + public static V2XMessageEntity getV2XScenarioPushLiveEventData() { + try { + InputStream inputStream = Utils.getApp() + .getResources() + .openRawResource(R.raw.scenario_push_live_event_data); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int len = -1; + byte[] buffer = new byte[1024]; + while ((len = inputStream.read(buffer)) != -1) { + baos.write(buffer, 0, len); + } + inputStream.close(); + + // 加载数据源 + V2XPushMessageEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XPushMessageEntity.class); + + V2XMessageEntity v2xMessageEntity = new V2XMessageEntity<>(); + // 控制类型 + v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_LIVE_CAR_WARNING); + // 设置数据 + v2xMessageEntity.setContent(v2xRoadEventEntity); + // 控制展示状态 + v2xMessageEntity.setShowState(true); + return v2xMessageEntity; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * 模拟H5推送场景动画数据 + */ + public static V2XMessageEntity getV2XScenarioAnimationEventData() { + try { + InputStream inputStream = Utils.getApp() + .getResources() + .openRawResource(R.raw.scenario_push_animation_event_data); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int len = -1; + byte[] buffer = new byte[1024]; + while ((len = inputStream.read(buffer)) != -1) { + baos.write(buffer, 0, len); + } + inputStream.close(); + + // 加载数据源 + V2XPushMessageEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XPushMessageEntity.class); + + V2XMessageEntity v2xMessageEntity = new V2XMessageEntity<>(); + // 控制类型 + v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_ANIMATION_WARNING); + // 设置数据 + v2xMessageEntity.setContent(v2xRoadEventEntity); + // 控制展示状态 + v2xMessageEntity.setShowState(true); + return v2xMessageEntity; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * 模拟H5推送场景--十字路口碰撞 + */ + public static V2XMessageEntity getV2XScenarioCrossCrash() { + try { + InputStream inputStream = Utils.getApp() + .getResources() + .openRawResource(R.raw.scenario_push_cross_crash); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int len = -1; + byte[] buffer = new byte[1024]; + while ((len = inputStream.read(buffer)) != -1) { + baos.write(buffer, 0, len); + } + inputStream.close(); + + // 加载数据源 + V2XPushMessageEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XPushMessageEntity.class); + + V2XMessageEntity v2xMessageEntity = new V2XMessageEntity<>(); + // 控制类型 + v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_ANIMATION_WARNING); + // 设置数据 + v2xMessageEntity.setContent(v2xRoadEventEntity); + // 控制展示状态 + v2xMessageEntity.setShowState(true); + return v2xMessageEntity; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * 模拟 疲劳驾驶 + */ + public static V2XMessageEntity getV2XScenarioFatigueDrivingData() { + try { + InputStream inputStream = Utils.getApp() + .getResources() + .openRawResource(R.raw.scenario_fatigue_driving_data); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int len = -1; + byte[] buffer = new byte[1024]; + while ((len = inputStream.read(buffer)) != -1) { + baos.write(buffer, 0, len); + } + inputStream.close(); + + // 加载数据源 + V2XPushMessageEntity v2xRoadEventEntity = + GsonUtil.objectFromJson(baos.toString(), V2XPushMessageEntity.class); + + V2XMessageEntity v2xMessageEntity = new V2XMessageEntity<>(); + // 控制类型 + v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_FATIGUE_DRIVING); + // 设置数据 + v2xMessageEntity.setContent(v2xRoadEventEntity); + // 控制展示状态 + v2xMessageEntity.setShowState(true); + return v2xMessageEntity; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * 模拟 道路求助 + */ + public static V2XMessageEntity> getV2XScenarioSeekHelpData() { + try { + InputStream inputStream = Utils.getApp() + .getResources() + .openRawResource(R.raw.scenario_seek_help); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int len = -1; + byte[] buffer = new byte[1024]; + while ((len = inputStream.read(buffer)) != -1) { + baos.write(buffer, 0, len); + } + inputStream.close(); + + // 加载数据源 + V2XSpecialCarRes v2xRoadEventEntity = + GsonUtil.objectFromJson(baos.toString(), V2XSpecialCarRes.class); + + V2XMessageEntity> v2xMessageEntity = new V2XMessageEntity<>(); + // 控制类型 + v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_SEEK_WARNING); + // 设置数据 + v2xMessageEntity.setContent(v2xRoadEventEntity.getCoordinates()); + // 控制展示状态 + v2xMessageEntity.setShowState(true); + return v2xMessageEntity; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * 模拟 后方VIP + */ + public static V2XMessageEntity> getV2XScenarionVRBehindVIPData() { + try { + InputStream inputStream = Utils.getApp() + .getResources() + .openRawResource(R.raw.scenario_push_vr_hehind_vip_data); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int len = -1; + byte[] buffer = new byte[1024]; + while ((len = inputStream.read(buffer)) != -1) { + baos.write(buffer, 0, len); + } + inputStream.close(); + + // 加载数据源 + V2XSpecialCarRes v2xRoadEventEntity = + GsonUtil.objectFromJson(baos.toString(), V2XSpecialCarRes.class); + + V2XMessageEntity> v2xMessageEntity = new V2XMessageEntity<>(); + // 控制类型 + v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_WINDOW_WARNING); + // 设置数据 + v2xMessageEntity.setContent(v2xRoadEventEntity.getCoordinates()); + // 控制展示状态 + v2xMessageEntity.setShowState(true); + return v2xMessageEntity; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * 逆向车辆路线预判 + */ + public static V2XMessageEntity getV2XScenarionVRReverseCarData() { + try { + InputStream inputStream = Utils.getApp() + .getResources() + .openRawResource(R.raw.scenario_push_vr_reverse_car_data); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int len = -1; + byte[] buffer = new byte[1024]; + while ((len = inputStream.read(buffer)) != -1) { + baos.write(buffer, 0, len); + } + inputStream.close(); + + // 加载数据源 + V2XPushMessageEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XPushMessageEntity.class); + + V2XMessageEntity v2xMessageEntity = new V2XMessageEntity<>(); + // 控制类型 + v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_VR_SHOW); + // 设置数据 + v2xMessageEntity.setContent(v2xRoadEventEntity); + // 控制展示状态 + v2xMessageEntity.setShowState(true); + return v2xMessageEntity; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + + /** + * 模拟最优路线推送 + */ + public static V2XMessageEntity getV2XOptimalRoute() { + try { + InputStream inputStream = Utils.getApp() + .getResources() + .openRawResource(R.raw.test_data_v2x_zuiyouluxian); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int len = -1; + byte[] buffer = new byte[1024]; + while ((len = inputStream.read(buffer)) != -1) { + baos.write(buffer, 0, len); + } + inputStream.close(); + + // 加载数据源 + V2XOptimalRouteDataRes v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XOptimalRouteDataRes.class); + + V2XMessageEntity v2xMessageEntity = new V2XMessageEntity<>(); + // 控制类型 + v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_VR_SHOW); + // 设置数据 + v2xMessageEntity.setContent(v2xRoadEventEntity); + // 控制展示状态 + v2xMessageEntity.setShowState(true); + return v2xMessageEntity; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * 自车求助测试数据 + */ + public static V2XMessageEntity getV2XScenarioCarForHelpEventData() { + try { + + V2XMessageEntity v2xMessageEntity = new V2XMessageEntity<>(); + // 控制类型 + v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_CAR_FOR_HELP); + // 设置数据 + v2xMessageEntity.setContent(true); + // 控制展示状态 + v2xMessageEntity.setShowState(true); + return v2xMessageEntity; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + + /** + * 返回绘制线路测试数据 + * + * @return + */ + public static List getTestCoordinates() { + try { + InputStream inputStream = Utils.getApp() + .getResources() + .openRawResource(R.raw.test_coordinates); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int len = -1; + byte[] buffer = new byte[1024]; + while ((len = inputStream.read(buffer)) != -1) { + baos.write(buffer, 0, len); + } + inputStream.close(); + + // 加载数据源 + return GsonUtil.arrayFromJson(baos.toString(), MogoLatLng.class); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + +} diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/item_v2x_fatigue_driving.xml b/core/function-impl/mogo-core-function-v2x/src/main/res/layout/item_v2x_fatigue_driving.xml index afe0fffb60..5e22e301ec 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/item_v2x_fatigue_driving.xml +++ b/core/function-impl/mogo-core-function-v2x/src/main/res/layout/item_v2x_fatigue_driving.xml @@ -71,6 +71,7 @@ + app:layout_constraintTop_toTopOf="parent" /> \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/item_v2x_push_event_detail.xml b/core/function-impl/mogo-core-function-v2x/src/main/res/layout/item_v2x_push_event_detail.xml index cdec0fc878..f6dcc026c4 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/item_v2x_push_event_detail.xml +++ b/core/function-impl/mogo-core-function-v2x/src/main/res/layout/item_v2x_push_event_detail.xml @@ -110,7 +110,7 @@ android:visibility="gone" app:layout_constraintStart_toEndOf="@+id/ivRoadCallChart" app:layout_constraintTop_toTopOf="parent" - tools:visibility="visible" /> + /> diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/item_v2x_scennario_history_other_help.xml b/core/function-impl/mogo-core-function-v2x/src/main/res/layout/item_v2x_scennario_history_other_help.xml index c975f7af0a..88ccac06e9 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/item_v2x_scennario_history_other_help.xml +++ b/core/function-impl/mogo-core-function-v2x/src/main/res/layout/item_v2x_scennario_history_other_help.xml @@ -123,6 +123,7 @@ android:layout_height="@dimen/module_v2x_event_button_size" android:layout_marginRight="@dimen/dp_40" android:src="@drawable/selector_nav_history" + android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/raw/video_current_row_closed.mp4 b/core/function-impl/mogo-core-function-v2x/src/main/res/raw/video_current_row_closed.mp4 deleted file mode 100644 index 18216441ff..0000000000 Binary files a/core/function-impl/mogo-core-function-v2x/src/main/res/raw/video_current_row_closed.mp4 and /dev/null differ diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/raw/video_cut_in_line.mp4 b/core/function-impl/mogo-core-function-v2x/src/main/res/raw/video_cut_in_line.mp4 deleted file mode 100644 index 2595d5cb3b..0000000000 Binary files a/core/function-impl/mogo-core-function-v2x/src/main/res/raw/video_cut_in_line.mp4 and /dev/null differ diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/raw/video_emergency_braking.mp4 b/core/function-impl/mogo-core-function-v2x/src/main/res/raw/video_emergency_braking.mp4 deleted file mode 100644 index 2dab1ef3d6..0000000000 Binary files a/core/function-impl/mogo-core-function-v2x/src/main/res/raw/video_emergency_braking.mp4 and /dev/null differ diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/raw/video_emergency_lane.mp4 b/core/function-impl/mogo-core-function-v2x/src/main/res/raw/video_emergency_lane.mp4 deleted file mode 100644 index 0a202201d1..0000000000 Binary files a/core/function-impl/mogo-core-function-v2x/src/main/res/raw/video_emergency_lane.mp4 and /dev/null differ diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/raw/video_left_right_car.mp4 b/core/function-impl/mogo-core-function-v2x/src/main/res/raw/video_left_right_car.mp4 deleted file mode 100755 index bc66e55a2c..0000000000 Binary files a/core/function-impl/mogo-core-function-v2x/src/main/res/raw/video_left_right_car.mp4 and /dev/null differ diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/raw/video_traffic_light_speed_cut.mp4 b/core/function-impl/mogo-core-function-v2x/src/main/res/raw/video_traffic_light_speed_cut.mp4 deleted file mode 100755 index b6d84516d4..0000000000 Binary files a/core/function-impl/mogo-core-function-v2x/src/main/res/raw/video_traffic_light_speed_cut.mp4 and /dev/null differ diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutoPilotRecord.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutoPilotRecord.kt new file mode 100644 index 0000000000..1ebe30b93e --- /dev/null +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutoPilotRecord.kt @@ -0,0 +1,80 @@ +package com.mogo.eagle.core.data.autopilot + + + + +class AutoPilotRecordResult { + + /** + * 磁盘可用空间(M) + */ + var diskFree: Int = 0 + + /** + * 采集时长 + */ + var duration: Double = 0.0 + + + /** + * 保存的文件名 + */ + var fileName: String? = "" + + + /** + * 其他信息,包含错误信息等 + */ + var note: String? = "" + + + /** + * 域控制器定义的bag key + */ + var key: String? = "" + + /** + * 采集状态: + * 100 - 采集成功,自动结束 + * 101 - 采集成功,收到结束指令 + * 200 - 采集失败 + * 201 - 采集中 + * 300 - 开始采集 + */ + var stat: Int = 0 + + + /** + * 任务类型:1-badcase采集任务,2-地图数据采集任务 + */ + var type: Int = 0 + + /** + * 任务ID + */ + var id: Int = 0 + + + /** + * 时间戳,格式:YYYY-MM-DD-hh-mm-ss + */ + var timestamp: String? = "" + + /** + * 此次采集数据总大小(M) + */ + var total: Int? = 0 + + + /** + * 记录此条数据是否已消费 + */ + + @Volatile + var consumed: Boolean = false + + + override fun toString(): String { + return "AutoPilotRecordResult(diskFree=$diskFree, duration=$duration, fileName=$fileName, note=$note, key=$key, stat=$stat, type=$type, id=$id, timestamp=$timestamp, total=$total)" + } +} \ No newline at end of file diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MogoServicePaths.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MogoServicePaths.java index 9870d74e40..64a90b6be4 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MogoServicePaths.java +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MogoServicePaths.java @@ -66,13 +66,6 @@ public class MogoServicePaths { @Deprecated public static final String PATH_STATUS_MANAGER = "/statusmanager/api"; - /** - * 消息中心 - */ - @Keep - @Deprecated - public static final String PATH_MSG_CENTER = "/msgcenter/api"; - /** * 消息中心 */ @@ -80,13 +73,6 @@ public class MogoServicePaths { @Deprecated public static final String PATH_WINDOW_MANAGER = "/windowmanger/api"; - /** - * 卡片控制 - */ - @Keep - @Deprecated - public static final String PATH_CARD_MANAGER = "/cardmanager/api"; - /** * 管理 fragment */ @@ -159,13 +145,6 @@ public class MogoServicePaths { @Deprecated public static final String PATH_REFRESH_STRATEGY_API = "/refreshstrategy/api"; - /** - * 入口按钮 - */ - @Keep - @Deprecated - public static final String PATH_ENTRANCE_BUTTON_API = "/entrancebutton/api"; - /** * 顶部1/2屏管理 */ @@ -187,13 +166,6 @@ public class MogoServicePaths { @Deprecated public static final String PATH_MARKER_SERVICE = "/mogomarker/api"; - /** - * 其他模块调用分享框 - */ - @Keep - @Deprecated - public static final String PATH_SHARE = "/extensions/share"; - /** * 事件面板 */ @@ -222,41 +194,6 @@ public class MogoServicePaths { @Deprecated public static final String PATH_AGREEMENT = "/agreement/showFragment"; - /** - * 探路api - */ - @Keep - @Deprecated - public static final String PATH_TANLU_API = "/tanlulib/api"; - - /** - * 策略上报 - */ - @Keep - @Deprecated - public static final String PATH_STRATEGY_SHARE = "/share/strategy"; - - /** - * 分享模块中,交通状况服务上报 - */ - @Keep - @Deprecated - public static final String PATH_TRAFFIC_UPLOAD = "/share/traffic"; - - /** - * 高德地图巡航上报 - */ - @Keep - @Deprecated - public static final String PATH_GAODE_AIMLESS_SHARE = "/share/gaodeAimless"; - - /** - * 探路ui - */ - @Keep - @Deprecated - public static final String PATH_TANLU_UI_API = "/tanlu/ui"; - /** * 在线好友面板 */ 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 f3f7516287..ac55c90a4e 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 @@ -16,46 +16,46 @@ enum class TrafficTypeEnum( ) { TYPE_TRAFFIC_ID_WEI_ZHI( - 0, + 100, "未知数据", - R.raw.special_vehicle, - R.raw.special_vehicle + R.raw.v2x_shigong_warning, + R.raw.v2x_shigong_warning ), TYPE_TRAFFIC_ID_PEOPLE( 1, "人", - R.raw.people, - R.raw.people + R.raw.traffic_people, + R.raw.traffic_people ), TYPE_TRAFFIC_ID_BICYCLE( 2, "自行车", - R.raw.zixingche, - R.raw.zixingche + R.raw.traffic_zixingche, + R.raw.traffic_zixingche ), TYPE_TRAFFIC_ID_TA_CHE( 3, "他车", - R.raw.othercar, - R.raw.othercar + R.raw.traffic_tachexiaoche, + R.raw.traffic_tachexiaoche ), TYPE_TRAFFIC_ID_MOTO( 4, "摩托", - R.raw.motuoche, - R.raw.motuoche + R.raw.traffic_motuoche, + R.raw.traffic_motuoche ), TYPE_TRAFFIC_ID_BUS( 6, "大巴", - R.raw.daba, - R.raw.daba + R.raw.traffic_daba, + R.raw.traffic_daba ), TYPE_TRAFFIC_ID_TRUCK( 8, "卡车", - R.raw.daba, - R.raw.daba + R.raw.traffic_daba, + R.raw.traffic_daba ), TYPE_TRAFFIC_ID_CAMERA( 9, diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotIdentifyListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotIdentifyListener.kt index 2b9c19a019..4a76aa4c9e 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotIdentifyListener.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotIdentifyListener.kt @@ -1,5 +1,6 @@ package com.mogo.eagle.core.function.api.autopilot +import com.mogo.eagle.core.data.autopilot.AutoPilotRecordResult import com.mogo.eagle.core.data.autopilot.AutopilotWarnMessage import com.mogo.eagle.core.data.traffic.TrafficData import java.util.* @@ -16,13 +17,19 @@ interface IMoGoAutopilotIdentifyListener { * * @param trafficData 交通元素信息列表 */ - fun onAutopilotIdentifyDataUpdate(trafficData: ArrayList?) + fun onAutopilotIdentifyDataUpdate(trafficData: ArrayList?) {} /** * 报警信息 * * @param autopilotWarnMessage 预警信息 */ - fun onAutopilotWarnMessage(autopilotWarnMessage: AutopilotWarnMessage?) + fun onAutopilotWarnMessage(autopilotWarnMessage: AutopilotWarnMessage?) {} + + + /** + * 采集结果回调 + */ + fun onAutopilotRecordResult(record: AutoPilotRecordResult?) {} } \ No newline at end of file diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.java b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.java index d0e3859817..e71094f241 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.java +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.java @@ -60,6 +60,14 @@ public interface IMoGoAutopilotProvider extends IMoGoFunctionServerProvider { Boolean setAutoPilotSpeed(int speed); + /** + * 记录各种失败 + * @param key 采集任务的标识 + * @param name 文件名字 + * @param reason 原因 + */ + void recordCause(String key, String name, String id, String reason); + /** * 关机 */ diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoWaringProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoWaringProvider.kt index 483f2954d6..0e6ac567aa 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoWaringProvider.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoWaringProvider.kt @@ -34,6 +34,11 @@ interface IMoGoWaringProvider { */ fun setToolsViewVisibility(visibility: Int) + /** + * 开关DebugView + */ + fun toggleDebugView() + /** * 展示VR下V2X预警 * @@ -159,4 +164,18 @@ interface IMoGoWaringProvider { */ fun showBrakeLight(brakeLight: Int) + /** + * 展示工控机下载状态信息 + * @param downloadVersion 下载版本 + * @param downloadStatus 下载状态(0:下载完成;1:正在下载;2:下载失败) + * @param downloadProgress 下载进度 + */ + fun showAdDownloadStatus(downloadVersion : String,downloadStatus : Int,downloadProgress : Int) + + /** + * 展示工控机升级状态信息 + * @param upgradeStatus 升级状态(true代表升级成功、false代表升级不成功) + */ + fun showAdUpgradeStatus(upgradeStatus : Boolean) + } \ No newline at end of file diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt index 6be446c1e9..4a3e046bb1 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt @@ -13,7 +13,7 @@ import com.mogo.eagle.core.function.call.base.CallerBase object CallerAutoPilotManager { private val TAG = "CallerAutoPilotManager" - private val providerApi: IMoGoAutopilotProvider + private val providerApi: IMoGoAutopilotProvider? get() = CallerBase.getApiInstance( IMoGoAutopilotProvider::class.java, MogoServicePaths.PATH_AUTO_PILOT @@ -25,7 +25,7 @@ object CallerAutoPilotManager { * @param autoPilotIp 指定与控制器IP */ fun resetIpAddress(autoPilotIp: String) { - providerApi.resetIpAddress(autoPilotIp) + providerApi?.resetIpAddress(autoPilotIp) } /** @@ -38,7 +38,7 @@ object CallerAutoPilotManager { //LogUtils.eTag(TAG, "自动驾驶控制参数异常,请检查参数信息") return } - providerApi.startAutoPilot(controlParameters) + providerApi?.startAutoPilot(controlParameters) } /** @@ -46,40 +46,44 @@ object CallerAutoPilotManager { * 具体的json格式需要与@宋克难 进行沟通 */ fun sendDataToAutopilot(jsonString: String) { - providerApi.sendMessageToAutopilot(jsonString) + providerApi?.sendMessageToAutopilot(jsonString) } /** * 结束自动驾驶 */ fun cancelAutoPilot() { - providerApi.cancelAutoPilot() + providerApi?.cancelAutoPilot() } /** * 开启域控制器录制bag包 */ fun recordPackage() { - providerApi.recordPackage() + providerApi?.recordPackage() } fun setEnableLog(isEnableLog: Boolean) { - providerApi.setEnableLog(isEnableLog) + providerApi?.setEnableLog(isEnableLog) } fun setIsWriteLog(isWriteLog: Boolean) { - providerApi.setIsWriteLog(isWriteLog) + providerApi?.setIsWriteLog(isWriteLog) } fun setAutoPilotSpeed(speed: Int): Boolean { - return providerApi.setAutoPilotSpeed(speed) + return providerApi?.setAutoPilotSpeed(speed) ?: false + } + + fun recordCause(key: String?, name: String?, id: String?, reason: String?) { + providerApi?.recordCause(key, name, id, reason) } fun setIPCShutDown() { - providerApi.setIPCShutDown() + providerApi?.setIPCShutDown() } fun setIPCReboot() { - providerApi.setIPCReboot() + providerApi?.setIPCReboot() } } \ No newline at end of file diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt index 33aac6f3e7..b76a5ee25f 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt @@ -149,4 +149,5 @@ object CallerAutoPilotStatusListenerManager : CallerBase() { } } + } \ No newline at end of file diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotIdentifyListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotIdentifyListenerManager.kt index f474e8bb81..d0c0fa9514 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotIdentifyListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotIdentifyListenerManager.kt @@ -1,6 +1,7 @@ package com.mogo.eagle.core.function.call.autopilot import androidx.annotation.Nullable +import com.mogo.eagle.core.data.autopilot.AutoPilotRecordResult import com.mogo.eagle.core.data.autopilot.AutopilotWarnMessage import com.mogo.eagle.core.data.traffic.TrafficData import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener @@ -89,4 +90,17 @@ object CallerAutopilotIdentifyListenerManager : CallerBase() { } } + /** + * 采集任务记录回调 + */ + fun invokeAutopilotRecordResult(result: AutoPilotRecordResult) { + M_AUTOPILOT_IDENTIFY_LISTENERS.forEach { + val tag = it.key + val listener = it.value + LogUtils.dTag(TAG, "tag:$tag listener:$listener") + listener.onAutopilotRecordResult(result) + } + } + + } \ No newline at end of file diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt index b10fbffcba..4f2b06d678 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt @@ -52,6 +52,13 @@ object CallerHmiManager : CallerBase() { waringProviderApi.setToolsViewVisibility(visibility) } + /** + * 开关DebugView + */ + fun toggleDebugView(){ + waringProviderApi.toggleDebugView() + } + /** * 展示VR下V2X预警 * @@ -226,4 +233,24 @@ object CallerHmiManager : CallerBase() { fun hideToolsView() { waringProviderApi.hideToolsView() } + + /** + * 展示工控机下载状态信息 + * @param downloadVersion 下载版本 + * @param downloadStatus 下载状态(0:下载完成;1:正在下载;2:下载失败) + * @param downloadProgress 下载进度 + */ + fun showAdDownloadStatus(downloadVersion : String,downloadStatus : Int,downloadProgress : Int){ + waringProviderApi.showAdDownloadStatus(downloadVersion,downloadStatus,downloadProgress) + } + + /** + * 展示工控机升级状态信息 + * @param upgradeStatus 升级状态(true代表升级成功、false代表升级不成功) + */ + fun showAdUpgradeStatus(upgradeStatus : Boolean){ + waringProviderApi.showAdUpgradeStatus(upgradeStatus) + } + + } \ No newline at end of file diff --git a/core/mogo-core-res/src/main/res/raw/chuzuche.nt3d b/core/mogo-core-res/src/main/res/raw/chuzuche.nt3d old mode 100644 new mode 100755 index 7a08e7beb7..8729e44609 Binary files a/core/mogo-core-res/src/main/res/raw/chuzuche.nt3d and b/core/mogo-core-res/src/main/res/raw/chuzuche.nt3d differ diff --git a/core/mogo-core-res/src/main/res/raw/daba.nt3d b/core/mogo-core-res/src/main/res/raw/daba.nt3d deleted file mode 100644 index 67f8e4f290..0000000000 Binary files a/core/mogo-core-res/src/main/res/raw/daba.nt3d and /dev/null differ diff --git a/core/mogo-core-res/src/main/res/raw/motuoche.nt3d b/core/mogo-core-res/src/main/res/raw/motuoche.nt3d deleted file mode 100644 index da9492887c..0000000000 Binary files a/core/mogo-core-res/src/main/res/raw/motuoche.nt3d and /dev/null differ diff --git a/core/mogo-core-res/src/main/res/raw/othercar.nt3d b/core/mogo-core-res/src/main/res/raw/othercar.nt3d deleted file mode 100644 index 710d65ed56..0000000000 Binary files a/core/mogo-core-res/src/main/res/raw/othercar.nt3d and /dev/null differ diff --git a/core/mogo-core-res/src/main/res/raw/people.nt3d b/core/mogo-core-res/src/main/res/raw/people.nt3d deleted file mode 100644 index 5866095c00..0000000000 Binary files a/core/mogo-core-res/src/main/res/raw/people.nt3d and /dev/null differ diff --git a/core/mogo-core-res/src/main/res/raw/tachexiaoche.nt3d b/core/mogo-core-res/src/main/res/raw/tachexiaoche.nt3d deleted file mode 100644 index b1112e8c02..0000000000 Binary files a/core/mogo-core-res/src/main/res/raw/tachexiaoche.nt3d and /dev/null differ diff --git a/core/mogo-core-res/src/main/res/raw/traffic_daba.nt3d b/core/mogo-core-res/src/main/res/raw/traffic_daba.nt3d new file mode 100755 index 0000000000..dc4fefff36 Binary files /dev/null and b/core/mogo-core-res/src/main/res/raw/traffic_daba.nt3d differ diff --git a/core/mogo-core-res/src/main/res/raw/kache.nt3d b/core/mogo-core-res/src/main/res/raw/traffic_kache.nt3d similarity index 100% rename from core/mogo-core-res/src/main/res/raw/kache.nt3d rename to core/mogo-core-res/src/main/res/raw/traffic_kache.nt3d diff --git a/core/mogo-core-res/src/main/res/raw/traffic_motuoche.nt3d b/core/mogo-core-res/src/main/res/raw/traffic_motuoche.nt3d new file mode 100644 index 0000000000..b4876d7a22 Binary files /dev/null and b/core/mogo-core-res/src/main/res/raw/traffic_motuoche.nt3d differ diff --git a/core/mogo-core-res/src/main/res/raw/traffic_people.nt3d b/core/mogo-core-res/src/main/res/raw/traffic_people.nt3d new file mode 100644 index 0000000000..63af94dde3 Binary files /dev/null and b/core/mogo-core-res/src/main/res/raw/traffic_people.nt3d differ diff --git a/core/mogo-core-res/src/main/res/raw/traffic_tachexiaoche.nt3d b/core/mogo-core-res/src/main/res/raw/traffic_tachexiaoche.nt3d new file mode 100755 index 0000000000..b1c67aa25f Binary files /dev/null and b/core/mogo-core-res/src/main/res/raw/traffic_tachexiaoche.nt3d differ diff --git a/core/mogo-core-res/src/main/res/raw/traffic_zixingche.nt3d b/core/mogo-core-res/src/main/res/raw/traffic_zixingche.nt3d new file mode 100644 index 0000000000..ef9de6d841 Binary files /dev/null and b/core/mogo-core-res/src/main/res/raw/traffic_zixingche.nt3d differ diff --git a/core/mogo-core-res/src/main/res/raw/zixingche.nt3d b/core/mogo-core-res/src/main/res/raw/zixingche.nt3d deleted file mode 100644 index ac39128ad7..0000000000 Binary files a/core/mogo-core-res/src/main/res/raw/zixingche.nt3d and /dev/null differ diff --git a/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/kotlin/ExtensionKt.kt b/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/kotlin/ExtensionKt.kt new file mode 100644 index 0000000000..8d6e851291 --- /dev/null +++ b/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/kotlin/ExtensionKt.kt @@ -0,0 +1,48 @@ +package com.mogo.eagle.core.utilcode.kotlin + +import android.content.Context +import android.graphics.Color +import android.graphics.drawable.Drawable +import android.graphics.drawable.GradientDrawable +import android.util.TypedValue +import android.view.View +import androidx.annotation.ColorInt +import androidx.annotation.IntRange +import com.mogo.eagle.core.utilcode.util.ClickUtils +import com.mogo.eagle.core.utilcode.util.Utils +import java.util.* + + +fun View.onClick(block: (View) -> Unit) { + this.setOnClickListener { + if (ClickUtils.isClickTooFrequent(this)) { + return@setOnClickListener + } + block(it) + } +} + +fun shape(@ColorInt solid: Int = Color.TRANSPARENT, @ColorInt stroke: Int = Color.TRANSPARENT, @IntRange(from = 0) strokeWidth: Int = 0, @IntRange(from = 0) radius: Int = 0, radii: FloatArray = FloatArray(8).apply { Arrays.fill(this, radius.toFloat()) }, shape: Int = GradientDrawable.RECTANGLE): Drawable { + val drawable = GradientDrawable() + drawable.shape = shape + drawable.gradientType = GradientDrawable.LINEAR_GRADIENT + drawable.setColor(solid) + drawable.cornerRadii = radii + drawable.setStroke(strokeWidth, stroke) + return drawable +} + +fun gradient(shape: Int = GradientDrawable.RECTANGLE, @IntRange(from = 0) radius: Int = 0, radii: FloatArray = FloatArray(8).apply { Arrays.fill(this, radius.toFloat()) }, gradientType: Int = GradientDrawable.LINEAR_GRADIENT, orientation: GradientDrawable.Orientation = GradientDrawable.Orientation.TOP_BOTTOM, centerX: Float = 0.5f, centerY: Float = 0.5f, @ColorInt startColor: Int, @ColorInt centerColor: Int = startColor, @ColorInt endColor: Int): Drawable{ + val drawable = GradientDrawable(orientation, intArrayOf(endColor, centerColor, startColor)) + drawable.shape = shape + drawable.gradientType = gradientType + drawable.orientation = orientation + drawable.cornerRadii = radii + drawable.setGradientCenter(centerX, centerY) + return drawable +} + +fun Int.toPixels(context: Context? = null): Float { + val ctx = context ?: Utils.getApp() + return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_PX, this.toFloat(), ctx.resources.displayMetrics) +} diff --git a/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/ClickUtils.java b/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/ClickUtils.java index 4eef7e8b2e..1e44253913 100644 --- a/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/ClickUtils.java +++ b/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/ClickUtils.java @@ -618,4 +618,25 @@ public class ClickUtils { mBitmapDrawable.draw(canvas); } } + + + public static boolean isClickTooFrequent(View view) { + return isClickTooFrequent(view, 500); + } + + public static boolean isClickTooFrequent(View view, int duration) { + try { + Object tag = view.getTag(R.id.tag_click_time); + long past = tag == null ? 0L : (Long)tag; + long now = System.currentTimeMillis(); + if (Math.abs(now - past) < (long)duration) { + return true; + } + + view.setTag(R.id.tag_click_time, now); + } catch (Exception var7) { + } + + return false; + } } diff --git a/core/mogo-core-utils/src/main/res/values/ids.xml b/core/mogo-core-utils/src/main/res/values/ids.xml new file mode 100644 index 0000000000..7f82523441 --- /dev/null +++ b/core/mogo-core-utils/src/main/res/values/ids.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/layoutinflater/OriginalLayoutInflater.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/layoutinflater/OriginalLayoutInflater.java deleted file mode 100644 index 7c9a9fc496..0000000000 --- a/foudations/mogo-commons/src/main/java/com/mogo/commons/layoutinflater/OriginalLayoutInflater.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.mogo.commons.layoutinflater; - -import android.content.Context; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; - -import androidx.annotation.LayoutRes; - -public -/** - * @author congtaowang - * @since 2020/12/23 - * - * 系统实现的布局加载 - */ -class OriginalLayoutInflater { - - private static LayoutInflater sLayoutInflater; - - public static void init( Context context ) { - sLayoutInflater = LayoutInflater.from( context ).cloneInContext( context ); - } - - public static View inflate( @LayoutRes int layoutId, ViewGroup container, boolean attachToRoot ) { - return sLayoutInflater.inflate( layoutId, container, attachToRoot ); - } - - public static View inflate( @LayoutRes int layoutId, ViewGroup container ) { - return sLayoutInflater.inflate( layoutId, container, container != null ); - } -} diff --git a/libraries/map-autonavi/.gitignore b/libraries/map-autonavi/.gitignore deleted file mode 100644 index 42afabfd2a..0000000000 --- a/libraries/map-autonavi/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/libraries/map-autonavi/build.gradle b/libraries/map-autonavi/build.gradle deleted file mode 100644 index fa44fb6255..0000000000 --- a/libraries/map-autonavi/build.gradle +++ /dev/null @@ -1,66 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' - id 'kotlin-android-extensions' - id 'kotlin-kapt' - id 'com.alibaba.arouter' -} - -android { - compileSdkVersion rootProject.ext.android.compileSdkVersion - // buildToolsVersion rootProject.ext.android.buildToolsVersion - defaultConfig { - minSdkVersion rootProject.ext.android.minSdkVersion - targetSdkVersion rootProject.ext.android.targetSdkVersion - versionCode Integer.valueOf(VERSION_CODE) - versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION") - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles 'consumer-rules.pro' - - //ARouter apt 参数 - kapt { - useBuildCache = false - arguments { - arg("AROUTER_MODULE_NAME", project.getName()) - } - } - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility 1.8 - targetCompatibility 1.8 - } -} - -dependencies { - implementation fileTree(dir: "libs", include: ["*.jar"]) - - implementation rootProject.ext.dependencies.arouter - kapt rootProject.ext.dependencies.aroutercompiler - - if (Boolean.valueOf(USE_MAVEN_PACKAGE)) { - implementation rootProject.ext.dependencies.mogo_core_utils - implementation rootProject.ext.dependencies.mogomapapi - implementation rootProject.ext.dependencies.mogocommons - implementation rootProject.ext.dependencies.mogomapapi - - implementation rootProject.ext.dependencies.mogo_core_data - } else { - implementation project(':core:mogo-core-utils') - implementation project(':libraries:mogo-map-api') - implementation project(':foudations:mogo-commons') - implementation project(':services:mogo-service-api') - - implementation project(':core:mogo-core-data') - } -} - -apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString() \ No newline at end of file diff --git a/libraries/map-autonavi/consumer-rules.pro b/libraries/map-autonavi/consumer-rules.pro deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/libraries/map-autonavi/gradle.properties b/libraries/map-autonavi/gradle.properties deleted file mode 100644 index b57696e52a..0000000000 --- a/libraries/map-autonavi/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -GROUP=com.mogo.map -POM_ARTIFACT_ID=map-autonavi -VERSION_CODE=1 \ No newline at end of file diff --git a/libraries/map-autonavi/proguard-rules.pro b/libraries/map-autonavi/proguard-rules.pro deleted file mode 100644 index 481bb43481..0000000000 --- a/libraries/map-autonavi/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/libraries/map-autonavi/src/main/AndroidManifest.xml b/libraries/map-autonavi/src/main/AndroidManifest.xml deleted file mode 100644 index 74341ccd56..0000000000 --- a/libraries/map-autonavi/src/main/AndroidManifest.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/AutoNaviClient.java b/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/AutoNaviClient.java deleted file mode 100644 index dacc792d50..0000000000 --- a/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/AutoNaviClient.java +++ /dev/null @@ -1,229 +0,0 @@ -package com.mogo.map.impl.automap.navi; - -import android.content.Context; -import android.content.Intent; -import android.graphics.Rect; -import android.location.Location; - -import com.mogo.eagle.core.data.map.MogoLatLng; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; -import com.mogo.map.navi.IMogoCarLocationChangedListener2; -import com.mogo.map.navi.IMogoNavi; -import com.mogo.map.navi.MogoCalculatePath; -import com.mogo.map.navi.MogoNaviConfig; -import com.mogo.map.navi.OnCalculatePathItemClickInteraction; - -import java.util.List; - -/** - * @author congtaowang - * @since 2020/6/2 - *

- * 使用高德车机版导航 - */ -public class AutoNaviClient implements IMogoNavi { - - private static final String TAG = "NaviClient"; - - public static final String ACTION_AUTO_MAP = "AUTONAVI_STANDARD_BROADCAST_RECV"; - - public static final String KEY_TYPE = "KEY_TYPE"; - public static final String SOURCE_APP = "SOURCE_APP"; - public static final String LAT = "LAT"; - public static final String LON = "LON"; - public static final String ENTRY_LAT = "ENTRY_LAT"; - public static final String ENTRY_LON = "ENTRY_LON"; - public static final String DEV = "DEV"; // (int)是否偏移(0:lat 和 lon 是已经加密后的,不需要国测加密; 1:需要国测加密) - - /** - * (必填)(int)导航方式 - * =1(避免收费) - * =2(多策略算路) - * =3 (不走高速) - * =4(躲避拥堵) - * =5(不走高速且避免收费) - * =6(不走高速且躲避拥堵) - * =7(躲避收费且躲避拥堵) - * =8(不走高速躲避收费和拥堵) - * =20 (高速优先) - * =24(高速优先且躲避拥堵) - * =-1(地图内部设置默认规则) - */ - public static final String STYLE = "STYLE"; - - private static volatile AutoNaviClient sInstance; - private final Context mContext; - - private AutoNaviClient( Context context ) { - mContext = context.getApplicationContext(); - } - - public static AutoNaviClient getInstance( Context context ) { - if ( sInstance == null ) { - synchronized ( AutoNaviClient.class ) { - if ( sInstance == null ) { - sInstance = new AutoNaviClient( context ); - } - } - } - return sInstance; - } - - public synchronized void release() { - sInstance = null; - } - - @Override - - public void naviTo( MogoLatLng endPoint ) { - Intent intent = new Intent(); - intent.putExtra( KEY_TYPE, 10038 ); - intent.putExtra( LAT, endPoint.lat ); - intent.putExtra( LON, endPoint.lon ); -// intent.putExtra( ENTRY_LAT, endPoint.lat ); -// intent.putExtra( ENTRY_LON, endPoint.lon ); - intent.putExtra( DEV, 0 ); - intent.putExtra( STYLE, -1 ); - intent.putExtra( SOURCE_APP, "Third App" ); - sendByIntent( intent ); - } - - @Override - public void naviTo( MogoLatLng endPoint, MogoNaviConfig config ) { - naviTo( endPoint ); - } - - @Override - public void naviTo( MogoLatLng endPoint, List< MogoLatLng > wayPoints ) { - naviTo( endPoint ); - } - - @Override - public void naviTo( MogoLatLng endPoint, List< MogoLatLng > wayPoints, MogoNaviConfig config ) { - naviTo( endPoint ); - } - - @Override - public void reCalculateRoute( MogoNaviConfig config ) { - Logger.w( TAG, "高德车机导航,不支持此设置" ); - } - - @Override - public void stopNavi() { - Intent intent = new Intent(); - intent.putExtra( "KEY_TYPE", 10010 ); - sendByIntent( intent ); - } - - @Override - public void startNavi( boolean isRealNavi ) { - Logger.w( TAG, "高德车机导航,不支持此设置" ); - } - - private void sendByIntent( Intent intent ) { - intent.setAction( ACTION_AUTO_MAP ); - intent.addFlags( Intent.FLAG_INCLUDE_STOPPED_PACKAGES ); - mContext.sendBroadcast( intent ); - } - - @Override - public boolean isNaviing() { - return MapState.getInstance().isNaving(); - } - - @Override - public List< MogoCalculatePath > getCalculatedStrategies() { - Logger.w( TAG, "高德车机导航,不支持此设置" ); - return null; - } - - @Override - public List< MogoLatLng > getCalculatedPathPos() { - Logger.w( TAG, "高德车机导航,不支持此设置" ); - return null; - } - - @Override - public OnCalculatePathItemClickInteraction getItemClickInteraction() { - Logger.w( TAG, "高德车机导航,不支持此设置" ); - return null; - } - - @Override - public void setLineClickInteraction( OnCalculatePathItemClickInteraction itemClickInteraction ) { - Logger.w( TAG, "高德车机导航,不支持此设置" ); - } - - @Override - public void clearCalculatePaths() { - Logger.w( TAG, "高德车机导航,不支持此设置" ); - } - - @Override - public void setCalculatePathDisplayBounds( Rect bounds ) { - Logger.w( TAG, "高德车机导航,不支持此设置" ); - } - - @Override - public MogoNaviConfig getNaviConfig() { - Logger.w( TAG, "高德车机导航,不支持此设置" ); - return MogoMapApi.getApiBuilder().getNavi( mContext ).getNaviConfig(); - } - - @Override - public boolean setBroadcastMode( int mode ) { - Logger.w( TAG, "高德车机导航,不支持此设置" ); - return false; - } - - @Override - public List< MogoLatLng > getNaviPathCoordinates() { - Logger.w( TAG, "高德车机导航,不支持此设置" ); - return null; - } - - @Override - public MogoLatLng getCarLocation() { - return MogoMapApi.getApiBuilder().getNavi( mContext ).getCarLocation(); - } - - @Override - public Location getCarLocation2() { - return MogoMapApi.getApiBuilder().getNavi( mContext ).getCarLocation2(); - } - - @Override - public void registerCarLocationChangedListener( IMogoCarLocationChangedListener2 listener ) { - //do not impl - } - - @Override - public void startAimlessMode() { - Logger.w( TAG, "高德车机导航,不支持此设置" ); - } - - @Override - public void stopAimlessMode() { - Logger.w( TAG, "高德车机导航,不支持此设置" ); - } - - @Override - public void setAimlessModeStatus( boolean open ) { - Logger.w( TAG, "高德车机导航,不支持此设置" ); - } - - @Override - public void displayOverview( Rect bounds ) { - Logger.w( TAG, "高德车机导航,不支持此设置" ); - } - - @Override - public void setUseExtraGPSData( boolean use ) { - MogoMapApi.getApiBuilder().getNavi( mContext ).setUseExtraGPSData( use ); - } - - @Override - public void setExtraGPSData( double lon, double lat, float speed, float accuracy, float bearing, long timestamp ) { - MogoMapApi.getApiBuilder().getNavi( mContext ).setExtraGPSData( lon, lat, speed, accuracy, bearing, timestamp ); - } -} diff --git a/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/AutoNaviReceiver.java b/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/AutoNaviReceiver.java deleted file mode 100644 index f45302581a..0000000000 --- a/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/AutoNaviReceiver.java +++ /dev/null @@ -1,159 +0,0 @@ -package com.mogo.map.impl.automap.navi; - -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; -import android.text.TextUtils; - -import com.mogo.commons.storage.SpStorage; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; -import com.mogo.map.navi.MogoNaviInfo; -import com.mogo.map.navi.MogoNaviListenerHandler; -import com.mogo.map.navi.MogoTraffic; - -/** - * @author congtaowang - * @since 2020/6/2 - *

- * 高德公版地图透出信息广播接收者 - */ -public class AutoNaviReceiver extends BroadcastReceiver { - - private static final String TAG = "AutoNaviReceiver"; - - public static final String ACTION_AUTONAVI_SEND = "AUTONAVI_STANDARD_BROADCAST_SEND"; - private static AutoNaviReceiver autoNaviReceiver; - private static boolean sRegisterFlag = false; - - private static MogoNaviInfo sNaviInfo; - private static MogoTraffic sTraffic; - - - public static void register( Context context ) { - IntentFilter filter = new IntentFilter(); - filter.addAction( ACTION_AUTONAVI_SEND ); - autoNaviReceiver = new AutoNaviReceiver(); - context.registerReceiver( autoNaviReceiver, filter ); - sRegisterFlag = true; - } - - public static void unregister( Context context ) { - if ( autoNaviReceiver != null && sRegisterFlag ) { - try { - context.unregisterReceiver( autoNaviReceiver ); - } catch ( Exception e ) { - Logger.e( TAG, e, "error. " ); - } - } - } - - @Override - public void onReceive( Context context, Intent intent ) { - String action = intent.getAction(); - - if ( !TextUtils.equals( ACTION_AUTONAVI_SEND, action ) ) { - return; - } - - int keyType = intent.getIntExtra( "KEY_TYPE", 0 ); - switch ( keyType ) { - case 10001: - handleAutoNaviInfo( context, intent ); - break; - case 10019: - int state = intent.getIntExtra( "EXTRA_STATE", -1 ); - handleMapStatusChanged( state ); - break; - case 10056: - String json = intent.getStringExtra( "EXTRA_ROAD_INFO" ); - SpStorage.setNavigationTarget( json ); - Logger.d( TAG, json ); - break; - } - } - - /** - * 在导航/巡航/模拟导航中auto主动将变化的引导信息发送给第三方系统 - * - * @param intent - */ - private void handleAutoNaviInfo( Context context, Intent intent ) { - - int type = intent.getIntExtra( GuideInfoExtraKey.TYPE, -1 ); - - int cameraSpeed = intent.getIntExtra( GuideInfoExtraKey.CAMERA_SPEED, 0 ); - int cameraDisc = intent.getIntExtra( GuideInfoExtraKey.CAMERA_DIST, 0 ); - int cameraType = intent.getIntExtra( GuideInfoExtraKey.CAMERA_TYPE, 0 ); - - if ( type == 0 || type == 1 ) { - if ( !MapState.getInstance().isNaving() - && MogoNaviListenerHandler.getInstance().hasDelegateListener() ) { - MapState.getInstance().setNaving( true ); - MogoNaviListenerHandler.getInstance().onStartNavi(); - } - if ( sNaviInfo == null ) { - sNaviInfo = new MogoNaviInfo(); - } - sNaviInfo.setCurrentLimitSpeed( cameraSpeed ); - sNaviInfo.setCurrentRoadName( intent.getStringExtra( GuideInfoExtraKey.CUR_ROAD_NAME ) ); - sNaviInfo.setCurrentSpeed( intent.getIntExtra( GuideInfoExtraKey.CUR_SPEED, 0 ) ); - sNaviInfo.setCurStepRetainDistance( intent.getIntExtra( GuideInfoExtraKey.SEG_REMAIN_DIS, 0 ) ); - sNaviInfo.setCurStepRetainTime( intent.getIntExtra( GuideInfoExtraKey.SEG_REMAIN_TIME, 0 ) ); - sNaviInfo.setIconResId( MogoMapApi.getApiBuilder().getResIdByIconType( context, intent.getIntExtra( GuideInfoExtraKey.NEW_ICON, 0 ) ) ); - sNaviInfo.setNextRoadName( intent.getStringExtra( GuideInfoExtraKey.NEXT_ROAD_NAME ) ); - sNaviInfo.setPathRetainDistance( intent.getIntExtra( GuideInfoExtraKey.ROUTE_REMAIN_DIS, 0 ) ); - sNaviInfo.setPathRetainTime( intent.getIntExtra( GuideInfoExtraKey.ROUTE_REMAIN_TIME, 0 ) ); - MogoNaviListenerHandler.getInstance().onNaviInfoUpdate( sNaviInfo ); - } - if ( sTraffic == null ) { - sTraffic = new MogoTraffic( MapState.getInstance().isAimless() ? MogoTraffic.TYPE_AIM : MogoTraffic.TYPE_NAVI ); - } - sTraffic.setFromType( MapState.getInstance().isAimless() ? MogoTraffic.TYPE_AIM : MogoTraffic.TYPE_NAVI ); - sTraffic.setDistance( cameraDisc ); - sTraffic.setSpeedLimit( cameraSpeed ); - sTraffic.setTrafficType( cameraType ); - MogoNaviListenerHandler.getInstance().onUpdateTraffic2( sTraffic ); - } - - /** - * 当导航发生状态变更时,将相应的状态通知给系统。 - * - * @param state - */ - private void handleMapStatusChanged( int state ) { - if ( state == -1 ) { - return; - } - switch ( state ) { - case MapStateValue.START_NAVI: - case MapStateValue.START_EMULATOR_NAVI: - if ( MapState.getInstance().isNaving() ) { - Logger.w( TAG, "naving..." ); - return; - } - MapState.getInstance().setNaving( true ); - MogoNaviListenerHandler.getInstance().onStartNavi(); - break; - case MapStateValue.STOP_NAVI: - case MapStateValue.STOP_EMULATOR_NAVI: - case MapStateValue.APP_START: // 语音退出导航,感觉是杀掉了高德APP了 - if ( MapState.getInstance().isNaving() ) { - MapState.getInstance().setNaving( false ); - MogoNaviListenerHandler.getInstance().onStopNavi(); - } - break; - case MapStateValue.START_AIMLESS_NAVI: - MapState.getInstance().setAimless( true ); - break; - case MapStateValue.STOP_AIMLESS_NAVI: - MapState.getInstance().setAimless( false ); - break; - case MapStateValue.EXIT_APP: - break; - case MapStateValue.DESTINATION: - MogoNaviListenerHandler.getInstance().onArriveDestination(); - break; - } - } -} diff --git a/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/GuideInfoExtraKey.java b/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/GuideInfoExtraKey.java deleted file mode 100644 index f71d166564..0000000000 --- a/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/GuideInfoExtraKey.java +++ /dev/null @@ -1,129 +0,0 @@ -package com.mogo.map.impl.automap.navi; - -//引导信息对应的KEY值机器描述 -public class GuideInfoExtraKey { - /** - * 导航类型,对应的值为int类型 - * 0:GPS导航 - * 1:模拟导航 - * 2:巡航 - */ - public static final String TYPE = "TYPE"; - - /** - * 当前道路名称,对应的值为String类型 - */ - public static final String CUR_ROAD_NAME = "CUR_ROAD_NAME"; - - /** - * 下一道路名,对应的值为String类型 - */ - public static final String NEXT_ROAD_NAME = "NEXT_ROAD_NAME"; - - /** - * 电子眼限速度,对应的值为int类型,无限速则为0,单位:公里/小时 - */ - public static final String CAMERA_SPEED = "CAMERA_SPEED"; - - /** - * 导航转向图标,对应的值为int类型 - */ - public static final String ICON = "ICON"; - - /** - * 导航最新的转向图标,对应的值为int类型 - */ - public static final String NEW_ICON = "NEW_ICON"; - - /** - * 路径剩余距离,对应的值为int类型,单位:米 - */ - public static final String ROUTE_REMAIN_DIS = "ROUTE_REMAIN_DIS"; - /** - * 路径剩余时间,对应的值为int类型,单位:秒 - */ - public static final String ROUTE_REMAIN_TIME = "ROUTE_REMAIN_TIME"; - - /** - * 当前导航段剩余距离,对应的值为int类型,单位:米 - */ - public static final String SEG_REMAIN_DIS = "SEG_REMAIN_DIS"; - - /** - * 当前导航段剩余时间,对应的值为int类型,单位:秒 - */ - public static final String SEG_REMAIN_TIME = "SEG_REMAIN_TIME"; - - /** - * 路径总距离,对应的值为int类型,单位:米 - */ - public static final String ROUTE_ALL_DIS = "ROUTE_ALL_DIS"; - - /** - * 路径总时间,对应的值为int类型,单位:秒 - */ - public static final String ROUTE_ALL_TIME = "ROUTE_ALL_TIME"; - - /** - * 当前车速,对应的值为int类型,单位:公里/小时 - */ - public static final String CUR_SPEED = "CUR_SPEED"; - - /** - * 当前道路类型,对应的值为int类型 - * 0:高速公路 - * 1:国道 - * 2:省道 - * 3:县道 - * 4:乡公路 - * 5:县乡村内部道路 - * 6:主要大街、城市快速道 * 7:主要道路 - * 8:次要道路 - * 9:普通道路 - * 10:非导航道路 - */ - public static final String ROAD_TYPE = "ROAD_TYPE"; - - /** - * 路径剩余时间,对应的值为String类型,单位:天/小时/分钟 比如:1天2小时, 21小时30分 - * 钟(只用于长安) - */ - public static final String ROUTE_REMAIN_TIME_STRING = "ROUTE_REMAIN_TIME_S TRING"; - - /** - * 下下个路名名称,对应的值为String类型 - */ - public static final String NEXT_NEXT_ROAD_NAME = "NEXT_NEXT_ROAD_NAME"; - /** - * 下下个路口转向图标,对应的值为int类型 - */ - - public static final String NEXT_NEXT_TURN_ICON = "NEXT_NEXT_TURN_ICON"; - - /** - * 距离下下个路口剩余距离,对应的值为int类型,单位:米 - */ - public static final String NEXT_SEG_REMAIN_DIS = "NEXT_SEG_REMAIN_DIS"; - - /** - * 距离下下个路口剩余时间,对应的值为int类型,单位:秒 - */ - public static final String NEXT_SEG_REMAIN_TIME = "NEXT_SEG_REMAIN_TIME"; - - /** - * 距离最近的电子眼距离,对应的值为int类型,单位:米 - */ - public static final String CAMERA_DIST = "CAMERA_DIST"; - - /** - * 电子眼类型,对应的值为int类型 - * 0 测速摄像头 - * 1为监控摄像头 - * 2为闯红灯拍照 - * 3为违章拍照 - * 4为公交专用道摄像头 - * 5为应急车道摄像头 - * 6为非机动车道拍照 - */ - public static final String CAMERA_TYPE = "CAMERA_TYPE"; -} \ No newline at end of file diff --git a/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/MapState.java b/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/MapState.java deleted file mode 100644 index 4b4f2ee126..0000000000 --- a/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/MapState.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.mogo.map.impl.automap.navi; - -public -/** - * @author congtaowang - * @since 2020/6/3 - * - * 高德地图状态 - */ -class MapState { - - private static volatile MapState sInstance; - - private MapState() { - } - - public static MapState getInstance() { - if ( sInstance == null ) { - synchronized ( MapState.class ) { - if ( sInstance == null ) { - sInstance = new MapState(); - } - } - } - return sInstance; - } - - public synchronized void release() { - sInstance = null; - } - - private boolean isNaving = false; - private boolean isAimless = false; - - public boolean isNaving() { - return isNaving; - } - - public void setNaving( boolean naving ) { - isNaving = naving; - } - - public boolean isAimless() { - return isAimless; - } - - public void setAimless( boolean aimless ) { - isAimless = aimless; - } -} diff --git a/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/MapStateValue.java b/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/MapStateValue.java deleted file mode 100644 index f2913ff1bb..0000000000 --- a/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/MapStateValue.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.mogo.map.impl.automap.navi; - -/** - * @author congtaowang - * @since 2020/6/3 - *

- * 高德公版地图状态值 - */ -public interface MapStateValue { - - int START_NAVI = 8; - - int STOP_NAVI = 9; - - int START_EMULATOR_NAVI = 10; - - int STOP_EMULATOR_NAVI = 12; - - int START_AIMLESS_NAVI = 24; - - int STOP_AIMLESS_NAVI = 25; - - int EXIT_APP = 45; - - int DESTINATION = 39; - - int APP_START = 0; -} diff --git a/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/MogoMapApi.java b/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/MogoMapApi.java deleted file mode 100644 index 1fe1f6f714..0000000000 --- a/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/MogoMapApi.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.mogo.map.impl.automap.navi; - -import com.alibaba.android.arouter.launcher.ARouter; -import com.mogo.map.IMogoMapApiBuilder; - -/** - * @author congtaowang - * @since 2020/12/10 - *

- * 描述 - */ -public class MogoMapApi { - - private static IMogoMapApiBuilder sApiBuilder; - - public static IMogoMapApiBuilder getApiBuilder() { - if (sApiBuilder == null) { - synchronized (AutoNaviClient.class) { - if (sApiBuilder == null) { - sApiBuilder = ARouter.getInstance().navigation(IMogoMapApiBuilder.class); - } - } - } - return sApiBuilder; - } -} diff --git a/libraries/map-custom/consumer-rules.pro b/libraries/map-custom/consumer-rules.pro index 1a33c1b83d..e8042d6d8d 100644 --- a/libraries/map-custom/consumer-rules.pro +++ b/libraries/map-custom/consumer-rules.pro @@ -1,4 +1,3 @@ --keep class com.mogo.map.impl.custom.AMapUiSettingsWrapper{*;} #-----自研地图----- -keepattributes EnclosingMethod @@ -13,5 +12,3 @@ -keepattributes Exceptions,InnerClasses,... -keep class com.zhidaoauto.map.sdk.open.camera.CameraPosition{ *; } --keep class com.zhidaoauto.map.sdk.open.camera.CameraPosition$B { *; } --keep class com.zhidaoauto.map.sdk.open.camera.CameraPosition$C { *; } \ No newline at end of file diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java index e7e882758b..343a3e2958 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java @@ -30,12 +30,12 @@ import com.mogo.eagle.core.utilcode.util.GsonUtils; import com.mogo.eagle.core.utilcode.util.UiThreadHandler; import com.mogo.map.IMogoMap; import com.mogo.map.IMogoMapView; -import com.mogo.map.impl.custom.navi.NaviClient; import com.mogo.map.impl.custom.utils.MogoMapUtils; import com.mogo.map.impl.custom.utils.ObjectUtils; import com.mogo.map.impl.custom.utils.PointInterpolatorUtil; import com.mogo.map.impl.custom.utils.ResIdCache; import com.mogo.map.listener.MogoMapListenerHandler; +import com.mogo.map.navi.MogoCarLocationChangedListenerRegister; import com.mogo.map.uicontroller.CarCursorOption; import com.mogo.map.uicontroller.EnumMapUI; import com.mogo.map.uicontroller.IMogoMapUIController; @@ -129,65 +129,9 @@ public class AMapViewWrapper implements IMogoMapView, MapAutoViewHelper options = mMapView.getMapAutoViewHelper(); if (options != null) { options.setZoomGesturesEnabled(true); - // 设置是否开启自动黑夜模式切换,默认为false,不自动切换 - // options.setAutoSwitchStyle(false); - // 设置6秒后是否自动锁车 - // options.setAutoLockCar( false ); - // 设置路线上的摄像头气泡是否显示 - // options.setCameraBubbleShow( true ); - // 设置路线相关的配置属性,如:路线的路况颜色,路线上是否显示摄像头气泡等。 - // options.setRouteOverlayOptions( MapStyleUtils.getRouteOverlayOptions() ); // 设置自车的图片对象 options.setMyLocationStyle(options.getMyLocationStyle().myLocationIcon(DEFAULT_OPTION.getCarCursorRes())); - // 设置指南针图标否在导航界面显示,默认显示。true,显示;false,隐藏。 - // options.hiddenDirection(); - // 黑夜模式 - // options.setMapStyle(MapAutoApi.MAP_STYLE_NIGHT); - //设置路况光柱条是否显示(只适用于驾车导航,需要联网)。 - // options.setTrafficBarEnabled( false ); - // 设置[实时交通图层开关按钮]是否显示(只适用于驾车导航,需要联网)。 - // options.setTrafficLayerEnabled( false ); - // 设置导航界面是否显示路线全览按钮。 - // options.setRouteListButtonShow( false ); - // 设置导航状态下屏幕是否一直开启。 - // options.setScreenAlwaysBright( true ); - // 设置交通播报是否打开(只适用于驾车导航,需要联网)。 - // options.setTrafficInfoUpdateEnabled( true ); - // 设置摄像头播报是否打开(只适用于驾车导航)。 - // options.setCameraInfoUpdateEnabled( true ); - // 设置菜单按钮是否在导航界面显示。 - // options.setSettingMenuEnabled( false ); - // 设置是否绘制显示交通路况的线路(彩虹线),拥堵-红色,畅通-绿色,缓慢-黄色,未知-蓝色。默认不绘制彩虹线。 - // options.setTrafficLine( true ); - // 设置是否绘制牵引线(当前位置到目的地的指引线)。默认不绘制牵引线。 - // options.setLeaderLineEnabled( -1 ); - // 设置导航界面UI是否显示。 - // options.setLayoutVisible( false ); - // 设置是否自动画路 - // options.setAutoDrawRoute( false ); - // 设置是否显示路口放大图(实景图) - // options.setRealCrossDisplayShow( false ); - // 设置是否显示路口放大图(路口模型图) - // options.setModeCrossDisplayShow( false ); - // 设置是否显示道路信息view - // options.setLaneInfoShow( false ); - // 设置是否自动改变缩放等级 - // options.setAutoChangeZoom( false ); - // 设置是否自动全览模式,即在算路成功后自动进入全览模式 - // options.setAutoDisplayOverview( false ); - // 设置路线转向箭头隐藏和显示 - // options.setNaviArrowVisible( false ); - // 通过路线是否自动置灰,仅支持驾车导航 - // options.setAfterRouteAutoGray( true ); - // options.setZoom(((int) mDefaultZoomLevel)); - // options.setPointToCenter( 0.5D, 0.5D ); - // 2D模式 - // options.setMapViewPerspective(MapAutoApi.MAP_PERSPECTIVE_2D); - // mMapView.setViewOptions( options ); } - // mMapView.setRouteOverlayVisible( false ); - // mMapView.setCarOverlayVisible( false ); - // setUIMode(EnumMapUI.CarUp_2D); } private void initListeners() { @@ -198,7 +142,6 @@ public class AMapViewWrapper implements IMogoMapView, mMapView.setOnMapTouchListener(this); mMapView.setOnMapClickListener(this); mMapView.getLocationClient().registerListener(this); - // mMapView.getLocationClient().registerGpsListener( this ); mMapView.registerListener(this, MapAutoApi.LISTENER_TYPE_ZOOM); mMapView.registerListener(this, MapAutoApi.LISTENER_TYPE_ROTATE); mMapView.registerListener(this, MapAutoApi.LISTENER_TYPE_3D); @@ -206,18 +149,6 @@ public class AMapViewWrapper implements IMogoMapView, mMapView.setOnMapStyleListener(this); mMapView.setOnMapViewVisualAngleChangeListener(this); Logger.d(TAG, "styleop - initListeners - setOnMapStyleListener - view %s", mMapView); - - // mMapView.setOnPolylineClickListener( this ); - // mMapView.setAMapNaviViewListener( this ); - // - // final AMap aMap = mMapView.getMap(); - // if ( aMap != null ) { - // aMap.setOnPOIClickListener( this ); - // aMap.setOnMapClickListener( this ); - // aMap.setOnCameraChangeListener( this ); - // aMap.setOnMyLocationChangeListener( this ); - // } - // AMapMessageManager.getInstance().registerAMapMessageListener( this ); } private Context getContext() { @@ -450,11 +381,6 @@ public class AMapViewWrapper implements IMogoMapView, if (mCurrentUI == EnumMapUI.Type_VR) { return; } - - if (visible && NaviClient.getInstance(getContext()).isNaviing()) { - return; - } - if (checkAMapView()) { MyLocationStyle style = mMapView.getMapAutoViewHelper().getMyLocationStyle(); if (visible) { @@ -468,9 +394,6 @@ public class AMapViewWrapper implements IMogoMapView, @Override public void showMyLocation(View view) { Logger.d(TAG, "showMyLocation %s", "view"); - if (NaviClient.getInstance(getContext()).isNaviing()) { - return; - } if (DebugConfig.isDebug()) { Logger.d(TAG, Log.getStackTraceString(new Throwable())); } @@ -771,7 +694,9 @@ public class AMapViewWrapper implements IMogoMapView, } - NaviClient.getInstance(getContext()).syncCarLocation(sysLocation); + if (MogoCarLocationChangedListenerRegister.getInstance().getListener() != null) { + MogoCarLocationChangedListenerRegister.getInstance().getListener().onCarLocationChanged2(sysLocation); + } if (checkAMapView() && mMapLoaded) { // 地图初始化完成后,每隔5s自动判断当前地图的模式 if (mIsFirstLocated) { @@ -793,9 +718,6 @@ public class AMapViewWrapper implements IMogoMapView, @Override public void onMapClick(@Nullable LonLatPoint lonLatPoint) { - if (InterceptorHandler.getInstance().ignoreMapClicked(getContext())) { - return; - } MogoMapListenerHandler.getInstance().onMapClick(ObjectUtils.fromAMap(lonLatPoint)); } @@ -1075,26 +997,6 @@ public class AMapViewWrapper implements IMogoMapView, // Log.i("timer-matchRoad-4", "cost " + (System.currentTimeMillis() - start) + "ms roadId: " + singlePointRoadInfo.getRoadId()); roadCache = new RoadCacheWrapper(singlePointRoadInfo.getCoords()); roadCache.setLaneWidth(singlePointRoadInfo.getLaneWidth()); - // 在地图上画点的测试方法 - // try { - // PolylineOptions options = new PolylineOptions( ); - // options.setColor( colors[colorIndex++] ); - // options.setId( "test-line"+new Random( ).nextLong() ); - // options.setGps( true ); - // options.setLineWidth( 3 ); - // List points = singlePointRoadInfo.getCoords(); - // ArrayList< LonLat > lonLats = new ArrayList<>( ); - // for ( LonLatPoint point : points ) { - // lonLats.add( new LonLat( point.getLongitude(), point.getLatitude() ) ); - // } - // options.setLonLats( lonLats ); - // mMapView.getMapAutoViewHelper().drawThickLine( options ); - // if (colorIndex >= colors.length) { - // colorIndex = 0; - // } - // } catch( Exception e ){ - // e.printStackTrace(); - // } } } diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapWrapper.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapWrapper.java index 66b0a5ac66..f8aa9e0fcd 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapWrapper.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapWrapper.java @@ -148,11 +148,6 @@ public class AMapWrapper implements IMogoMap { return null; } - // 地图导航时,忽略参数 - if (InterceptorHandler.getInstance().ignoreAddMarkersMoveToCenterParameters(getContext())) { - moveToCenter = false; - } - ArrayList markers = new ArrayList<>(); ArrayList markerOptions = new ArrayList<>(); ArrayList mogoMarkers = new ArrayList<>(); diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/CustomMapApiBuilder.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/CustomMapApiBuilder.java index cc8d7f0ba1..a1ed84e85b 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/CustomMapApiBuilder.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/CustomMapApiBuilder.java @@ -9,14 +9,10 @@ import com.mogo.map.IMogoMapApiBuilder; import com.mogo.map.IMogoMapView; import com.mogo.map.MapApiPath; import com.mogo.map.impl.custom.location.ALocationClient; -import com.mogo.map.impl.custom.navi.NaviClient; import com.mogo.map.impl.custom.search.GeocodeSearchClient; import com.mogo.map.impl.custom.search.PoiSearchClient; import com.mogo.map.impl.custom.uicontroller.AMapUIController; -import com.mogo.map.impl.custom.utils.IconTypeUtils; import com.mogo.map.location.IMogoLocationClient; -import com.mogo.map.navi.IMogoAimless; -import com.mogo.map.navi.IMogoNavi; import com.mogo.map.search.geo.IMogoGeoSearch; import com.mogo.map.search.poisearch.IMogoPoiSearch; import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery; @@ -52,22 +48,12 @@ public class CustomMapApiBuilder implements IMogoMapApiBuilder { return AMapUIController.getInstance(); } - @Override - public IMogoNavi getNavi(Context context) { - return NaviClient.getInstance(context); - } @Override public IMogoPoiSearch getPoiSearchClient(Context context, MogoPoiSearchQuery query) { return new PoiSearchClient(context, query); } - @Override - public IMogoAimless getAimless(Context context) { - return null; - } - - @Override public IMogoMapView getMapView(Context context) { Log.d(TAG, "setDebugMode==true"); @@ -77,8 +63,8 @@ public class CustomMapApiBuilder implements IMogoMapApiBuilder { //.setDataFileSource(1) //todo 1-使用本地地图数据,0-使用在线地图数据 .setCoordinateType(MapParams.COORDINATETYPE_GCJ02) .setPerspectiveMode(MapParams.MAP_PERSPECTIVE_3D) - // .setZoom( 20 ) - // .setPointToCenter( 0.734375f, 0.5f ) + // .setZoom( 20 ) + // .setPointToCenter( 0.734375f, 0.5f ) .setPointToCenter(0.5f, 0.5f) //todo 2D模式下需要注意ADAS部分遮挡 .setStyleMode(MapParams.MAP_STYLE_VR); @@ -100,11 +86,6 @@ public class CustomMapApiBuilder implements IMogoMapApiBuilder { } - @Override - public int getResIdByIconType(Context context, int iconType) { - return IconTypeUtils.getResIdByIconType(context, iconType); - } - @Override public void init(Context context) { Logger.d(TAG, "init"); diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/IInterceptor.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/IInterceptor.java deleted file mode 100644 index 23bfd89255..0000000000 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/IInterceptor.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.mogo.map.impl.custom; - -import android.content.Context; - -/** - * @author congtaowang - * @since 2019-12-27 - *

- * 操作拦截器 - */ -public interface IInterceptor { - - /** - * 是否忽略添加多个marker时聚拢参数 - *

- * 导航时:不需要聚拢 - * - * @return true - 忽略 false - 不忽略 - */ - boolean ignoreAddMarkersMoveToCenterParameters( Context context ); - - /** - * 导航时,是否响应 poi 点击 - * - * @param context - * @return - */ - boolean ignorePoiClicked( Context context ); - - /** - * 导航时,是否响应地图点击 - * - * @param context - * @return - */ - boolean ignoreMapClicked( Context context ); - - /** - * 请求绘制路线 - * - * @param context - * @return - */ - boolean ignoreDrawRouteOverlay( Context context ); -} diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/InterceptorHandler.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/InterceptorHandler.java deleted file mode 100644 index 91f18a2c69..0000000000 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/InterceptorHandler.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.mogo.map.impl.custom; - -import android.content.Context; - - -/** - * @author congtaowang - * @since 2019-12-27 - *

- * 操作拦截器 - */ -public class InterceptorHandler implements IInterceptor { - - private static volatile InterceptorHandler sInstance; - - private Context mContext; - - private InterceptorHandler() { - } - - public static InterceptorHandler getInstance() { - if ( sInstance == null ) { - synchronized ( InterceptorHandler.class ) { - if ( sInstance == null ) { - sInstance = new InterceptorHandler(); - } - } - } - return sInstance; - } - - public synchronized void release() { - sInstance = null; - } - - public void init( Context context ) { - mContext = context; - } - - @Override - public boolean ignoreAddMarkersMoveToCenterParameters( Context context ) { - return false;//NaviClient.getInstance( context ).isNaviing(); - } - - @Override - public boolean ignorePoiClicked( Context context ) { - return false;//NaviClient.getInstance( context ).isNaviing(); - } - - @Override - public boolean ignoreMapClicked( Context context ) { - return false;//NaviClient.getInstance( context ).isNaviing(); - } - - @Override - public boolean ignoreDrawRouteOverlay( Context context ) { - return false;//NaviClient.getInstance( context ).isNaviing(); - } -} diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/location/ALocationClient.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/location/ALocationClient.java index c27d397332..3116a76d74 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/location/ALocationClient.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/location/ALocationClient.java @@ -59,12 +59,6 @@ public class ALocationClient implements IMogoLocationClient { return; } if ( mClient != null ) { -// AMapLocationClientOption option = new AMapLocationClientOption(); -// option.setLocationMode( AMapLocationClientOption.AMapLocationMode.Hight_Accuracy ); -// option.setNeedAddress( true ); -// option.setGpsFirst( true ); -// option.setInterval( interval ); -// mClient.setLocationOption( option ); mClient.start(); } } diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/navi/NaviClient.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/navi/NaviClient.java deleted file mode 100644 index 2f0f7a752c..0000000000 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/navi/NaviClient.java +++ /dev/null @@ -1,264 +0,0 @@ -package com.mogo.map.impl.custom.navi; - -import android.content.Context; -import android.graphics.Rect; -import android.location.Location; - -import com.mogo.eagle.core.data.map.MogoLatLng; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; -import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr; -import com.mogo.map.impl.custom.AMapWrapper; -import com.mogo.map.navi.IMogoCarLocationChangedListener2; -import com.mogo.map.navi.IMogoNavi; -import com.mogo.map.navi.MogoCalculatePath; -import com.mogo.map.navi.MogoCarLocationChangedListenerRegister; -import com.mogo.map.navi.MogoNaviConfig; -import com.mogo.map.navi.OnCalculatePathItemClickInteraction; -import com.zhidaoauto.map.sdk.open.view.MapAutoViewHelper; - -import java.util.List; - -/** - * @author congtaowang - * @since 2019-12-25 - *

- * 自研导航 - */ -public class NaviClient implements IMogoNavi { - - /** - * 巡航状态控制 - */ - public static final String KEY_AIMLESS_STATUS = "KEY_AIMLESS_STATUS"; - - private static final String TAG = "NaviClient"; - private final Context mContext; - - private MapAutoViewHelper mAMapNavi; - - /** - * 导航策略配置 - */ - - private MogoNaviConfig mMogoNaviConfig = new MogoNaviConfig(); - - private static volatile NaviClient sInstance; - private boolean mIsRealNavi; - - private Location mCarLocation = new Location("GPS"); - /** - * 巡航模式配置状态 - */ - private boolean mAimlessModeStatus; - - /** - * 巡航状态 - */ - private boolean mAimlessStatus; - - private NaviClient(Context context) { - mCarLocation.setLongitude(116.97000); - mCarLocation.setLatitude(39.97000); - mContext = context; - mAMapNavi = AMapWrapper.getAMap(); - } - - public static NaviClient getInstance(Context context) { - if (sInstance == null) { - synchronized (NaviClient.class) { - if (sInstance == null) { - sInstance = new NaviClient(context); - } - } - } - return sInstance; - } - - public synchronized void release() { - sInstance = null; - } - - @Override - public void naviTo(MogoLatLng endPoint) { - naviTo(endPoint, mMogoNaviConfig); - } - - @Override - public void naviTo(MogoLatLng endPoint, MogoNaviConfig config) { - naviTo(endPoint, null, config); - } - - @Override - public void naviTo(MogoLatLng endPoint, List wayPoints) { - naviTo(endPoint, wayPoints, mMogoNaviConfig); - } - - @Override - public void naviTo(MogoLatLng endPoint, List wayPoints, MogoNaviConfig config) { - if (!checkAMapNavi()) { - return; - } - Logger.i(TAG, "开始规划路径"); - mMogoNaviConfig = config; - if (mMogoNaviConfig == null) { - mMogoNaviConfig = new MogoNaviConfig(); - } - } - - @Override - public void reCalculateRoute(MogoNaviConfig config) { - if (!checkAMapNavi()) { - return; - } - mMogoNaviConfig = config; - if (mMogoNaviConfig == null) { - mMogoNaviConfig = new MogoNaviConfig(); - } - } - - @Override - public void stopNavi() { - } - - - @Override - public void startNavi(boolean isRealNavi) { - } - - @Override - public boolean isNaviing() { - return false; - } - - @Override - public List getCalculatedStrategies() { - return null; - } - - @Override - public List getCalculatedPathPos() { - return null; - } - - @Override - public OnCalculatePathItemClickInteraction getItemClickInteraction() { - return null; - } - - @Override - public void setLineClickInteraction(OnCalculatePathItemClickInteraction lineClickInteraction) { - - } - - @Override - public void clearCalculatePaths() { - } - - @Override - public void setCalculatePathDisplayBounds(Rect bounds) { - } - - @Override - public MogoNaviConfig getNaviConfig() { - return mMogoNaviConfig; - } - - @Override - public boolean setBroadcastMode(int mode) { - return false; - } - - @Override - public List getNaviPathCoordinates() { - return null; - } - - @Override - public MogoLatLng getCarLocation() { - if (mCarLocation != null) { - synchronized (mCarLocation) { - return new MogoLatLng(mCarLocation.getLatitude(), mCarLocation.getLongitude()); - } - } - return null; - } - - @Override - public Location getCarLocation2() { - return mCarLocation; - } - - @Override - public void registerCarLocationChangedListener(IMogoCarLocationChangedListener2 listener) { - // do not impl. - } - - // -- end - - public void syncCarLocation(Location location) { - mCarLocation = location; - if (MogoCarLocationChangedListenerRegister.getInstance().getListener() != null) { - MogoCarLocationChangedListenerRegister.getInstance().getListener().onCarLocationChanged2(location); - } - } - - private boolean checkAMapNavi() { - mAMapNavi = AMapWrapper.getAMap(); - if (mAMapNavi == null) { - Logger.e(TAG, "自研导航实例为空!!!"); - return false; - } - return true; - } - - @Override - public void startAimlessMode() { - } - - @Override - public void stopAimlessMode() { - } - - @Override - public void setAimlessModeStatus(boolean open) { - this.mAimlessModeStatus = open; - SharedPrefsMgr.getInstance(mContext).putBoolean(KEY_AIMLESS_STATUS, open); - if (open) { - if (!mAimlessStatus) { - startAimlessMode(); - } - } else { - if (mAimlessStatus) { - stopAimlessMode(); - } - } - } - - @Override - public void displayOverview(Rect bounds) { - } - - @Override - public void setUseExtraGPSData(boolean use) { - Logger.d(TAG, "设置外部gps源状态 %s", use); - mAMapNavi.setIsUseExtraGPSData(use); - AMapWrapper.getAMap().setMyLocationEnabled(true); - } - - @Override - public void setExtraGPSData(double lon, double lat, float speed, float accuracy, float bearing, long timestamp) { - if (!mAMapNavi.getIsUseExtraGPSData()) { - Logger.d(TAG, "拒绝外部GPS数据"); - return; - } - Location location = new Location("外部GPS源"); - location.setLongitude(lon); - location.setLatitude(lat); - location.setSpeed(speed); - location.setAccuracy(accuracy); - location.setBearing(bearing); - location.setTime(timestamp); - //type字段传1时代表WGS84坐标 - mAMapNavi.setExtraGPSData(2, location); - } -} diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/utils/IconTypeUtils.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/utils/IconTypeUtils.java deleted file mode 100644 index 7f2dc1353e..0000000000 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/utils/IconTypeUtils.java +++ /dev/null @@ -1,156 +0,0 @@ -package com.mogo.map.impl.custom.utils; - -import android.content.Context; -import android.util.SparseArray; - - -/** - * @author congtaowang - * @since 2019-09-29 - *

- * 描述 - */ -public class IconTypeUtils { - - public class IconType { - public static final int NONE = 0; - public static final int DEFAULT = 1; - public static final int LEFT = 2; - public static final int RIGHT = 3; - public static final int LEFT_FRONT = 4; - public static final int RIGHT_FRONT = 5; - public static final int LEFT_BACK = 6; - public static final int RIGHT_BACK = 7; - public static final int LEFT_TURN_AROUND = 8; - public static final int STRAIGHT = 9; - public static final int ARRIVED_WAYPOINT = 10; - public static final int ENTER_ROUNDABOUT = 11; - public static final int OUT_ROUNDABOUT = 12; - public static final int ARRIVED_SERVICE_AREA = 13; - public static final int ARRIVED_TOLLGATE = 14; - public static final int ARRIVED_DESTINATION = 15; - public static final int ARRIVED_TUNNEL = 16; - public static final int ENTRY_LEFT_RING = 17; - public static final int LEAVE_LEFT_RING = 18; - public static final int U_TURN_RIGHT = 19; - public static final int SPECIAL_CONTINUE = 20; - public static final int ENTRY_RING_LEFT = 21; - public static final int ENTRY_RING_RIGHT = 22; - public static final int ENTRY_RING_CONTINUE = 23; - public static final int ENTRY_RING_UTURN = 24; - public static final int ENTRY_LEFT_RING_LEFT = 25; - public static final int ENTRY_LEFT_RING_RIGHT = 26; - public static final int ENTRY_LEFT_RING_CONTINUE = 27; - public static final int ENTRY_LEFTRINGU_TURN = 28; - public static final int CROSSWALK = 29; - public static final int OVERPASS = 30; - public static final int UNDERPASS = 31; - public static final int SQUARE = 32; - public static final int PARK = 33; - public static final int STAIRCASE = 34; - public static final int LIFT = 35; - public static final int CABLEWAY = 36; - public static final int SKY_CHANNEL = 37; - public static final int CHANNEL = 38; - public static final int WALK_ROAD = 39; - public static final int CRUISE_ROUTE = 40; - public static final int SIGHTSEEING_BUSLINE = 41; - public static final int SLIDEWAY = 42; - public static final int LADDER = 43; - public static final int SLOPE = 44; - public static final int BRIDGE = 45; - public static final int FERRY = 46; - public static final int SUBWAY = 47; - public static final int ENTER_BUILDING = 48; - public static final int LEAVE_BUILDING = 49; - public static final int BY_ELEVATOR = 50; - public static final int BY_STAIR = 51; - public static final int BY_ESCALATOR = 52; - public static final int LOW_TRAFFIC_CROSS = 53; - public static final int LOW_CROSS = 54; - - public IconType() { - } - } - - private static SparseArray< String > sIconName = new SparseArray<>(); - - static { - sIconName.put( IconType.ARRIVED_DESTINATION, "到达目的地" ); - sIconName.put( IconType.ARRIVED_SERVICE_AREA, "到达服务区" ); - sIconName.put( IconType.ARRIVED_TOLLGATE, "到达收费站" ); - sIconName.put( IconType.ARRIVED_TUNNEL, "到达隧道" ); - sIconName.put( IconType.ARRIVED_WAYPOINT, "到达途经点" ); - sIconName.put( IconType.BRIDGE, "通过桥" ); - sIconName.put( IconType.BY_ELEVATOR, "电梯换层" ); - sIconName.put( IconType.BY_ESCALATOR, "扶梯换层" ); - sIconName.put( IconType.BY_STAIR, "楼梯换层" ); - sIconName.put( IconType.CABLEWAY, "通过索道" ); - sIconName.put( IconType.CHANNEL, "通过通道" ); - sIconName.put( IconType.CROSSWALK, "通过人行横道" ); - sIconName.put( IconType.CRUISE_ROUTE, "通过游船路线" ); - sIconName.put( IconType.DEFAULT, "自车" ); - sIconName.put( IconType.ENTER_BUILDING, "进入建筑物" ); - sIconName.put( IconType.ENTER_ROUNDABOUT, "进入环岛" ); - sIconName.put( IconType.ENTRY_LEFT_RING, "进入环岛" ); - sIconName.put( IconType.ENTRY_LEFT_RING_CONTINUE, "绕环岛直行" ); - sIconName.put( IconType.ENTRY_LEFT_RING_LEFT, "绕环岛左转" ); - sIconName.put( IconType.ENTRY_LEFT_RING_RIGHT, "绕环岛右转" ); - sIconName.put( IconType.ENTRY_LEFTRINGU_TURN, "绕环岛调头" ); - sIconName.put( IconType.ENTRY_RING_CONTINUE, "绕环岛直行" ); - sIconName.put( IconType.ENTRY_RING_LEFT, "绕环岛左转" ); - sIconName.put( IconType.ENTRY_RING_RIGHT, "绕环岛右转" ); - sIconName.put( IconType.ENTRY_RING_UTURN, "绕环岛调头" ); - sIconName.put( IconType.FERRY, "通过轮渡" ); - sIconName.put( IconType.LADDER, "通过阶梯" ); - sIconName.put( IconType.LEAVE_BUILDING, "离开建筑物" ); - sIconName.put( IconType.LEAVE_LEFT_RING, "驶出环岛" ); - sIconName.put( IconType.LEFT, "左转" ); - sIconName.put( IconType.LEFT_BACK, "左后" ); - sIconName.put( IconType.LEFT_FRONT, "左前方" ); - sIconName.put( IconType.LEFT_TURN_AROUND, "左转掉头" ); - sIconName.put( IconType.LIFT, "通过直梯" ); - sIconName.put( IconType.LOW_CROSS, "通过普通路口" ); - sIconName.put( IconType.LOW_TRAFFIC_CROSS, "红绿灯路口" ); - sIconName.put( IconType.NONE, "无定义" ); - sIconName.put( IconType.OUT_ROUNDABOUT, "驶出环岛" ); - sIconName.put( IconType.OVERPASS, "通过过街天桥" ); - sIconName.put( IconType.PARK, "通过公园" ); - sIconName.put( IconType.RIGHT, "右转" ); - sIconName.put( IconType.RIGHT_BACK, "右后方" ); - sIconName.put( IconType.RIGHT_FRONT, "右前方" ); - sIconName.put( IconType.SIGHTSEEING_BUSLINE, "通过观光车路线" ); - sIconName.put( IconType.SKY_CHANNEL, "通过空中通道" ); - sIconName.put( IconType.SLIDEWAY, "通过滑道" ); - sIconName.put( IconType.SLOPE, "通过斜坡" ); - sIconName.put( IconType.SPECIAL_CONTINUE, "顺行" ); - sIconName.put( IconType.SQUARE, "通过广场" ); - sIconName.put( IconType.STAIRCASE, "通过扶梯" ); - sIconName.put( IconType.STRAIGHT, "直行" ); - sIconName.put( IconType.SUBWAY, "通过地铁通道" ); - sIconName.put( IconType.U_TURN_RIGHT, "右转掉头" ); - sIconName.put( IconType.UNDERPASS, "通过地下通道" ); - sIconName.put( IconType.WALK_ROAD, "通过行人道路" ); - } - - private static int lastIconType = 0; - private static int lastIconResId = 0; - - public static String getNameByIconType( int iconType ) { - return sIconName.get( iconType ); - } - - public static int getResIdByIconType( Context context, int iconType ) { - try { - if ( iconType == lastIconType ) { - return lastIconResId; - } - int target = context.getResources().getIdentifier( "ic_" + iconType, "drawable", context.getPackageName() ); - lastIconType = iconType; - lastIconResId = target; - return target; - } catch ( Exception e ) { - return -1; - } - } -} diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/IMogoMapApiBuilder.java b/libraries/mogo-map-api/src/main/java/com/mogo/map/IMogoMapApiBuilder.java index f55c505ae6..190f91cb5c 100644 --- a/libraries/mogo-map-api/src/main/java/com/mogo/map/IMogoMapApiBuilder.java +++ b/libraries/mogo-map-api/src/main/java/com/mogo/map/IMogoMapApiBuilder.java @@ -4,8 +4,6 @@ import android.content.Context; import com.alibaba.android.arouter.facade.template.IProvider; import com.mogo.map.location.IMogoLocationClient; -import com.mogo.map.navi.IMogoAimless; -import com.mogo.map.navi.IMogoNavi; import com.mogo.map.search.geo.IMogoGeoSearch; import com.mogo.map.search.poisearch.IMogoPoiSearch; import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery; @@ -27,17 +25,12 @@ interface IMogoMapApiBuilder extends IProvider { IMogoMapUIController getMapUIController(); - IMogoNavi getNavi( Context context ); - IMogoPoiSearch getPoiSearchClient( Context context, MogoPoiSearchQuery query ); - IMogoAimless getAimless( Context context ); - void destroy(); IMogoMapView getMapView( Context context ); IMogoTrafficSearch getTrafficSearch(); - int getResIdByIconType( Context context, int iconType ); } diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/IMogoMapViewCreator.java b/libraries/mogo-map-api/src/main/java/com/mogo/map/IMogoMapViewCreator.java deleted file mode 100644 index 58ee2cc06c..0000000000 --- a/libraries/mogo-map-api/src/main/java/com/mogo/map/IMogoMapViewCreator.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.mogo.map; - -import android.content.Context; - -/** - * @author congtaowang - * @since 2019-12-18 - *

- * 地图抽象 - */ -public interface IMogoMapViewCreator { - - IMogoMapView create( Context context); -} diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/IMogoAimless.java b/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/IMogoAimless.java deleted file mode 100644 index ede5226af8..0000000000 --- a/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/IMogoAimless.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.mogo.map.navi; - -/** - * @author donghongyu - * @since 2020-11-05 - *

- * 巡航操作 - */ -public interface IMogoAimless { - - /** - * 打开巡航模式 - */ - void startAimlessMode(); - - /** - * 关闭巡航模式 - */ - void stopAimlessMode(); - - /** - * 设置巡航模式状态 - * - * @param open - */ - void setAimlessModeStatus(boolean open); - -} diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/IMogoNavi.java b/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/IMogoNavi.java deleted file mode 100644 index 7d99de5385..0000000000 --- a/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/IMogoNavi.java +++ /dev/null @@ -1,180 +0,0 @@ -package com.mogo.map.navi; - -import android.graphics.Rect; -import android.location.Location; - -import com.mogo.eagle.core.data.map.MogoLatLng; - -import java.util.List; - -/** - * @author congtaowang - * @since 2019-12-25 - *

- * 导航操作 - */ -public interface IMogoNavi extends IMogoCarLocationChangedListenerRegister, IMogoOperationListenerRegister{ - - /** - * 开启路径规划并导航 - * - * @param endPoint 目的地 - */ - void naviTo( MogoLatLng endPoint ); - - /** - * 开启路径规划并导航 - * - * @param endPoint 目的地 - * @param config 规划路线策略 - */ - void naviTo( MogoLatLng endPoint, MogoNaviConfig config ); - - /** - * 开启路径规划并导航 - * - * @param endPoint 导航目的地 - * @param wayPoints 途经点 - */ - void naviTo( MogoLatLng endPoint, List< MogoLatLng > wayPoints ); - - /** - * 开启路径规划并导航 - * - * @param endPoint 导航目的地 - * @param wayPoints 途经点 - * @param config 规划路线策略 - */ - void naviTo( MogoLatLng endPoint, List< MogoLatLng > wayPoints, MogoNaviConfig config ); - - /** - * 重新算路 - * - * @param config 规划路线策略 - */ - void reCalculateRoute( MogoNaviConfig config ); - - /** - * 退出导航 - */ - void stopNavi(); - - /** - * 开始导航 - * - * @param isRealNavi true - 实时导航 false - 模拟导航 - */ - void startNavi( boolean isRealNavi ); - - /** - * 是否正在导航 - * - * @return - */ - boolean isNaviing(); - - /** - * 获取路线规划策略 - * - * @return 规划的路线 - */ - List< MogoCalculatePath > getCalculatedStrategies(); - - - /** - * 获取路线坐标点 - * - * @return 规划的路线上所有的坐标点 - */ - List< MogoLatLng > getCalculatedPathPos(); - - - /** - * 获取列表Item点击回调 - * - * @return - */ - OnCalculatePathItemClickInteraction getItemClickInteraction(); - - /** - * 清除规划的路线 - */ - void clearCalculatePaths(); - - /** - * 设置显示规划路线的范围 - * - * @param bounds 范围 - */ - void setCalculatePathDisplayBounds( Rect bounds ); - - /** - * 导航配置 - * - * @return - */ - MogoNaviConfig getNaviConfig(); - - /** - * 设置播报模式 - * - * @param mode - * @return - */ - boolean setBroadcastMode( int mode ); - - /** - * 获取导航沿途路线的点 - * - * @return - */ - List< MogoLatLng > getNaviPathCoordinates(); - - /** - * 获取车标经纬度 - * - * @return - */ - MogoLatLng getCarLocation(); - - /** - * 获取车标经纬度 - * - * @return - */ - Location getCarLocation2(); - - /** - * 打开巡航模式 - */ - void startAimlessMode(); - - /** - * 关闭巡航模式 - */ - void stopAimlessMode(); - - /** - * 设置巡航模式状态 - * - * @param open - */ - void setAimlessModeStatus( boolean open ); - - /** - * 查看全程 - */ - void displayOverview( Rect bounds ); - - /** - * 设置使用外部定位源 - * - * @param use true - 使用,false - 不适用 - */ - void setUseExtraGPSData( boolean use ); - - /** - * 设置外部数据源 - */ - void setExtraGPSData( double lon, double lat, float speed, float accuracy, float bearing, long timestamp ); -} diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/IMogoOperationListenerRegister.java b/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/IMogoOperationListenerRegister.java deleted file mode 100644 index 4d9b47eae7..0000000000 --- a/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/IMogoOperationListenerRegister.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.mogo.map.navi; - -public -/** - * @author congtaowang - * @since 2020/10/23 - * - * 描述 - */ -interface IMogoOperationListenerRegister { - - /** - * 设置线条点击回调 - */ - void setLineClickInteraction( OnCalculatePathItemClickInteraction itemClickInteraction ); - -} diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/MogoCalculatePath.java b/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/MogoCalculatePath.java deleted file mode 100644 index 28a7cb29c5..0000000000 --- a/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/MogoCalculatePath.java +++ /dev/null @@ -1,148 +0,0 @@ -package com.mogo.map.navi; - -import android.text.TextUtils; -import com.mogo.eagle.core.data.map.MogoLatLng; -import java.util.List; - -/** - * @author congtaowang - * @since 2020-01-08 - *

- * 规划路线信息 - */ -public class MogoCalculatePath { - - /** - * 策略名称 - */ - private String mStrategyName; - - /** - * 时间 - */ - private String mFormattedTime; - private int mTime; - - /** - * 距离 - */ - private String mFormattedDistance; - private int mDistance; - - /** - * 红绿灯个数 - */ - private int mTrafficLights; - - /** - * 路线ID,用于选择那一条线 - */ - private String mTagId; - - /** - * 规划的线路ID - */ - private int mPathId; - - - private List coordList; - - public List getCoordList() { - return coordList; - } - - public void setCoordList(List coordList) { - this.coordList = coordList; - } - - public MogoCalculatePath() { - } - - public String getStrategyName() { - if (!TextUtils.isEmpty(mStrategyName)&&mStrategyName.contains(",")) { - String[] split = mStrategyName.split(","); - return split[0]; - } - - return mStrategyName; - } - - public void setStrategyName( String mStrategyName ) { - this.mStrategyName = mStrategyName; - } - - public String getFormattedTime() { - return mFormattedTime; - } - - public void setFormattedTime( String mTime ) { - this.mFormattedTime = mTime; - } - - public String getFormattedDistance() { - return mFormattedDistance; - } - - public void setFormattedDistance( String mDistance ) { - this.mFormattedDistance = mDistance; - } - - public int getTrafficLights() { - return mTrafficLights; - } - - public void setTrafficLights( int mTrafficLights ) { - this.mTrafficLights = mTrafficLights; - } - - - private StringBuilder mDescBuilder = null; - - public String getDesc() { - if ( mDescBuilder == null ) { - mDescBuilder = new StringBuilder(); - int lightsSize = getTrafficLights(); - if ( lightsSize > 0 ) { - mDescBuilder.append( "红绿灯" ).append( lightsSize ).append( "个" ); - } - //mDescBuilder.append( " " ); - //mDescBuilder.append( "收费" ).append( mPath.getTollCost() ).append( "元" ); - } - - return mDescBuilder.toString(); - } - - public String getTagId() { - return mTagId; - } - - public void setTagId( String mTagId ) { - this.mTagId = mTagId; - } - - public int getPathId() { - return mPathId; - } - - public void setPathId( int mPathId ) { - this.mPathId = mPathId; - } - - public int getTime() { - return mTime; - } - - public MogoCalculatePath setTime( int time ) { - this.mTime = time; - return this; - } - - public int getDistance() { - return mDistance; - } - - public MogoCalculatePath setDistance( int distance ) { - this.mDistance = distance; - return this; - } -} diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/MogoNaviConfig.java b/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/MogoNaviConfig.java deleted file mode 100644 index a27c120c24..0000000000 --- a/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/MogoNaviConfig.java +++ /dev/null @@ -1,105 +0,0 @@ -package com.mogo.map.navi; - -/** - * @author congtaowang - * @since 2019-12-25 - *

- * 导航参数 - */ -public class MogoNaviConfig { - - /** - * 是否躲避拥堵 - */ - private boolean congestion = false; - - /** - * 不走高速 - */ - private boolean avoidSpeed = false; - - /** - * 避免收费 - */ - private boolean cost = false; - - /** - * 高速优先 - */ - private boolean highSpeed = false; - - /** - * 是否多路线算路 - */ - private boolean multipleRoute = true; - - /** - * 是否躲避拥堵 - */ - public MogoNaviConfig congestion( boolean congestion ) { - this.congestion = congestion; - return this; - } - - /** - * 不走高速 - */ - public MogoNaviConfig avoidSpeed( boolean avoidSpeed ) { - this.avoidSpeed = avoidSpeed; - if (avoidSpeed) { - this.highSpeed = false; - } - return this; - } - - /** - * 避免收费 - */ - public MogoNaviConfig cost( boolean cost ) { - this.cost = cost; - if (cost) { - this.highSpeed = false; - } - return this; - } - - /** - * 高速优先 - */ - public MogoNaviConfig highSpeed( boolean highSpeed ) { - this.highSpeed = highSpeed; - if (highSpeed) { - this.avoidSpeed = false; - this.cost = false; - } - return this; - } - - /** - * 是否多路线算路 - */ - public MogoNaviConfig multipleRoute( boolean multipleRoute ) { - this.multipleRoute = multipleRoute; - return this; - } - - public boolean isCongestion() { - return congestion; - } - - public boolean isAvoidSpeed() { - return avoidSpeed; - } - - public boolean isCost() { - return cost; - } - - public boolean isHighSpeed() { - return highSpeed; - } - - public boolean isMultipleRoute() { - return multipleRoute; - } -} diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/MogoOperationListenerRegister.java b/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/MogoOperationListenerRegister.java deleted file mode 100644 index ec4cf7a1b8..0000000000 --- a/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/MogoOperationListenerRegister.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.mogo.map.navi; - -public -/** - * @author congtaowang - * @since 2020/10/23 - * - * 描述 - */ -class MogoOperationListenerRegister implements IMogoOperationListenerRegister { - - private static volatile MogoOperationListenerRegister sInstance; - private OnCalculatePathItemClickInteraction itemClickInteraction; - - private MogoOperationListenerRegister(){} - - public static MogoOperationListenerRegister getInstance(){ - if( sInstance == null ){ - synchronized( MogoOperationListenerRegister.class ) { - if( sInstance == null ){ - sInstance = new MogoOperationListenerRegister(); - } - } - } - return sInstance; - } - - public synchronized void release(){ - sInstance = null; - } - - private Object readResolve() { - // 阻止反序列化,必须实现 Serializable 接口 - return sInstance; - } - - /** - * 设置线条点击回调 - */ - public void setLineClickInteraction( OnCalculatePathItemClickInteraction itemClickInteraction ) { - this.itemClickInteraction = itemClickInteraction; - } - - public OnCalculatePathItemClickInteraction getItemClickInteraction() { - return itemClickInteraction; - } -} diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/OnCalculatePathItemClickInteraction.java b/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/OnCalculatePathItemClickInteraction.java deleted file mode 100644 index 44ba15b4a0..0000000000 --- a/libraries/mogo-map-api/src/main/java/com/mogo/map/navi/OnCalculatePathItemClickInteraction.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.mogo.map.navi; - -/** - * 规划路线交互接口 - */ -public interface OnCalculatePathItemClickInteraction { - - /** - * 点击:列表点击、线路点击 - * - * @param tagId 线条ID - */ - void onItemClicked( String tagId ); -} \ No newline at end of file diff --git a/libraries/mogo-map/build.gradle b/libraries/mogo-map/build.gradle index 5d155f536e..bf618818ac 100644 --- a/libraries/mogo-map/build.gradle +++ b/libraries/mogo-map/build.gradle @@ -45,7 +45,6 @@ dependencies { if (Boolean.valueOf(USE_MAVEN_PACKAGE)) { implementation rootProject.ext.dependencies.mogo_core_utils implementation rootProject.ext.dependencies.mogomapapi - api rootProject.ext.dependencies.mapautomap implementation rootProject.ext.dependencies.mogocommons implementation rootProject.ext.dependencies.mogo_core_data @@ -53,7 +52,6 @@ dependencies { } else { implementation project(':core:mogo-core-utils') implementation project(':libraries:mogo-map-api') - api project(':libraries:map-autonavi') implementation project(':foudations:mogo-commons') implementation project(':core:mogo-core-data') diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/MogoAimless.java b/libraries/mogo-map/src/main/java/com/mogo/map/MogoAimless.java deleted file mode 100644 index f4acdd881e..0000000000 --- a/libraries/mogo-map/src/main/java/com/mogo/map/MogoAimless.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.mogo.map; - -import android.content.Context; - -import com.mogo.map.navi.IMogoAimless; - -/** - * @author donghongyu - * @since 2020-11-05 - *

- * 巡航代理 - */ -public class MogoAimless implements IMogoAimless { - - private IMogoAimless mDelegate; - - private static volatile MogoAimless sInstance; - - private MogoAimless( Context context ) { - mDelegate = MogoMapDelegateFactory.getAimless( context ); - } - - public static MogoAimless getInstance( Context context ) { - if ( sInstance == null ) { - synchronized ( MogoAimless.class ) { - if ( sInstance == null ) { - sInstance = new MogoAimless( context ); - } - } - } - return sInstance; - } - - public synchronized void release() { - sInstance = null; - } - - @Override - public void startAimlessMode() { - if ( mDelegate != null ) { - mDelegate.startAimlessMode(); - } - } - - @Override - public void stopAimlessMode() { - if ( mDelegate != null ) { - mDelegate.stopAimlessMode(); - } - } - - @Override - public void setAimlessModeStatus( boolean open ) { - if ( mDelegate != null ) { - mDelegate.setAimlessModeStatus( open ); - } - } -} diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/MogoMapDelegateFactory.java b/libraries/mogo-map/src/main/java/com/mogo/map/MogoMapDelegateFactory.java index e1b300c0c0..3ae9439ea1 100644 --- a/libraries/mogo-map/src/main/java/com/mogo/map/MogoMapDelegateFactory.java +++ b/libraries/mogo-map/src/main/java/com/mogo/map/MogoMapDelegateFactory.java @@ -3,12 +3,7 @@ package com.mogo.map; import android.content.Context; import com.alibaba.android.arouter.launcher.ARouter; -import com.mogo.commons.debug.DebugConfig; -import com.mogo.eagle.core.utilcode.util.AppUtils; -import com.mogo.map.impl.automap.navi.AutoNaviClient; import com.mogo.map.location.IMogoLocationClient; -import com.mogo.map.navi.IMogoAimless; -import com.mogo.map.navi.IMogoNavi; import com.mogo.map.search.geo.IMogoGeoSearch; import com.mogo.map.search.poisearch.IMogoPoiSearch; import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery; @@ -51,24 +46,10 @@ class MogoMapDelegateFactory { return getApiBuilder().getMapUIController(); } - public static IMogoNavi getNaviDelegate(Context context) { - - if (DebugConfig.isUseCustomNavi()) { - return getApiBuilder().getNavi(context); - } else if (AppUtils.isAppInstalled(context, "com.autonavi.amapauto")) { - return AutoNaviClient.getInstance(context); - } - return getApiBuilder().getNavi(context); - } - public static IMogoPoiSearch getPoiSearchClientDelegate(Context context, MogoPoiSearchQuery query) { return getApiBuilder().getPoiSearchClient(context, query); } - public static IMogoAimless getAimless(Context context) { - return getApiBuilder().getAimless(context); - } - public static void destroy() { getApiBuilder().destroy(); } diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/MogoNavi.java b/libraries/mogo-map/src/main/java/com/mogo/map/MogoNavi.java deleted file mode 100644 index c536bf40ae..0000000000 --- a/libraries/mogo-map/src/main/java/com/mogo/map/MogoNavi.java +++ /dev/null @@ -1,235 +0,0 @@ -package com.mogo.map; - -import android.content.Context; -import android.graphics.Rect; -import android.location.Location; - -import com.mogo.eagle.core.data.map.MogoLatLng; -import com.mogo.map.navi.IMogoCarLocationChangedListener2; -import com.mogo.map.navi.IMogoNavi; -import com.mogo.map.navi.MogoCalculatePath; -import com.mogo.map.navi.MogoCarLocationChangedListenerRegister; -import com.mogo.map.navi.MogoNaviConfig; -import com.mogo.map.navi.MogoOperationListenerRegister; -import com.mogo.map.navi.OnCalculatePathItemClickInteraction; - -import java.util.List; - -/** - * @author congtaowang - * @since 2019-12-25 - *

- * 导航代理 - */ -public class MogoNavi implements IMogoNavi { - - private IMogoNavi mDelegate; - - private static volatile MogoNavi sInstance; - - private MogoNavi( Context context ) { - mDelegate = MogoMapDelegateFactory.getNaviDelegate( context ); - } - - public static MogoNavi getInstance( Context context ) { - if ( sInstance == null ) { - synchronized ( MogoNavi.class ) { - if ( sInstance == null ) { - sInstance = new MogoNavi( context ); - } - } - } - return sInstance; - } - - public synchronized void release() { - sInstance = null; - } - - @Override - public void naviTo( MogoLatLng endPoint ) { - if ( mDelegate != null ) { - mDelegate.naviTo( endPoint ); - } - } - - @Override - public void naviTo( MogoLatLng endPoint, MogoNaviConfig config ) { - if ( mDelegate != null ) { - mDelegate.naviTo( endPoint, config ); - } - } - - @Override - public void naviTo( MogoLatLng endPoint, List< MogoLatLng > wayPoints ) { - if ( mDelegate != null ) { - mDelegate.naviTo( endPoint, wayPoints ); - } - } - - @Override - public void naviTo( MogoLatLng endPoint, List< MogoLatLng > wayPoints, MogoNaviConfig config ) { - if ( mDelegate != null ) { - mDelegate.naviTo( endPoint, wayPoints, config ); - } - } - - @Override - public void reCalculateRoute( MogoNaviConfig config ) { - if ( mDelegate != null ) { - mDelegate.reCalculateRoute( config ); - } - } - - @Override - public void stopNavi() { - if ( mDelegate != null ) { - mDelegate.stopNavi(); - } - } - - @Override - public void startNavi( boolean isRealNavi ) { - if ( mDelegate != null ) { - mDelegate.startNavi( isRealNavi ); - } - } - - @Override - public boolean isNaviing() { - if ( mDelegate != null ) { - return mDelegate.isNaviing(); - } - return false; - } - - @Override - public List< MogoCalculatePath > getCalculatedStrategies() { - if ( mDelegate != null ) { - return mDelegate.getCalculatedStrategies(); - } - return null; - } - - @Override - public List< MogoLatLng > getCalculatedPathPos() { - if ( mDelegate != null ) { - return mDelegate.getCalculatedPathPos(); - } - return null; - } - - @Override - public OnCalculatePathItemClickInteraction getItemClickInteraction() { - if ( mDelegate != null ) { - return mDelegate.getItemClickInteraction(); - } - return null; - } - - @Override - public void setLineClickInteraction( OnCalculatePathItemClickInteraction itemClickInteraction ) { - MogoOperationListenerRegister.getInstance().setLineClickInteraction( itemClickInteraction ); - } - - @Override - public void clearCalculatePaths() { - if ( mDelegate != null ) { - mDelegate.clearCalculatePaths(); - } - } - - @Override - public void setCalculatePathDisplayBounds( Rect bounds ) { - if ( mDelegate != null ) { - mDelegate.setCalculatePathDisplayBounds( bounds ); - } - } - - @Override - public MogoNaviConfig getNaviConfig() { - if ( mDelegate != null ) { - return mDelegate.getNaviConfig(); - } - return null; - } - - @Override - public boolean setBroadcastMode( int mode ) { - if ( mDelegate != null ) { - return mDelegate.setBroadcastMode( mode ); - } - return false; - } - - @Override - public List< MogoLatLng > getNaviPathCoordinates() { - if ( mDelegate != null ) { - return mDelegate.getNaviPathCoordinates(); - } - return null; - } - - @Override - public MogoLatLng getCarLocation() { - if ( mDelegate != null ) { - return mDelegate.getCarLocation(); - } - return null; - } - - @Override - public Location getCarLocation2() { - if ( mDelegate != null ) { - return mDelegate.getCarLocation2(); - } - return null; - } - - @Override - public void registerCarLocationChangedListener( IMogoCarLocationChangedListener2 listener ) { - MogoCarLocationChangedListenerRegister.getInstance().registerCarLocationChangedListener( listener ); - } - - @Override - public void startAimlessMode() { - if ( mDelegate != null ) { - mDelegate.startAimlessMode(); - } - } - - @Override - public void stopAimlessMode() { - if ( mDelegate != null ) { - mDelegate.stopAimlessMode(); - } - } - - @Override - public void setAimlessModeStatus( boolean open ) { - if ( mDelegate != null ) { - mDelegate.setAimlessModeStatus( open ); - } - } - - @Override - public void displayOverview( Rect bounds ) { - if ( mDelegate != null ) { - mDelegate.displayOverview( bounds ); - } - } - - @Override - public void setUseExtraGPSData( boolean use ) { - if ( mDelegate != null ) { - mDelegate.setUseExtraGPSData( use ); - } - } - - @Override - public void setExtraGPSData( double lon, double lat, float speed, float accuracy, float bearing, long timestamp ) { - if ( mDelegate != null ) { - mDelegate.setExtraGPSData( lon, lat, speed, accuracy, bearing, timestamp ); - } - } -} diff --git a/modules.txt b/modules.txt index 14264bb9ed..fa9cc1d69e 100644 --- a/modules.txt +++ b/modules.txt @@ -14,7 +14,6 @@ :foudations:mogo-commons :tts:tts-di :tts:tts-noop -:libraries:map-autonavi :libraries:map-custom :libraries:mogo-map :libraries:mogo-adas @@ -32,13 +31,9 @@ :modules:mogo-module-service :core:function-impl:mogo-core-function-check :services:mogo-service -:modules:mogo-module-map :core:function-impl:mogo-core-function-smp -:modules:mogo-module-share :modules:mogo-module-extensions :modules:mogo-module-main -:modules:mogo-module-push-base -:modules:mogo-module-push :core:function-impl:mogo-core-function-autopilot :core:function-impl:mogo-core-function-hmi :core:function-impl:mogo-core-function-map diff --git a/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/AdasConstant.java b/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/AdasConstant.java index 63ac15833d..0f8a2d49d3 100644 --- a/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/AdasConstant.java +++ b/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/AdasConstant.java @@ -1,29 +1,8 @@ package com.mogo.module.adas; -import com.mogo.commons.debug.DebugConfig; - /** * Created by XuYong on 2021/5/28 15:24 */ public class AdasConstant { - public static final String MODULE_TAG = "AdasConstant"; - - public static final String HOST_DEV = "http://dzt-test.zhidaohulian.com"; - public static final String HOST_TEST = "http://dzt-test.zhidaohulian.com"; - public static final String HOST_DEMO = "http://dzt-show.zhidaohulian.com"; - public static final String HOST_PRODUCT = "https://dzt.zhidaohulian.com"; - - public static String getBaseUrl() { - switch (DebugConfig.getNetMode()) { - case DebugConfig.NET_MODE_DEV: - return HOST_DEV; - case DebugConfig.NET_MODE_QA: - return HOST_TEST; - case DebugConfig.NET_MODE_DEMO: - return HOST_DEMO; - default: - return HOST_PRODUCT; - } - } } diff --git a/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/AdasEventManager.java b/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/AdasEventManager.java index 9f42fd98e2..e14af8f05f 100644 --- a/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/AdasEventManager.java +++ b/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/AdasEventManager.java @@ -5,6 +5,7 @@ import androidx.annotation.Nullable; import com.google.gson.Gson; import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo; +import com.mogo.eagle.core.data.autopilot.AutoPilotRecordResult; import com.mogo.eagle.core.data.autopilot.AutopilotCarStateInfo; import com.mogo.eagle.core.data.autopilot.AutopilotGuardianStatusInfo; import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo; @@ -281,4 +282,14 @@ public class AdasEventManager implements } } + @Override + public void onAutopilotRecordResult(AutoPilotRecordResult result) { + if (result != null) { + for (IAdasDataListener listener : iAdasEventListeners) { + if (listener != null) { + listener.onAutopilotRecordResult(result); + } + } + } + } } diff --git a/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/IAdasDataListener.java b/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/IAdasDataListener.java index 4b3e5ed67f..b2867aebe8 100644 --- a/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/IAdasDataListener.java +++ b/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/IAdasDataListener.java @@ -1,6 +1,7 @@ package com.mogo.module.adas; import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo; +import com.mogo.eagle.core.data.autopilot.AutoPilotRecordResult; import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo; import com.mogo.eagle.core.data.autopilot.AutopilotStationInfo; import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; @@ -62,4 +63,10 @@ public interface IAdasDataListener { } + /** + * 采集任务结果回调 + * @param record 结果数据 + */ + default void onAutopilotRecordResult(AutoPilotRecordResult record) {} + } diff --git a/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/OnAdasListenerAdapter.java b/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/OnAdasListenerAdapter.java index 98f67a6b5c..f3cc8039b2 100644 --- a/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/OnAdasListenerAdapter.java +++ b/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/OnAdasListenerAdapter.java @@ -3,6 +3,7 @@ package com.mogo.module.adas; import android.util.Log; import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo; +import com.mogo.eagle.core.data.autopilot.AutoPilotRecordResult; import com.mogo.eagle.core.data.autopilot.AutopilotCarStateInfo; import com.mogo.eagle.core.data.autopilot.AutopilotGuardianStatusInfo; import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo; @@ -24,12 +25,12 @@ import com.zhidao.support.adas.high.bean.AutopilotStatus; import com.zhidao.support.adas.high.bean.AutopilotWayArrive; import com.zhidao.support.adas.high.bean.CarLaneInfo; import com.zhidao.support.adas.high.bean.CarStateInfo; -import com.zhidao.support.adas.high.bean.IPCPowerResultInfo; -import com.zhidao.support.adas.high.bean.IPCUpgradePatchDownloadStatusInfo; +import com.zhidao.support.adas.high.bean.IPCUpgradeInfo; import com.zhidao.support.adas.high.bean.IPCUpgradeStateInfo; import com.zhidao.support.adas.high.bean.LightStatueInfo; import com.zhidao.support.adas.high.bean.ObstaclesInfo; import com.zhidao.support.adas.high.bean.RectInfo; +import com.zhidao.support.adas.high.bean.SSHResult; import com.zhidao.support.adas.high.bean.TrajectoryInfo; import com.zhidao.support.adas.high.bean.WarnMessageInfo; import com.zhidao.support.adas.high.bean.guardian.AutopilotGuardianInfo; @@ -60,65 +61,71 @@ public class OnAdasListenerAdapter implements OnAdasListener { @Override public void onCarStateData(CarStateInfo carStateInfo) { + if (HdMapBuildConfig.isMapLoaded) { // Logger.d(TAG, "--------carStateInfo.toString() = " + carStateInfo.toString()); - //can数据转发 - CarStateInfo.ValuesBean bean = carStateInfo.getValues(); + //can数据转发 + CarStateInfo.ValuesBean bean = carStateInfo.getValues(); // Log.w("DHY-location", bean.getLon() + "," + bean.getLat() + " OnAdasListenerAdapter-onCarStateData:"); - if (bean != null) { - int turnLight = bean.getTurn_light(); //转向灯状态 0是正常 1是左转 2是右转 - AmiClientManager.getInstance().setTurnLightState(turnLight); - int brakeLight = bean.getBrake_light(); //TODO - //Logger.d(TAG, "onCarStateData ---- turnLight = " + turnLight + "---brakeLight = " + brakeLight); + if (bean != null) { + int turnLight = bean.getTurn_light(); //转向灯状态 0是正常 1是左转 2是右转 + AmiClientManager.getInstance().setTurnLightState(turnLight); + int brakeLight = bean.getBrake_light(); //TODO +// Logger.d(TAG, "onCarStateData ---- turnLight = " + turnLight + "---brakeLight = " + brakeLight); - //设置转向灯 - CallerHmiManager.INSTANCE.showTurnLight(turnLight); + //设置转向灯 + CallerHmiManager.INSTANCE.showTurnLight(turnLight); - //设置刹车信息 - CallerHmiManager.INSTANCE.showBrakeLight(brakeLight); - } else { - Logger.e(TAG, "bean == null "); + //设置刹车信息 + CallerHmiManager.INSTANCE.showBrakeLight(brakeLight); + } else { + Logger.e(TAG, "bean == null "); + } + + AutopilotCarStateInfo autopilotCarStateInfo = AdasObjectUtils.INSTANCE.fromAdasCarStateInfoObject(carStateInfo); + CallerAutopilotCarStatusListenerManager.INSTANCE.invokeAutopilotCarStateData(autopilotCarStateInfo); } - - AutopilotCarStateInfo autopilotCarStateInfo = AdasObjectUtils.INSTANCE.fromAdasCarStateInfoObject(carStateInfo); - CallerAutopilotCarStatusListenerManager.INSTANCE.invokeAutopilotCarStateData(autopilotCarStateInfo); } @Override public void autopilotStatus(AutopilotStatus autopilotStatus) { - AutopilotStatus.ValuesBean autopilotStatusValues = autopilotStatus.getValues(); + if (HdMapBuildConfig.isMapLoaded) { + AutopilotStatus.ValuesBean autopilotStatusValues = autopilotStatus.getValues(); - if (autopilotStatusValues != null) { - // 初始化自动驾驶状态信息 - AutopilotStatusInfo autopilotStatusInfo = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo(); - autopilotStatusInfo.setState(autopilotStatusValues.getState()); - autopilotStatusInfo.setPilotmode(autopilotStatusValues.getPilotmode()); - autopilotStatusInfo.setControl_pilotmode(autopilotStatusValues.getControl_pilotmode()); - autopilotStatusInfo.setReason(autopilotStatusValues.getReason()); - autopilotStatusInfo.setCamera(autopilotStatusValues.getCamera()); - autopilotStatusInfo.setRtk(autopilotStatusValues.getRtk()); - autopilotStatusInfo.setRadar(autopilotStatusValues.getRadar()); - autopilotStatusInfo.setSpeed(autopilotStatusValues.getSpeed()); - // 初始化自动驾驶状态信息 - autopilotStatusInfo.setVersion(AdasManager.getInstance().getAdasConfig().getVersion()); - autopilotStatusInfo.setConnectIP(AdasManager.getInstance().getAdasConfig().getAddress()); - autopilotStatusInfo.setDockVersion(AdasManager.getInstance().getAdasConfig().getDockVersion()); + if (autopilotStatusValues != null) { + // 初始化自动驾驶状态信息 + AutopilotStatusInfo autopilotStatusInfo = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo(); + autopilotStatusInfo.setState(autopilotStatusValues.getState()); + autopilotStatusInfo.setPilotmode(autopilotStatusValues.getPilotmode()); + autopilotStatusInfo.setControl_pilotmode(autopilotStatusValues.getControl_pilotmode()); + autopilotStatusInfo.setReason(autopilotStatusValues.getReason()); + autopilotStatusInfo.setCamera(autopilotStatusValues.getCamera()); + autopilotStatusInfo.setRtk(autopilotStatusValues.getRtk()); + autopilotStatusInfo.setRadar(autopilotStatusValues.getRadar()); + autopilotStatusInfo.setSpeed(autopilotStatusValues.getSpeed()); + // 初始化自动驾驶状态信息 + autopilotStatusInfo.setVersion(AdasManager.getInstance().getAdasConfig().getVersion()); + autopilotStatusInfo.setConnectIP(AdasManager.getInstance().getAdasConfig().getAddress()); + autopilotStatusInfo.setDockVersion(AdasManager.getInstance().getAdasConfig().getDockVersion()); - CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutoPilotStatus(); + CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutoPilotStatus(); + } } } @Override public void autopilotArrive(AutopilotWayArrive autopilotWayArrive) { - Logger.d(TAG, "autopilotArrive : " + autopilotWayArrive); - if (autopilotWayArrive != null) { - AutopilotWayArrive.ResultBean result = autopilotWayArrive.getResult(); - if (result != null) { - AutopilotWayArrive.ResultBean.EndLatLonBean endLatLon = result.getEndLatLon(); - if (endLatLon != null) { - AutopilotStationInfo stationInfo = new AutopilotStationInfo(result.getCarType(), endLatLon.getLon(), endLatLon.getLat()); + if (HdMapBuildConfig.isMapLoaded) { + Logger.d(TAG, "autopilotArrive : " + autopilotWayArrive); + if (autopilotWayArrive != null) { + AutopilotWayArrive.ResultBean result = autopilotWayArrive.getResult(); + if (result != null) { + AutopilotWayArrive.ResultBean.EndLatLonBean endLatLon = result.getEndLatLon(); + if (endLatLon != null) { + AutopilotStationInfo stationInfo = new AutopilotStationInfo(result.getCarType(), endLatLon.getLon(), endLatLon.getLat()); - CallerAutoPilotStatusListenerManager.INSTANCE.invokeArriveAtStation(stationInfo); + CallerAutoPilotStatusListenerManager.INSTANCE.invokeArriveAtStation(stationInfo); + } } } } @@ -126,32 +133,36 @@ public class OnAdasListenerAdapter implements OnAdasListener { @Override public void onAutopilotRoute(AutopilotRoute route) { - Logger.d(TAG, "onAutopilotRoute : " + route.toString()); - AutopilotRouteInfo autopilotRoute = AdasObjectUtils.INSTANCE.fromAdasAutopilotRoute(route); - CallerAutopilotPlanningListenerManager.INSTANCE.invokeAutopilotRotting(autopilotRoute); + if (HdMapBuildConfig.isMapLoaded) { + Logger.d(TAG, "onAutopilotRoute : " + route.toString()); + AutopilotRouteInfo autopilotRoute = AdasObjectUtils.INSTANCE.fromAdasAutopilotRoute(route); + CallerAutopilotPlanningListenerManager.INSTANCE.invokeAutopilotRotting(autopilotRoute); + } } @Override public void onAutopilotTrajectory(List trajectoryList) { - Logger.d(TAG, "onAutopilotTrajectory : " + trajectoryList); - ArrayList trajectoryInfoArrayList = new ArrayList<>(); - if (trajectoryList != null && trajectoryList.size() > 0) { - for (TrajectoryInfo trajectory : trajectoryList) { - ADASTrajectoryInfo adasTrajectoryInfo = new ADASTrajectoryInfo(); - adasTrajectoryInfo.setLat(trajectory.getLat()); - adasTrajectoryInfo.setLon(trajectory.getLon()); - adasTrajectoryInfo.setAcceleration(trajectory.getAcceleration()); - adasTrajectoryInfo.setAccumulatedDis(trajectory.getAccumulatedDis()); - adasTrajectoryInfo.setTime(trajectory.getTime()); - adasTrajectoryInfo.setVelocity(trajectory.getVelocity()); - adasTrajectoryInfo.setAlt(trajectory.getAlt()); - adasTrajectoryInfo.setKappa(trajectory.getKappa()); - adasTrajectoryInfo.setTheta(trajectory.getTheta()); - trajectoryInfoArrayList.add(adasTrajectoryInfo); + if (HdMapBuildConfig.isMapLoaded) { + Logger.d(TAG, "onAutopilotTrajectory : " + trajectoryList); + ArrayList trajectoryInfoArrayList = new ArrayList<>(); + if (trajectoryList != null && trajectoryList.size() > 0) { + for (TrajectoryInfo trajectory : trajectoryList) { + ADASTrajectoryInfo adasTrajectoryInfo = new ADASTrajectoryInfo(); + adasTrajectoryInfo.setLat(trajectory.getLat()); + adasTrajectoryInfo.setLon(trajectory.getLon()); + adasTrajectoryInfo.setAcceleration(trajectory.getAcceleration()); + adasTrajectoryInfo.setAccumulatedDis(trajectory.getAccumulatedDis()); + adasTrajectoryInfo.setTime(trajectory.getTime()); + adasTrajectoryInfo.setVelocity(trajectory.getVelocity()); + adasTrajectoryInfo.setAlt(trajectory.getAlt()); + adasTrajectoryInfo.setKappa(trajectory.getKappa()); + adasTrajectoryInfo.setTheta(trajectory.getTheta()); + trajectoryInfoArrayList.add(adasTrajectoryInfo); + } + Log.e(TAG, "time:" + System.currentTimeMillis() + "trajectoryInfoArrayList:" + trajectoryInfoArrayList); } - Log.e(TAG, "time:" + System.currentTimeMillis() + "trajectoryInfoArrayList:" + trajectoryInfoArrayList); + CallerAutopilotPlanningListenerManager.INSTANCE.invokeAutopilotTrajectory(trajectoryInfoArrayList); } - CallerAutopilotPlanningListenerManager.INSTANCE.invokeAutopilotTrajectory(trajectoryInfoArrayList); } @Override @@ -161,13 +172,28 @@ public class OnAdasListenerAdapter implements OnAdasListener { @Override public void onAutopilotGuardian(AutopilotGuardianInfo guardianInfo) { - AutopilotGuardianStatusInfo autopilotRoute = AdasObjectUtils.INSTANCE.fromAutopilotGuardianInfo(guardianInfo); - CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutopilotGuardian(autopilotRoute); + if (HdMapBuildConfig.isMapLoaded) { + AutopilotGuardianStatusInfo autopilotRoute = AdasObjectUtils.INSTANCE.fromAutopilotGuardianInfo(guardianInfo); + CallerAutoPilotStatusListenerManager.INSTANCE.invokeAutopilotGuardian(autopilotRoute); + } } @Override public void onAutopilotRecord(AutopilotRecordResult result) { - + if (result != null) { + AutoPilotRecordResult real = new AutoPilotRecordResult(); + real.setDiskFree(result.getDiskFree()); + real.setId(result.getId()); + real.setDuration(result.getDuration()); + real.setNote(result.getNote()); + real.setTotal(result.getTotalSize()); + real.setType(result.getType()); + real.setFileName(result.getFilename()); + real.setKey(result.getKey()); + real.setStat(result.getStat()); + real.setTimestamp(result.getTimestamp()); + CallerAutopilotIdentifyListenerManager.INSTANCE.invokeAutopilotRecordResult(real); + } } @@ -198,32 +224,49 @@ public class OnAdasListenerAdapter implements OnAdasListener { } - - /** - * 工控机电源返回 - * @param info 域控制器电源返回结果 - */ - @Override - public void onIPCPowerResultInfo(IPCPowerResultInfo info) { - - } - /** * 工控机升级状态 * @param info 工控机升级状态 */ @Override public void onUpgradeStateInfo(IPCUpgradeStateInfo info) { - +// if(info!=null){ +// Logger.d(TAG,"onUpgradeStateInfo : "+info.getUpgradeStatus()); +// boolean upgradeStatus=false;//工控机升级状态,true代表升级成功 false代表升级失败,默认为false +// if(info.getUpgradeStatus() == IPCUpgradeStateInfo.Status.SUCCESSFUL.code){ +// upgradeStatus=true;//升级成功 +// //升级结束确认 +// AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.upgradeFinishAffirm()); +// }else if(info.getUpgradeStatus() == IPCUpgradeStateInfo.Status.FAILED.code){ +// upgradeStatus=false;//升级失败 +// } +// Logger.d(TAG,"onUpgradeStateInfo : "+(upgradeStatus ? "升级成功" :"升级失败")); +// CallerHmiManager.INSTANCE.showAdUpgradeStatus(upgradeStatus); +// }else{ +// Logger.d(TAG,"onUpgradeStateInfo : upgrade status info is null"); +// } } - /** - * 工控机下载状态 - * @param info 工控机升级包下载进度 - */ +// /** +// * 工控机下载状态 +// * @param info 工控机升级包下载进度 +// */ +// @Override +// public void onUpgradePatchDownloadStatus(IPCUpgradePatchDownloadStatusInfo info) { +// if(info!=null){ +// Logger.d(TAG,"onUpgradePatchDownloadStatus : status="+info.getDownloadStatus() + +// " version="+info.getDownloadVersion()+ " progress="+info.getDownloadProgress()); +// CallerHmiManager.INSTANCE.showAdDownloadStatus(info.getDownloadVersion(),info.getDownloadStatus(),info.getDownloadProgress()); +// }else{ +// Logger.d(TAG,"onUpgradePatchDownloadStatus : download status info is null"); +// } +// +// } + + + @Override - public void onUpgradePatchDownloadStatus(IPCUpgradePatchDownloadStatusInfo info) { + public void onSSHResult(SSHResult info) { } - } diff --git a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/CallingWindowManager.kt b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/CallingWindowManager.kt index faf4c61d68..8e012c576d 100644 --- a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/CallingWindowManager.kt +++ b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/view/CallingWindowManager.kt @@ -536,7 +536,6 @@ class CallingWindowManager private constructor() : IVoiceIntentListener { fun resetStatus() { isLauncherCallingViewShown = false - serviceApi?.entranceButtonController?.removeLeftFeatureView(launcherCallingView) launcherCallingView = null } diff --git a/modules/mogo-module-common/consumer-rules.pro b/modules/mogo-module-common/consumer-rules.pro index e29fdda89f..4b4c8f6b97 100644 --- a/modules/mogo-module-common/consumer-rules.pro +++ b/modules/mogo-module-common/consumer-rules.pro @@ -3,7 +3,6 @@ -keep class com.mogo.module.common.constants.*{*;} -keep class com.mogo.module.common.drawer.marker.*{*;} -keep class com.mogo.module.common.entity.*{*;} --keep class com.mogo.module.common.utils.SPConst{*;} -keep class com.mogo.module.common.view.*{*;} -keep class com.mogo.module.common.widget.*{*;} -keep class com.mogo.module.common.wm.* {*;} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/adapter/MogoMapListenerAdapter.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/adapter/MogoMapListenerAdapter.java deleted file mode 100644 index fb35abcf1f..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/adapter/MogoMapListenerAdapter.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.mogo.module.common.adapter; - -import android.view.MotionEvent; - -import com.mogo.eagle.core.data.map.MogoLatLng; -import com.mogo.map.listener.IMogoMapListener; -import com.mogo.map.model.MogoPoi; -import com.mogo.map.uicontroller.EnumMapUI; -import com.mogo.map.uicontroller.VisualAngleMode; - -/** - * @author congtaowang - * @since 2020-01-10 - *

- * 适配器 - */ -public abstract class MogoMapListenerAdapter implements IMogoMapListener { - - @Override - public void onMapLoaded() { - - } - - @Override - public void onTouch( MotionEvent motionEvent ) { - - } - - @Override - public void onPOIClick( MogoPoi poi ) { - - } - - @Override - public void onMapClick( MogoLatLng latLng ) { - - } - - @Override - public void onLockMap( boolean isLock ) { - - } - - @Override - public void onMapModeChanged( EnumMapUI ui ) { - - } - - @Override - public void onMapVisualAngleChanged(VisualAngleMode visualAngleMode) { - - } - - @Override - public void onMapChanged( MogoLatLng latLng, float zoom, float tilt, float bearing ) { - - } -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/CarModelType.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/CarModelType.java deleted file mode 100644 index 875e875ffd..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/CarModelType.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.mogo.module.common.constants; - -public -/** - * @author congtaowang - * @since 2020/10/29 - * - * 车模型类型 - */ -enum CarModelType { - - Other( "other" ), - OtherLeft( "other_left" ), - OtherRight( "other_right" ), - - OtherLeftReverse( "other_left_reverse" ), - OtherRightReverse( "other_right_reverse" ), - OtherReverse( "other_reverse" ), - - Self( "self" ), - SelfLeft( "self_left" ), - SelfRight( "self_right" ); - - private String res; - - CarModelType( String res ) { - this.res = res; - } - - public String getRes() { - return res; - } -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/SafeType.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/SafeType.java deleted file mode 100644 index 38a0625a2f..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/SafeType.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.mogo.module.common.constants; - -public -/** - * @author congtaowang - * @since 2020/10/29 - * - * 描述 - */ -enum SafeType { - Normal( "normal", "安全" ), - SpeedWarm( "warm", "注意/超速" ), - DistanceWarm( "warm", "注意/保持车距" ), - SpeedDangerous( "dangerous", "危险/严重超速" ), - DistanceDangerous( "dangerous", "危险/距离过近" ); - - private String msg; - private String res; - - SafeType( String res, String msg ) { - this.msg = msg; - this.res = res; - } - - public String getRes() { - return res; - } - - public String getMsg() { - return msg; - } -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/TrafficLightConst.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/TrafficLightConst.java deleted file mode 100644 index f543e4b242..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/TrafficLightConst.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.mogo.module.common.constants; - -/** - * 用于内部标识红绿灯颜色 - * - * @author tongchenfei - */ -public class TrafficLightConst { - public static final int TRAFFIC_LIGHT_COLOR_GRAY = 0; - public static final int TRAFFIC_LIGHT_COLOR_RED = 1; - public static final int TRAFFIC_LIGHT_COLOR_YELLOW = 2; - public static final int TRAFFIC_LIGHT_COLOR_GREEN = 3; - - public static final int TRAFFIC_LIGHT_DIRECTION_TURN_AROUND = 0; - public static final int TRAFFIC_LIGHT_DIRECTION_TURN_LEFT = 1; - public static final int TRAFFIC_LIGHT_DIRECTION_STRAIGHT = 2; - public static final int TRAFFIC_LIGHT_DIRECTION_TURN_RIGHT = 3; -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/VisionMode.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/VisionMode.java deleted file mode 100644 index bb15f594cd..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/VisionMode.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.mogo.module.common.constants; - -public -/** - * @author congtaowang - * @since 2020/10/29 - * - * 描述 - */ -enum VisionMode { - - Machine( "machine" ), - User( "user" ); - - private String res; - - VisionMode( String res ) { - this.res = res; - } - - public String getRes() { - return res; - } -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/BaseDrawer.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/BaseDrawer.java index b60fdd712c..ce3f66ac04 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/BaseDrawer.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/BaseDrawer.java @@ -3,11 +3,7 @@ package com.mogo.module.common.drawer; import static com.mogo.cloud.socket.entity.SocketDownDataHelper.FROM_ADAS; import android.content.Context; -import android.graphics.Color; -import android.graphics.Typeface; import android.text.TextUtils; -import android.view.ViewGroup; -import android.widget.TextView; import com.mogo.commons.AbsMogoApplication; import com.mogo.map.marker.IMogoMarker; @@ -99,11 +95,11 @@ public class BaseDrawer { public int getModelRes(int type) { AdasRecognizedType recognizedType = AdasRecognizedType.valueFrom(type); if (recognizedType == AdasRecognizedType.classIdCar) { - return R.raw.special_vehicle; + return R.raw.traffic_tachexiaoche; } else if (recognizedType == AdasRecognizedType.classIdTrafficBus) { - return R.raw.daba; + return R.raw.traffic_daba; } else if (recognizedType == AdasRecognizedType.classIdMoto) { - return R.raw.motuoche; + return R.raw.traffic_motuoche; } else if (recognizedType == AdasRecognizedType.classIdStopLine) { return R.raw.stopline; } else if (recognizedType == AdasRecognizedType.classIdWarningArrows) { @@ -111,11 +107,11 @@ public class BaseDrawer { } else if (recognizedType == AdasRecognizedType.classIdUnKnow) { return R.raw.special_vehicle; } else if (recognizedType == AdasRecognizedType.classIdBicycle) { - return R.raw.zixingche; + return R.raw.traffic_zixingche; } else if (recognizedType == AdasRecognizedType.classIdTrafficTruck) { - return R.raw.daba; + return R.raw.traffic_daba; } else if (recognizedType == AdasRecognizedType.classIdPerson) { - return R.raw.people; + return R.raw.traffic_people; } return R.raw.special_vehicle; } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/IdentifyDataDrawer.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/IdentifyDataDrawer.java index 23802519bc..e1ead945a1 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/IdentifyDataDrawer.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/IdentifyDataDrawer.java @@ -34,6 +34,11 @@ public class IdentifyDataDrawer { */ private final ConcurrentHashMap mDirtyPositions = new ConcurrentHashMap<>(); + /** + * 过滤后的数据集合 + */ + private final ArrayList mFilterTrafficData = new ArrayList<>(); + private IdentifyDataDrawer() { mContext = AbsMogoApplication.getApp(); addPreVehicleModel(); @@ -73,18 +78,21 @@ public class IdentifyDataDrawer { } // 循环将集合中的数据提取记录 - ArrayList trafficDataUuidList = new ArrayList<>(); - for (TrafficData trafficData : resultList) { - trafficDataUuidList.add(trafficData.getUuid()); - } - - // 找出上一针数据中已经不在本次数据中存在的数据 - for (String uuid : mMarkersCaches.keySet()) { - if (!trafficDataUuidList.contains(uuid)) { - mDirtyPositions.put(uuid, mMarkersCaches.get(uuid)); - } - } - +// ArrayList trafficDataUuidList = new ArrayList<>(); +// for (TrafficData trafficData : resultList) { +// // 过滤掉未知感知数据 +// if (trafficData.getType() == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI) { +// //Logger.w(TAG, "未知感知类型数据,丢弃,不渲染"); +// continue; +// } +// trafficDataUuidList.add(trafficData.getUuid()); +// } +// // 找出上一针数据中已经不在本次数据中存在的数据 +// for (String uuid : mMarkersCaches.keySet()) { +// if (!trafficDataUuidList.contains(uuid)) { +// mDirtyPositions.put(uuid, mMarkersCaches.get(uuid)); +// } +// } // // 移除脏数据 // for (String uuid : mDirtyPositions.keySet()) { // MogoApisHandler.getInstance().getApis() @@ -97,10 +105,28 @@ public class IdentifyDataDrawer { MogoApisHandler.getInstance().getApis() .getMapServiceApi() .getMarkerManager(mContext) - .updateBatchMarkerPosition(resultList); + .updateBatchMarkerPosition(filterTrafficData(resultList)); } + /** + * 数据过滤器 + * + * @return 过滤后的数据集合 + */ + private ArrayList filterTrafficData(ArrayList trafficData) { + mFilterTrafficData.clear(); + for (TrafficData data : trafficData) { + // 过滤掉未知感知数据 + if (data.getType() == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI) { + //Logger.w(TAG, "未知感知类型数据,丢弃,不渲染"); + continue; + } + mFilterTrafficData.add(data); + } + return mFilterTrafficData; + } + /** * 清除旧的 marker 数据 diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/MarkerDrawer.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/MarkerDrawer.java index 7e9f9283e0..677a5d2651 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/MarkerDrawer.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/MarkerDrawer.java @@ -71,7 +71,7 @@ class MarkerDrawer { } /** - * add marker, {@link OnlineCarDrawer 如果是需要在3D模式下显示,则需要设置 {@link MogoMarkerOptions icon3DRes 资源id}} + * add marker, { 如果是需要在3D模式下显示,则需要设置 {@link MogoMarkerOptions icon3DRes 资源id}} * * @param markerShowEntity marker展示数据结构体 * @param matchRoadSide 设置是否道路吸附,暂时没用到这个字段 diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/OnlineCarDrawer.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/OnlineCarDrawer.java deleted file mode 100644 index 5b89af49b1..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/OnlineCarDrawer.java +++ /dev/null @@ -1,202 +0,0 @@ -package com.mogo.module.common.drawer; - -import android.graphics.Rect; - -import com.mogo.commons.AbsMogoApplication; -import com.mogo.eagle.core.data.map.MogoLatLng; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; -import com.mogo.map.marker.IMogoMarker; -import com.mogo.map.marker.IMogoMarkerClickListener; -import com.mogo.module.common.ModuleNames; -import com.mogo.module.common.MogoApisHandler; -import com.mogo.module.common.entity.MarkerCarPois; -import com.mogo.module.common.entity.MarkerLocation; -import com.mogo.module.common.entity.MarkerOnlineCar; -import com.mogo.module.common.entity.MarkerShowEntity; -import com.mogo.service.statusmanager.IMogoStatusChangedListener; -import com.mogo.service.statusmanager.StatusDescriptor; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public -/** - * @author congtaowang - * @since 2020/10/28 - * - * 描述 - */ -class OnlineCarDrawer implements IMogoStatusChangedListener { - - private static final String TAG = "OnlineCarDrawer"; - - // 平滑移动事件间隔(单位:秒) - private static final int SMOOTH_DURATION = 15; - - private static volatile OnlineCarDrawer sInstance; - - private OnlineCarDrawer() { - MogoApisHandler.getInstance().getApis() - .getStatusManagerApi() - .registerStatusChangedListener( TAG, StatusDescriptor.VR_MODE, this ); - } - - public static OnlineCarDrawer getInstance() { - if ( sInstance == null ) { - synchronized ( OnlineCarDrawer.class ) { - if ( sInstance == null ) { - sInstance = new OnlineCarDrawer(); - } - } - } - return sInstance; - } - - public synchronized void release() { - sInstance = null; - } - - public void clearMarkers(){ - MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( AbsMogoApplication.getApp() ).removeMarkers( ModuleNames.CARD_TYPE_USER_DATA ); - } - - /** - * 绘制在线车辆marker - * - * @param onlineCarList - */ - public void drawOnlineCarMarkers( List< MarkerOnlineCar > onlineCarList, - int maxAmount, - boolean clearOld, - boolean showBounds, - Rect bound, - MogoLatLng centerPoint, - IMogoMarkerClickListener listener ) { - // 将数据同步给在线车辆,避免每次 perform 的时候去拉取,造成消耗 - if ( onlineCarList == null || onlineCarList.isEmpty() ) { - clearMarkers(); - return; - } - - if ( clearOld ) { - clearMarkers(); - } - - int size = MarkerDrawer.getInstance().getAppropriateSize( maxAmount, onlineCarList ); - - Map< String, IMogoMarker > existCarMap = MarkerDrawer.getInstance().purgeMarkerData( onlineCarList, ModuleNames.CARD_TYPE_USER_DATA ); - - List< MogoLatLng > carPoints = new ArrayList<>(); - for ( int i = 0; i < size; i++ ) { - MarkerOnlineCar markerOnlineCar = onlineCarList.get( i ); - MarkerLocation markerLocation = markerOnlineCar.getLocation(); - MarkerShowEntity markerShowEntity = new MarkerShowEntity(); - markerShowEntity.setBindObj( markerOnlineCar ); - markerShowEntity.setMarkerLocation( markerLocation ); - markerShowEntity.setMarkerType( markerOnlineCar.getType() ); - - if ( markerOnlineCar.getCarInfo() != null ) { - markerShowEntity.setTextContent( markerOnlineCar.getUserInfo().getUserName() ); - markerShowEntity.setIconUrl( markerOnlineCar.getUserInfo().getUserHead() ); - } - - if ( i <= 5 ) { - carPoints.add( new MogoLatLng( markerLocation.getLat(), markerLocation.getLon() ) ); - } - - String sn = MarkerDrawer.getInstance().getPrimaryKeyFromEntity( markerOnlineCar ); - IMogoMarker mogoMarker = existCarMap.get( sn ); - if ( mogoMarker == null || mogoMarker.isDestroyed() ) { - mogoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl( markerShowEntity, false, MarkerDrawer.MARKER_Z_INDEX_LOW, 0, listener ); - } - if ( mogoMarker != null ) { - mogoMarker.setVisible( true ); - } - startSmooth( mogoMarker, markerOnlineCar, markerLocation ); - } - - if ( showBounds && bound != null ) { - // 将前6个点显示在固定范围内 - MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().showBounds( TAG, centerPoint, carPoints, bound, false ); - } - } - - - // 平滑移动 - private void startSmooth( IMogoMarker iMogoMarker, MarkerOnlineCar markerOnlineCar, - MarkerLocation markerLocation ) { - if ( iMogoMarker == null ) { - return; - } - List< MarkerCarPois > poiList = markerOnlineCar.getPois(); - if ( filterErrorPoint( poiList ) ) { - return; - } - if ( poiList == null || poiList.size() < 2 ) { - return; - } - - List< MogoLatLng > points = new ArrayList<>(); - - double lastLat = 0.0d; - double lastLon = 0.0d; - - for ( int j = 0; j < poiList.size(); j++ ) { - MarkerCarPois poi = poiList.get( j ); - if ( poi == null || poi.getCoordinates() == null && poi.getCoordinates().size() != 2 ) { - continue; - } - try { - double lat = Double.valueOf( poi.getCoordinates().get( 1 ) + "" ); - double lng = Double.valueOf( poi.getCoordinates().get( 0 ) + "" ); - - float distance = MarkerDrawer.calculateLineDistance( lastLon, lastLat, lng, lat ); - lastLon = lng; - lastLat = lat; - if ( distance < 0.2f ) {// 距离过短,认为静止不动 - continue; - } - - points.add( new MogoLatLng( lat, lng ) ); - } catch ( Exception e ) { - } - } - if ( points.size() >= 1 ) { - iMogoMarker.startSmooth( points, SMOOTH_DURATION ); - } else { - Logger.d( TAG, "静止小车,但是有相同的连续坐标" ); - } - } - - /** - * 有可能出现终点到起点跳跃的情况,需要用"500M"约束起点和终点 - * - * @param poiList - */ - private boolean filterErrorPoint( List< MarkerCarPois > poiList ) { - if ( poiList == null || poiList.size() < 2 ) { - return false; - } - MarkerCarPois start = poiList.get( 0 ); - MarkerCarPois end = poiList.get( poiList.size() - 1 ); - - try { - double lat1 = Double.valueOf( start.getCoordinates().get( 1 ) + "" ); - double lng1 = Double.valueOf( start.getCoordinates().get( 0 ) + "" ); - double lat2 = Double.valueOf( end.getCoordinates().get( 1 ) + "" ); - double lng2 = Double.valueOf( end.getCoordinates().get( 0 ) + "" ); - if ( MarkerDrawer.calculateLineDistance( new MogoLatLng( lat1, lng1 ), new MogoLatLng( lat2, lng2 ) ) >= 500 ) { - Logger.d( TAG, "filter point" ); - return true; - } - } catch ( Exception e ) { - } - return false; - } - - @Override - public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) { - clearMarkers(); - } -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/PushRoadConditionDrawer.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/PushRoadConditionDrawer.java deleted file mode 100644 index 644c8bf7bb..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/PushRoadConditionDrawer.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.mogo.module.common.drawer; - -import com.mogo.map.overlay.IMogoPolyline; - -/** - * @author donghongyu - * @since 2020/10/30 - * TODO 推送路况信息绘制,用于演示 - */ -public class PushRoadConditionDrawer { - - private static final String TAG = "PushRoadConditionDrawer"; - private static volatile PushRoadConditionDrawer sInstance; - - private static IMogoPolyline mMogoPolyline; - - private PushRoadConditionDrawer() { - } - - public static PushRoadConditionDrawer getInstance() { - if (sInstance == null) { - synchronized (PushRoadConditionDrawer.class) { - if (sInstance == null) { - sInstance = new PushRoadConditionDrawer(); - } - } - } - return sInstance; - } - - public synchronized void release() { - clearPolyline(); - mMogoPolyline = null; - sInstance = null; - } - - public void clearPolyline() { - if (mMogoPolyline != null) { - mMogoPolyline.remove(); - mMogoPolyline = null; - } - } - -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/V2XWarnDataDrawer.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/V2XWarnDataDrawer.java index 2f128bf4c4..f3693aae58 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/V2XWarnDataDrawer.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/V2XWarnDataDrawer.java @@ -30,7 +30,6 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL private static final String TAG = "V2XWarnDataDrawer"; private static volatile V2XWarnDataDrawer sInstance; - private boolean mChangeCarModeStatus; private V2XWarnDataDrawer() { super(); @@ -59,7 +58,6 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL @Override public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) { Logger.d(TAG, "%s - %s", descriptor, isTrue); - mChangeCarModeStatus = true; } public boolean isVrMode() { @@ -133,26 +131,6 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL marker.setRotateAngle(rotate); } - /* - * 2D资源绘制marker底部的红色圆圈 - * */ - private IMogoMarker drawMarkerWith2Resource(MarkerShowEntity markerShowEntity) { - MogoLatLng mogoLatLng = new MogoLatLng(markerShowEntity.getMarkerLocation().getLat(), markerShowEntity.getMarkerLocation().getLon()); - MogoLatLng newLocation = Trigonometric.getNewLocation(mogoLatLng, 5, 180); - MogoMarkerOptions optionsRipple = new MogoMarkerOptions() - .latitude(newLocation.getLat()) - .longitude(newLocation.getLon()) - .anchor(1.0f, 1.0f) - .setGps(false) - .zIndex(MarkerDrawer.MARKER_Z_INDEX_HIGH); - optionsRipple - .icon(ViewUtils.fromView(new EmptyMarkerView(mContext))); - IMogoMarker marker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(mContext).addMarker(markerShowEntity.getMarkerType(), optionsRipple); - - marker.setInfoWindowAdapter(new SimpleWindow3DAdapter(new MarkerBaseFloor(mContext))); - marker.showInfoWindow(); - return marker; - } /** * 绘制停止线 marker diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/bean/SpeedData.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/bean/SpeedData.java deleted file mode 100644 index 71d1cdfa10..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/bean/SpeedData.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.mogo.module.common.drawer.bean; - -import com.mogo.map.marker.IMogoMarker; - -/** - * 速度显示对象 - */ -public class SpeedData { - - public IMogoMarker marker; - public double speed; - public String uuid; - public int type; - public double heading; - public boolean isVrMode; - - public SpeedData(IMogoMarker marker, double speed, String uuid, int type, double heading, boolean isVrMode) { - this.marker = marker; - this.speed = speed; - this.uuid = uuid; - this.type = type; - this.heading = heading; - this.isVrMode = isVrMode; - } - - public IMogoMarker getMarker() { - return marker; - } - - public void setMarker(IMogoMarker marker) { - this.marker = marker; - } - - public double getSpeed() { - return speed; - } - - public void setSpeed(double speed) { - this.speed = speed; - } - - public String getUuid() { - return uuid; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - } - - public int getType() { - return type; - } - - public void setType(int type) { - this.type = type; - } - - public double getHeading() { - return heading; - } - - public void setHeading(double heading) { - this.heading = heading; - } - - public boolean getIsVrMode() { - return isVrMode; - } - - public void setIsVrMode(boolean isVrMode) { - this.isVrMode = isVrMode; - } -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/map/CustomNaviInterrupter.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/map/CustomNaviInterrupter.java deleted file mode 100644 index 8676ad542b..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/map/CustomNaviInterrupter.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.mogo.module.common.map; - -import com.mogo.commons.AbsMogoApplication; -import com.mogo.commons.debug.DebugConfig; -import com.mogo.eagle.core.utilcode.util.AppUtils; - -public -/** - * @author congtaowang - * @since 2020/6/5 - *

- * 自定义导航功能拦截器 - */ -class CustomNaviInterrupter implements Interrupter { - - private static final String TAG = "CustomNaviInterrupter"; - - private static volatile CustomNaviInterrupter sInstance; - - private CustomNaviInterrupter() { - } - - public static CustomNaviInterrupter getInstance() { - if ( sInstance == null ) { - synchronized ( CustomNaviInterrupter.class ) { - if ( sInstance == null ) { - sInstance = new CustomNaviInterrupter(); - } - } - } - return sInstance; - } - - public synchronized void release() { - sInstance = null; - } - - /** - * 判断是否用自己的导航 - * 1. 项目是否强制使用自己的导航 - * 2. 是否安装了高德车机版地图 - * 3. 默认使用自己的导航 - * - * @return true-用高德公版车机版地图 false-用Launcher自己的导航 - */ - @Override - public boolean interrupt() { - if ( DebugConfig.isUseCustomNavi() ) { - return false; - } - if ( AppUtils.isAppInstalled( AbsMogoApplication.getApp(), "com.autonavi.amapauto" ) ) { - return true; - } - return false; - } -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/map/MapCenterPointStrategy.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/map/MapCenterPointStrategy.java deleted file mode 100644 index 9a6cc93156..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/map/MapCenterPointStrategy.java +++ /dev/null @@ -1,319 +0,0 @@ -package com.mogo.module.common.map; - -import android.util.Log; - -import com.mogo.commons.debug.DebugConfig; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; -import com.mogo.eagle.core.utilcode.util.UiThreadHandler; -import com.mogo.map.uicontroller.IMogoMapUIController; -import com.mogo.module.common.MogoApisHandler; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author congtaowang - * @since 2020-04-10 - *

- * 地图中心点策略 - */ -public class MapCenterPointStrategy { - - private static final String TAG = "MapCenterPointStrategy"; - - private static Map< Integer, Map< String, MapCenterPoint > > sCommonStrategies = new HashMap<>(); - private static Map< Integer, Map< String, MapCenterPoint > > sVrStrategies = new HashMap<>(); - - public static final MapCenterPoint DEFAULT = new MapCenterPoint( 0.677734D, 0.5733333D ); - - public static void init() { - - { - // 选点场景,定位中心点 - Map< String, MapCenterPoint > choosePoint = new HashMap<>(); - final MapCenterPoint point = new MapCenterPoint( 0.5D, 0.5D ); - choosePoint.put( "d80x", point ); - choosePoint.put( "em4", point ); - choosePoint.put( "em3", point ); - choosePoint.put( "e8xx", point ); - choosePoint.put( "f80x", point ); - choosePoint.put( "f8xx", point ); - choosePoint.put( "f8Amap", point ); - sCommonStrategies.put( Scene.CHOOSE_POINT, choosePoint ); - } - - { - // 导航场景,定位视图右下角偏下 - Map< String, MapCenterPoint > navi = new HashMap<>(); - final MapCenterPoint em4 = new MapCenterPoint( 0.734375D, 0.573333333333D ); - navi.put( "em4", em4 ); - navi.put( "em3", em4 ); - navi.put( "e8xx", em4 ); - final MapCenterPoint f80x = new MapCenterPoint( 0.705208333D, 0.575D ); - navi.put( "f80x", f80x ); - navi.put( "f8xx", f80x ); - navi.put( "f8Amap", f80x ); - sCommonStrategies.put( Scene.NAVI, navi ); - } - - { - // 导航场景 vs 道路事件展示场景,定位视图右下角偏下 - Map< String, MapCenterPoint > naviWithRoadEvent = new HashMap<>(); - final MapCenterPoint em4 = new MapCenterPoint( 0.734375D, 0.73936170212766D ); - naviWithRoadEvent.put( "em4", em4 ); - naviWithRoadEvent.put( "em3", em4 ); - naviWithRoadEvent.put( "e8xx", em4 ); - final MapCenterPoint f80x = new MapCenterPoint( 0.705208333D, 0.683333333333D ); - naviWithRoadEvent.put( "f80x", f80x ); - naviWithRoadEvent.put( "f8xx", f80x ); - naviWithRoadEvent.put( "f8Amap", f80x ); - sCommonStrategies.put( Scene.NAVI_WITH_ROAD_EVENT, naviWithRoadEvent ); - } - - { - // 巡航场景 - Map< String, MapCenterPoint > aimless = new HashMap<>(); - final MapCenterPoint em4 = new MapCenterPoint( 0.734375D, 0.5D ); - aimless.put( "em4", em4 ); - aimless.put( "em3", em4 ); - aimless.put( "e8xx", em4 ); - final MapCenterPoint f80x = new MapCenterPoint( 0.705208333D, 0.5D ); - aimless.put( "f80x", f80x ); - aimless.put( "f8xx", f80x ); - aimless.put( "f8Amap", f80x ); - sCommonStrategies.put( Scene.AIMLESS, aimless ); - } - - { - // 巡航场景 vs 道路事件展示场景 - Map< String, MapCenterPoint > aimlessWithRoadEvent = new HashMap<>(); - final MapCenterPoint em4 = new MapCenterPoint( 0.734375D, 0.68617 ); - aimlessWithRoadEvent.put( "em4", em4 ); - aimlessWithRoadEvent.put( "em3", em4 ); - aimlessWithRoadEvent.put( "e8xx", em4 ); - final MapCenterPoint f80x = new MapCenterPoint( 0.705208333D, 0.599074074D ); - aimlessWithRoadEvent.put( "f80x", f80x ); - aimlessWithRoadEvent.put( "f8xx", f80x ); - aimlessWithRoadEvent.put( "f8Amap", f80x ); - sCommonStrategies.put( Scene.AIMLESS_WITH_ROAD_EVENT, aimlessWithRoadEvent ); - } - - { - // 规划路线,定位视图右边 - Map< String, MapCenterPoint > calculatePath = new HashMap<>(); - final MapCenterPoint d80x = new MapCenterPoint( 0.733398D, 0.610833D ); - calculatePath.put( "d80x", d80x ); - calculatePath.put( "em4", d80x ); - calculatePath.put( "em3", d80x ); - calculatePath.put( "e8xx", d80x ); - final MapCenterPoint f80x = new MapCenterPoint( 0.703125D, 0.6083333D ); - calculatePath.put( "f80x", f80x ); - calculatePath.put( "f8xx", f80x ); - calculatePath.put( "f8Amap", f80x ); - sCommonStrategies.put( Scene.CALCULATE_PATH, calculatePath ); - } - - { - // 分类搜索,定位视图右边 - Map< String, MapCenterPoint > categorySearch = new HashMap<>(); - final MapCenterPoint d80x = new MapCenterPoint( 0.733398D, 0.5D ); - categorySearch.put( "d80x", d80x ); - categorySearch.put( "em4", d80x ); - categorySearch.put( "em3", d80x ); - categorySearch.put( "e8xx", d80x ); - final MapCenterPoint f80x = new MapCenterPoint( 0.733594D, 0.5D ); - categorySearch.put( "f80x", f80x ); - categorySearch.put( "f8xx", f80x ); - categorySearch.put( "f8Amap", f80x ); - sCommonStrategies.put( Scene.CATEGORY_SEARCH, categorySearch ); - } - - { - // V2X,场景视图右边 - Map< String, MapCenterPoint > categoryV2XEvent = new HashMap<>(); - categoryV2XEvent.put( "d80x", new MapCenterPoint( 0.669444444444444, 0.7D ) ); - final MapCenterPoint em4 = new MapCenterPoint( 0.677734375D, 0.7D ); - categoryV2XEvent.put( "em4", em4 ); - categoryV2XEvent.put( "em3", em4 ); - categoryV2XEvent.put( "e8xx", em4 ); - final MapCenterPoint f80x = new MapCenterPoint( 0.6963541D, 0.65D ); - categoryV2XEvent.put( "f80x", f80x ); - categoryV2XEvent.put( "f8xx", f80x ); - categoryV2XEvent.put( "f8Amap", f80x ); - sCommonStrategies.put( Scene.CATEGORY_V2X_EVENT, categoryV2XEvent ); - } - - // --vr mode - - { - // 选点场景,定位中心点 - Map< String, MapCenterPoint > choosePoint = new HashMap<>(); - MapCenterPoint point = new MapCenterPoint( 0.5D, 0.5D ); - choosePoint.put( "d80x", point ); - choosePoint.put( "em4", point ); - choosePoint.put( "e8xx", point ); - choosePoint.put( "f80x", point ); - choosePoint.put( "f8xx", point ); - choosePoint.put( "f8Amap", point ); - sVrStrategies.put( Scene.CHOOSE_POINT, choosePoint ); - } - - { - // 导航场景,定位视图右下角偏下 - Map< String, MapCenterPoint > navi = new HashMap<>(); - MapCenterPoint point1 = new MapCenterPoint( 0.5D, 0.573333333333D ); - navi.put( "d80x", point1 ); - navi.put( "em4", point1 ); - navi.put( "e8xx", point1 ); - MapCenterPoint point2 = new MapCenterPoint( 0.5D, 0.575D ); - navi.put( "f80x", point2 ); - navi.put( "f8xx", point2 ); - navi.put( "f8Amap", point2 ); - sVrStrategies.put( Scene.NAVI, navi ); - } - - { - // 导航场景 vs 道路事件展示场景,定位视图右下角偏下 - Map< String, MapCenterPoint > naviWithRoadEvent = new HashMap<>(); - MapCenterPoint point1 = new MapCenterPoint( 0.5D, 0.73936170212766D ); - naviWithRoadEvent.put( "d80x", point1 ); - naviWithRoadEvent.put( "em4", point1 ); - naviWithRoadEvent.put( "e8xx", point1 ); - MapCenterPoint point2 = new MapCenterPoint( 0.5D, 0.683333333333D ); - naviWithRoadEvent.put( "f80x", point2 ); - naviWithRoadEvent.put( "f8xx", point2 ); - naviWithRoadEvent.put( "f8Amap", point2 ); - sVrStrategies.put( Scene.NAVI_WITH_ROAD_EVENT, naviWithRoadEvent ); - } - - { - // 巡航场景 - Map< String, MapCenterPoint > aimless = new HashMap<>(); - MapCenterPoint point1 = new MapCenterPoint( 0.5D, 0.575D ); - aimless.put( "d80x", point1 ); - aimless.put( "em4", point1 ); - aimless.put( "e8xx", point1 ); - MapCenterPoint point2 = new MapCenterPoint( 0.5D, 0.8D ); - aimless.put( "f80x", point2 ); - aimless.put( "f8xx", point2 ); - aimless.put( "f8Amap", point2 ); - sVrStrategies.put( Scene.AIMLESS, aimless ); - } - - { - // 巡航场景 vs 道路事件展示场景 - Map< String, MapCenterPoint > aimlessWithRoadEvent = new HashMap<>(); - MapCenterPoint point1 = new MapCenterPoint( 0.5D, 0.68617 ); - aimlessWithRoadEvent.put( "d80x", point1 ); - aimlessWithRoadEvent.put( "em4", point1 ); - aimlessWithRoadEvent.put( "e8xx", point1 ); - MapCenterPoint point2 = new MapCenterPoint( 0.5D, 0.599074074D ); - aimlessWithRoadEvent.put( "f80x", point2 ); - aimlessWithRoadEvent.put( "f8xx", point2 ); - aimlessWithRoadEvent.put( "f8Amap", point2 ); - sVrStrategies.put( Scene.AIMLESS_WITH_ROAD_EVENT, aimlessWithRoadEvent ); - } - - { - // 规划路线,定位视图右边 - Map< String, MapCenterPoint > calculatePath = new HashMap<>(); - MapCenterPoint point1 = new MapCenterPoint( 0.5D, 0.610833D ); - calculatePath.put( "d80x", point1 ); - calculatePath.put( "em4", point1 ); - calculatePath.put( "e8xx", point1 ); - MapCenterPoint point2 = new MapCenterPoint( 0.5D, 0.6083333D ); - calculatePath.put( "f80x", point2 ); - calculatePath.put( "f8xx", point2 ); - calculatePath.put( "f8Amap", point2 ); - sVrStrategies.put( Scene.CALCULATE_PATH, calculatePath ); - } - - { - // 分类搜索,定位视图右边 - Map< String, MapCenterPoint > categorySearch = new HashMap<>(); - MapCenterPoint point = new MapCenterPoint( 0.5D, 0.5D ); - categorySearch.put( "d80x", point ); - categorySearch.put( "em4", point ); - categorySearch.put( "e8xx", point ); - categorySearch.put( "f80x", point ); - categorySearch.put( "f8xx", point ); - categorySearch.put( "f8Amap", point ); - sVrStrategies.put( Scene.CATEGORY_SEARCH, categorySearch ); - } - - { - // V2X,场景视图右边 - Map< String, MapCenterPoint > categoryV2XEvent = new HashMap<>(); - MapCenterPoint point1 = new MapCenterPoint( 0.5, 0.7D ); - categoryV2XEvent.put( "d80x", point1 ); - categoryV2XEvent.put( "em4", point1 ); - categoryV2XEvent.put( "e8xx", point1 ); - MapCenterPoint point2 = new MapCenterPoint( 0.5, 0.65D ); - categoryV2XEvent.put( "f80x", point2 ); - categoryV2XEvent.put( "f8xx", point2 ); - categoryV2XEvent.put( "f8Amap", point2 ); - sVrStrategies.put( Scene.CATEGORY_V2X_EVENT, categoryV2XEvent ); - } - } - - public static void resetByChangeMode() { - setMapCenterPointByScene( MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController(), Scene.AIMLESS ); - } - - /** - * 根据场景触发地图视图改变 - * - * @param controller - * @param scene - */ - public static void setMapCenterPointByScene( IMogoMapUIController controller, int scene ) { - if ( controller == null ) { - return; - } - if ( MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) { - //Logger.w( TAG, "vr 模式下忽略该设置" ); - return; - } - Map< Integer, Map< String, MapCenterPoint > > strategies = sCommonStrategies; - if ( MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) { - strategies = sVrStrategies; - } - if ( !strategies.containsKey( scene ) ) { - Logger.w( TAG, "no strategy for scene: %s, use DEFAULT", scene ); - controller.setPointToCenter( DEFAULT.x, DEFAULT.y ); - return; - } - Map< String, MapCenterPoint > points = strategies.get( scene ); - String car = DebugConfig.getProductFlavor(); - if ( !points.containsKey( car ) ) { - Logger.w( TAG, "no strategy for series: %s, use DEFAULT", scene ); - controller.setPointToCenter( DEFAULT.x, DEFAULT.y ); - return; - } - MapCenterPoint point = points.get( car ); - if ( point == null ) { - Logger.w( TAG, "no strategy config for series: %s, use DEFAULT", scene ); - controller.setPointToCenter( DEFAULT.x, DEFAULT.y ); - return; - } - controller.setPointToCenter( point.x, point.y ); - } - - /** - * 根据场景触发地图视图改变 - * - * @param controller - * @param scene - */ - public static void setMapCenterPointBySceneAndDelay( final IMogoMapUIController controller, final int scene, long delay, final Interrupter interrupter ) { - UiThreadHandler.postDelayed( () -> { - if ( interrupter != null ) { - if ( interrupter.interrupt() ) { - return; - } - } - setMapCenterPointByScene( controller, scene ); - }, delay ); - } - -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/map/MyLocationUtil.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/map/MyLocationUtil.java deleted file mode 100644 index 47daceae38..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/map/MyLocationUtil.java +++ /dev/null @@ -1,124 +0,0 @@ -package com.mogo.module.common.map; - -import android.content.Context; -import android.graphics.Bitmap; -import android.graphics.drawable.Drawable; -import android.os.Looper; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ImageView; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - -import com.bumptech.glide.request.RequestOptions; -import com.bumptech.glide.request.target.SimpleTarget; -import com.bumptech.glide.request.transition.Transition; -import com.mogo.commons.context.ContextHolderUtil; -import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp; -import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr; -import com.mogo.eagle.core.utilcode.util.UiThreadHandler; -import com.mogo.eagle.core.utilcode.util.ViewUtils; -import com.mogo.map.uicontroller.CarCursorOption; -import com.mogo.module.common.MogoApisHandler; -import com.mogo.module.common.R; - -/** - * 自车图标工具类 - * - * @author tongchenfei - */ -public class MyLocationUtil { - - private static boolean isLoadingIcon = false; - private static boolean needEmphasizeMyLocation = false; - - static { - MogoApisHandler.getInstance().getApis().getDataManagerApi() - .registerDataListener( "ADAS", data ->{ - if ( data == null ) { - emphasizeMyLocation(); - } else if( data instanceof String ){ - setMyLocationIconUrl( ContextHolderUtil.getContext(), ( ( String ) data )); - } - } ); - } - - public static void emphasizeMyLocation(){ - if (!isLoadingIcon) { - MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().emphasizeMyLocation(); - }else{ - needEmphasizeMyLocation = true; - } - } - - private static final CarCursorOption DEFAULT_OPTION = new CarCursorOption.Builder() - .build(); - - public static void setMyLocationIconUrl(Context context){ - setMyLocationIconUrl( context, SharedPrefsMgr.getInstance( context ).getString( "MY_LOCATION_CONFIG", "" ) ); - } - - public static void setMyLocationIconUrl(Context context, String url) { - if (url == null || url.isEmpty()) { - return; - } - - if (Looper.myLooper() != Looper.getMainLooper()) { - UiThreadHandler.post(() -> loadMyLocationIconInUiThread(context, url)); - } else { - loadMyLocationIconInUiThread(context, url); - } - } - - private static void loadMyLocationIconInUiThread(Context context, String url) { - if (!url.isEmpty()) { - isLoadingIcon = true; - RequestOptions options = new RequestOptions() - .placeholder(DEFAULT_OPTION.getCarCursorRes()) - .error(DEFAULT_OPTION.getCarCursorRes()) - .dontAnimate(); - GlideApp.with(context) - .asBitmap() - .load(url) - .apply(options) - .into(new SimpleTarget() { - @Override - public void onResourceReady(@NonNull Bitmap resource, - @Nullable Transition transition) { - DEFAULT_OPTION.setCarCursorBmp(inflateMyLocation(context, resource)); - MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().setCarCursorOption(DEFAULT_OPTION); - if (needEmphasizeMyLocation) { - needEmphasizeMyLocation = false; - MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().emphasizeMyLocation(); - } - isLoadingIcon = false; - } - - @Override - public void onLoadStarted(@Nullable Drawable placeholder) { - } - - @Override - public void onLoadCleared(@Nullable Drawable placeholder) { - } - - @Override - public void onLoadFailed(@Nullable Drawable errorDrawable) { - } - }); - } - } - - private static Bitmap inflateMyLocation(Context context, Bitmap res) { - if (res == null) { - throw new IllegalArgumentException("inflate myLocation bitmap can not be null!"); - } - View root = LayoutInflater.from(context).inflate(R.layout.module_common_my_location, null, false); - ImageView iv = root.findViewById(R.id.module_map_amap_my_location_iv); - iv.setImageBitmap(res); - return ViewUtils.fromView(root); - } -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/LocationUtils.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/LocationUtils.java deleted file mode 100644 index 35e8baecbb..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/LocationUtils.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.mogo.module.common.utils; - -import android.util.Log; - -import com.mogo.eagle.core.data.map.MogoLatLng; -import com.mogo.eagle.core.data.map.MogoLocation; - - -/** - * author : donghongyu - * e-mail : 1358506549@qq.com - * date : 2020/5/15 10:31 AM - * desc : 基于位置工具类 - * version: 1.0 - */ -public class LocationUtils { - private static final String TAG = "LocationUtils"; - - - /** - * 获取传入的经纬度在车辆的什么位置 - * - * @return 顺时针,true-前,false-后 - */ - public static boolean isPointOnCarFront(MogoLocation carLocal, MogoLatLng pointLocal) { - double carLon = carLocal.getLongitude(); - double carLat = carLocal.getLatitude(); - double poiLon = pointLocal.getLon(); - double poiLat = pointLocal.getLat(); - float carAngle = carLocal.getBearing(); - - // 计算车辆与点之间的夹角 - int diffAngle = DrivingDirectionUtils.getDegreeOfCar2Poi( - carLon, carLat, poiLon, poiLat, (int) carAngle); - - if (diffAngle <= 90) { - Log.i(TAG, "目标点在车辆--前方"); - return true; - } else { - Log.i(TAG, "目标点在车辆--后方"); - return false; - } - } -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/SPConst.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/SPConst.java deleted file mode 100644 index 2d678da5b3..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/SPConst.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.mogo.module.common.utils; - -/** - * 多模块之间SP状态公共类 - */ -public class SPConst { - - private static String SP_GUIDE = "SP_GUIDE_2020_09_09"; - - //用于多模块之间引导状态判断 - public static String getSpGuide() { - return SP_GUIDE; - } - - private static String SP_GUIDE_FIRST_TIME_RECORD = "SP_GUIDE_FIRST_TIME_RECORD"; - - -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/SimpleHandlerThreadPool.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/SimpleHandlerThreadPool.java deleted file mode 100644 index 976b3cffcd..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/SimpleHandlerThreadPool.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.mogo.module.common.utils; - -import android.os.Handler; -import android.os.HandlerThread; - -/** - * 简单HandlerThread线程池实现 - * - * @author tongchenfei - */ -public class SimpleHandlerThreadPool { - private static final String TAG = "SimpleHandlerThreadPool"; - private final HandlerThread renderThread = new HandlerThread( "one-frame-render-thread" ); - private final Handler renderHandler; - - private SimpleHandlerThreadPool() { - renderThread.start(); - renderHandler = new Handler( renderThread.getLooper() ); - } - - private static final SimpleHandlerThreadPool INSTANCE = new SimpleHandlerThreadPool(); - - public static SimpleHandlerThreadPool getInstance() { - return INSTANCE; - } - - public void postRender( Runnable runnable ) { - renderHandler.post( runnable ); - } -} diff --git a/modules/mogo-module-extensions/build.gradle b/modules/mogo-module-extensions/build.gradle index 248d8f72c9..3380212888 100644 --- a/modules/mogo-module-extensions/build.gradle +++ b/modules/mogo-module-extensions/build.gradle @@ -68,7 +68,6 @@ dependencies { api rootProject.ext.dependencies.mogocommons api rootProject.ext.dependencies.mogoserviceapi implementation rootProject.ext.dependencies.modulecommon - implementation rootProject.ext.dependencies.moduleshare implementation rootProject.ext.dependencies.moduleservice implementation rootProject.ext.dependencies.mogo_core_utils @@ -81,7 +80,6 @@ dependencies { api project(":foudations:mogo-commons") api project(':services:mogo-service-api') implementation project(':modules:mogo-module-common') - implementation project(':modules:mogo-module-share') implementation project(':modules:mogo-module-service') implementation project(':core:mogo-core-utils') diff --git a/modules/mogo-module-extensions/consumer-rules.pro b/modules/mogo-module-extensions/consumer-rules.pro index 90623acbeb..4baec1f835 100644 --- a/modules/mogo-module-extensions/consumer-rules.pro +++ b/modules/mogo-module-extensions/consumer-rules.pro @@ -3,7 +3,5 @@ -keep class com.mogo.module.extensions.live.PushCameraLiveWindow{*;} -keep class com.mogo.module.extensions.navi.*{*;} -keep class com.mogo.module.extensions.userinfo.*{*;} --keep class com.mogo.module.extensions.weather.Phenomena{*;} --keep class com.mogo.module.extensions.weather.StrokeTextView{*;} -keep class com.mogo.module.extensions.view.*{*;} -keep class com.mogo.module.extensions.bean.*{*;} \ No newline at end of file diff --git a/modules/mogo-module-extensions/proguard-rules.pro b/modules/mogo-module-extensions/proguard-rules.pro index 83112829d5..c9e77ea0d8 100644 --- a/modules/mogo-module-extensions/proguard-rules.pro +++ b/modules/mogo-module-extensions/proguard-rules.pro @@ -23,8 +23,6 @@ #-----ExtensionModule----- -keep class com.mogo.module.extensions.userinfo.**{*;} -keep class com.mogo.module.extensions.weather.Phenomena --keep class com.mogo.module.extensions.weather.WeatherCallback --keep interface com.mogo.module.extensions.net.UserInfoNetApiServices -keep class com.mogo.module.extensions.utils.TopViewAnimHelper -keep class com.mogo.module.extensions.ExtensionsView -keep class com.mogo.module.extensions.ExtensionsModuleConst \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/ExtensionsModuleConst.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/ExtensionsModuleConst.java index 2ee73f87a3..fef0daee39 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/ExtensionsModuleConst.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/ExtensionsModuleConst.java @@ -8,56 +8,6 @@ package com.mogo.module.extensions; */ public class ExtensionsModuleConst { - public static final String TYPE = "extension"; - public static final String TYPE_ENTRANCE = "entrance"; - /*** 分享 开始 **/ - //免唤醒语音命令 - public static final String[] CMD_CANCLE_SHARE = {"取消分享"}; - public static final String[] CMD_CLOSE_PAGE = {"关闭页面"}; - public static final String[] CMD_CLOSE = {"关闭"}; - - public static final String CANCLE_SHARE = "com.zhidao.launcher.cancle.share"; - public static final String CLOSE_PAGE = "com.zhidao.launcher.close.page"; - public static final String CLOSE = "com.zhidao.launcher.close"; - - //唤醒指令 - //分享路况/上报路况/上报拥堵/上报交通检查/上报封路 唤醒 - public static final String UPLOAD_ROAD_CONDITION_AWAKEN = "com.zhidao.pathfinder.report.roadCondition"; - public static final String UPLOAD_ROAD_CONDITION = "command_upload_roadcondition"; - //关闭分享框 唤醒 - public static final String SHARE_DIALOG_CLOSE = "com.zhidao.share.close"; - // 两次未回复关闭分享对话框 - public static final String NO_REPLY_SHARE_DIALOG_CLOSE = "com.zhidao.share.dialog.close"; - //我要分享 - public static final String GO_TO_SHARE = "com.zhidao.share"; - - /*** 分享 结束 **/ - - - /*** 探路 开始 免唤醒 **/ - public static final String[] CMD_UPLOAD_BLOCK = {"上报拥堵"}; - public static final String[] CMD_TRAFFIC_CHECK = {"上报交通检查"}; - public static final String[] CMD_ROAD_CLOSURE = {"上报封路"}; -// public static final String[] CMD_SHARE_OIL_PRICE = {"分享油价"}; - - //上报拥堵 - public static final String UPLOAD_ROAD_BLOCK = "command_upload_block"; - //上报交通检查 - public static final String UPLOAD_TRAFFIC_CHECK = "command_upload_traffic_check"; - //上报封路 - public static final String UPLOAD_ROAD_CLOSURE = "command_upload_road_closure"; - //分享油价 -// public static final String SHARE_OIL_PRICE = "command_share_oil_price"; - /*** 探路 结束 **/ - - //埋点 - //分享分类 1:路况,2:油价,3:交通检查,4:封路 - public static final String LAUNCHER_SHARE_TYPE = "v2x_share_type"; - //分享/上报按钮点击 from=1 手动点击 from=2 语音打开 - public static final String LAUNCHER_SHARE_CLICK = "v2x_share_click"; - public static final String CARNET_USER_UPLOAD = "CarNet_user_upload"; - - } diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/ExtensionsView.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/ExtensionsView.java index f7f601a81a..6a9c127a58 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/ExtensionsView.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/ExtensionsView.java @@ -1,8 +1,6 @@ package com.mogo.module.extensions; import com.mogo.commons.mvp.IView; -import com.mogo.module.extensions.userinfo.UserInfo; -import com.mogo.module.extensions.weather.WeatherInfo; /** * @author congtaowang @@ -12,21 +10,4 @@ import com.mogo.module.extensions.weather.WeatherInfo; */ public interface ExtensionsView extends IView { - /** - * 天气信息 - * - * @param desc 天气描述:晴转多云 - * @param temp 温度 - * @param iconId 图标 - */ - void renderWeatherInfo( String temp, String desc, int iconId ); - - /** - * 刷新消息信息 - * - * @param hasMsg 是否有消息 - * @param amount 消息数量 - */ - void renderMsgInfo( boolean hasMsg, int amount ); - } diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/bean/BottomLayerViewWrapper.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/bean/BottomLayerViewWrapper.java deleted file mode 100644 index 17078499eb..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/bean/BottomLayerViewWrapper.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.mogo.module.extensions.bean; - -import android.view.View; - -import java.util.Objects; - -/** - * 底层view封装 - * - * @author tongchenfei - */ -public class BottomLayerViewWrapper { - private View view; - private int x; - private int y; - - public BottomLayerViewWrapper() { - } - - public BottomLayerViewWrapper(View view, int x, int y) { - this.view = view; - this.x = x; - this.y = y; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BottomLayerViewWrapper wrapper = (BottomLayerViewWrapper) o; - return x == wrapper.x && - y == wrapper.y && - view.equals(wrapper.view); - } - - @Override - public int hashCode() { - return Objects.hash(view); - } - - public View getView() { - return view; - } - - public void setView(View view) { - this.view = view; - } - - public int getX() { - return x; - } - - public void setX(int x) { - this.x = x; - } - - public int getY() { - return y; - } - - public void setY(int y) { - this.y = y; - } -} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java index daef28877c..4d9c01e2d7 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java @@ -1,81 +1,43 @@ package com.mogo.module.extensions.entrance; import static com.mogo.module.extensions.ExtensionsModuleConst.TYPE_ENTRANCE; -import static com.mogo.module.share.constant.ShareConstants.KEY_CLICK_SHARE_BUTTON; -import static com.mogo.module.share.constant.ShareConstants.KEY_CLICK_SHARE_TIME; -import static com.mogo.module.share.constant.ShareConstants.ONE_DAY_TIME; -import static com.mogo.module.share.constant.ShareConstants.VOICE_ALERT_COUNT; import android.content.Intent; -import android.graphics.Rect; import android.os.Bundle; import android.os.Handler; -import android.os.SystemClock; -import android.text.TextUtils; -import android.util.TypedValue; import android.view.MotionEvent; -import android.view.View; -import android.widget.Button; -import android.widget.EditText; -import android.widget.ImageButton; -import android.widget.ImageView; -import android.widget.RadioButton; -import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.constraintlayout.widget.ConstraintLayout; -import androidx.constraintlayout.widget.ConstraintSet; -import androidx.constraintlayout.widget.Group; -import com.alibaba.android.arouter.launcher.ARouter; -import com.mogo.commons.AbsMogoApplication; import com.mogo.commons.debug.DebugConfig; import com.mogo.commons.mvp.MvpFragment; -import com.mogo.commons.voice.AIAssist; import com.mogo.eagle.core.data.map.MogoLatLng; import com.mogo.eagle.core.utilcode.mogo.logger.Logger; -import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr; -import com.mogo.eagle.core.utilcode.mogo.toast.ResourcesHelper; -import com.mogo.eagle.core.utilcode.mogo.toast.TipToast; import com.mogo.eagle.core.utilcode.util.UiThreadHandler; import com.mogo.map.listener.IMogoMapListener; import com.mogo.map.listener.MogoMapListenerHandler; import com.mogo.map.navi.IMogoAimlessModeListener; -import com.mogo.map.navi.IMogoNavi; import com.mogo.map.navi.IMogoNaviListener; import com.mogo.map.navi.MogoNaviInfo; import com.mogo.map.navi.MogoTraffic; import com.mogo.map.uicontroller.EnumMapUI; -import com.mogo.map.uicontroller.IMogoMapUIController; import com.mogo.map.uicontroller.VisualAngleMode; import com.mogo.module.common.MogoApisHandler; -import com.mogo.module.common.dialog.WMDialog; -import com.mogo.module.common.map.CustomNaviInterrupter; -import com.mogo.module.common.map.MapCenterPointStrategy; -import com.mogo.module.common.map.Scene; -import com.mogo.module.common.view.OnPreventFastClickListener; import com.mogo.module.extensions.R; import com.mogo.module.extensions.utils.CameraLiveNoticeHelper; -import com.mogo.module.extensions.utils.EntranceViewHolder; import com.mogo.module.extensions.utils.NoMapTopViewShaderHelper; import com.mogo.module.extensions.utils.TopViewAnimHelper; import com.mogo.module.extensions.utils.TopViewNoLinkageAnimHelper; import com.mogo.service.IMogoServiceApis; -import com.mogo.service.analytics.IMogoAnalytics; -import com.mogo.service.cloud.socket.IMogoOnMessageListener; -import com.mogo.service.entrance.ButtonIndex; -import com.mogo.service.fragmentmanager.IFragmentProvider; -import com.mogo.service.fragmentmanager.IMogoFragmentManager; import com.mogo.service.intent.IMogoIntentListener; -import com.mogo.service.map.IMogoMapService; import com.mogo.service.module.IMogoRegisterCenter; import com.mogo.service.statusmanager.IMogoStatusChangedListener; import com.mogo.service.statusmanager.IMogoStatusManager; import com.mogo.service.statusmanager.StatusDescriptor; import java.util.HashMap; -import java.util.Map; /** * @author congtaowang @@ -93,61 +55,14 @@ public class EntranceFragment extends MvpFragment { - mApis.getAdasControllerApi().closeADAS(); - return true; - }); - - if (!DebugConfig.isMapBased()) { - // 不基于地图的版本需要隐藏一些按钮 - mMove2CurrentLocation.setVisibility(View.GONE); - mWeatherContainer.setVisibility(View.GONE); - mMsgContainer.setVisibility(View.GONE); - } - - } - - private void playShareGuideVoice() { - long intervalTime = SharedPrefsMgr.getInstance(getContext()).getLong(KEY_CLICK_SHARE_TIME, 0); - int shareItemSum = SharedPrefsMgr.getInstance(getContext()).getInt(KEY_CLICK_SHARE_BUTTON, 0); - if (shareItemSum < VOICE_ALERT_COUNT) { - long time = System.currentTimeMillis(); - Logger.d(TAG, " playShareGuideVoice shareItemSum = " + shareItemSum + "---- intervalTime = " + intervalTime + ">>> time = " + time); - if (intervalTime == 0) { - SharedPrefsMgr.getInstance(getContext()).putLong(KEY_CLICK_SHARE_TIME, time); - SharedPrefsMgr.getInstance(getContext()).putInt(KEY_CLICK_SHARE_BUTTON, ++shareItemSum); - AIAssist.getInstance(getContext()).speakTTSVoice(mClickShareVoiceStrings[0]); - } else { - Logger.d(TAG, " playShareGuideVoice else interval = " + (time - intervalTime)); - if ((time - intervalTime) > ONE_DAY_TIME) { - if (shareItemSum == 1) { - AIAssist.getInstance(getContext()).speakTTSVoice(mClickShareVoiceStrings[1]); - } else { - AIAssist.getInstance(getContext()).speakTTSVoice(mClickShareVoiceStrings[0]); - } - - SharedPrefsMgr.getInstance(getContext()).putLong(KEY_CLICK_SHARE_TIME, time); - SharedPrefsMgr.getInstance(getContext()).putInt(KEY_CLICK_SHARE_BUTTON, ++shareItemSum); - } else { - Logger.e(TAG, " playShareGuideVoice else < ONE_DAY_TIME "); - } - } - } - } /** * 地图移动和缩放回调 @@ -372,27 +139,6 @@ public class EntranceFragment extends MvpFragment !mMogoNavi.isNaviing()); - if (CustomNaviInterrupter.getInstance().interrupt()) { - mDisplayOverview.setVisibility(View.GONE); - mCameraMode.setVisibility(View.GONE); - mExitNavi.setVisibility(View.GONE); - } else { - mExitNavi.setVisibility(View.VISIBLE); - mDisplayOverview.setVisibility(View.VISIBLE); - mCameraMode.setVisibility(View.VISIBLE); - } mApis.getAnalyticsApi().track("Navigation_begin", new HashMap<>()); } @@ -514,11 +223,6 @@ public class EntranceFragment extends MvpFragment properties = new HashMap<>(); - properties.put("from", from); - mAnalytics.track("v2x_share_click", properties); } @Override public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) { Logger.d(TAG, "descriptor=" + descriptor + " isTrue=" + isTrue); - if (mUploadRoadCondition == null) { - return; - } - - if (descriptor == StatusDescriptor.UPLOADING && DebugConfig.isLauncher()) { - if (isTrue) { - mUploading.setVisibility(View.VISIBLE); - mUpload.setVisibility(View.GONE); - mUploadButtonAnimatorController.doFrameAnimOnUploadButton(); - } else { - mUploadButtonAnimatorController.stopAnimation(); - mUploading.setVisibility(View.GONE); - mUpload.setVisibility(View.VISIBLE); - } - } else if (descriptor == StatusDescriptor.DISPLAY_OVERVIEW) { - if (!mMogoNavi.isNaviing()) { - return; - } - if (isTrue) { - mDisplayOverviewText.setText("退出全览"); - mDisplayOverviewText.setTextSize(TypedValue.COMPLEX_UNIT_PX, - AbsMogoApplication.getApp().getResources().getDimensionPixelSize(R.dimen.module_ext_display_overview_textSize)); - mCameraMode.setVisibility(View.GONE); - } else { - mDisplayOverviewText.setText("全览"); - mDisplayOverviewText.setTextSize(TypedValue.COMPLEX_UNIT_PX, - AbsMogoApplication.getApp().getResources().getDimensionPixelSize(R.dimen.module_ext_display_overview_textSize_large)); - if (CustomNaviInterrupter.getInstance().interrupt()) { - mCameraMode.setVisibility(View.GONE); - } else { - mCameraMode.setVisibility(View.VISIBLE); - } - } - } else if (descriptor == StatusDescriptor.SEEK_HELPING) { - if (!isTrue) { - handler.post(() -> seekHelpGroup.setVisibility(View.GONE)); - } - } else if (descriptor == StatusDescriptor.VR_MODE) { - try { - if (isTrue) { - enterVrMode(); - } else { - exitVrMode(); - } - } catch (Exception e) { - e.printStackTrace(); - } - - } - } - - @Override - public void renderWeatherInfo(String temp, String desc, int iconId) { - if (!DebugConfig.isMapBased()) { - return; - } - if (mApis.getStatusManagerApi().isVrMode()) { - return; - } - boolean hidden = false; - if (iconId != 0) { - mWeatherIcon.setImageResource(iconId); - mWeatherIcon.setVisibility(View.VISIBLE); - } else { - mWeatherIcon.setVisibility(View.GONE); - hidden |= true; - } - hidden |= TextUtils.isEmpty(temp); - hidden |= TextUtils.isEmpty(desc); - mWeatherTemp.setText(temp); - mWeatherContainer.setVisibility(hidden ? View.INVISIBLE : View.VISIBLE); - } - - @Override - public void renderMsgInfo(boolean hasMsg, int amount) { - if (!DebugConfig.isMapBased()) { - return; - } - if (mApis.getStatusManagerApi().isVrMode()) { - return; - } - mMsgContainer.setVisibility(hasMsg ? View.VISIBLE : View.GONE); - mMsgCounter.setText(amount > MAX_DISPLAY_MSG_AMOUNT ? - getString(R.string.module_ext_str_dots) : String.valueOf(amount)); } @Override public void onMapModeChanged(EnumMapUI ui) { - if (mCameraMode == null) { - return; - } - mCameraMode.setSelected(ui == EnumMapUI.NorthUP_2D); - mCameraMode.setText(getString(ui == EnumMapUI.NorthUP_2D ? R.string.mode_car_up : R.string.mode_north_up)); + } @Override @@ -656,33 +253,9 @@ public class EntranceFragment extends MvpFragment seekHelpNoticeListener = - new IMogoOnMessageListener() { - @Override - public Class target() { - return String.class; - } - - @Override - public void onMsgReceived(String obj) { - if (mStatusManager.isSeekHelping()) { - int seekNum = SharedPrefsMgr.getInstance(getContext()).getInt("seek_help_num", 0); - final int finalSeekNum = ++seekNum; - SharedPrefsMgr.getInstance(getContext()).putInt("seek_help_num", seekNum); - handler.post(() -> { - seekHelpGroup.setVisibility(localIsVrMode ? View.INVISIBLE : View.VISIBLE); - seekHelpNum.setText("" + finalSeekNum); - }); - } - } - }; - private final Handler handler = new Handler(); private void listenSeekNumber() { - mApis.getSocketManagerApi(getContext()).registerOnMessageListener(SEEK_HELP_NOTICE_NUM_MSG_TYPE, seekHelpNoticeListener); mStatusManager.registerStatusChangedListener(TAG, StatusDescriptor.SEEK_HELPING, this); } @@ -705,189 +278,8 @@ public class EntranceFragment extends MvpFragment debugPanelGroup.setVisibility(View.GONE)); - - btnOpenLog.setOnClickListener(v -> { - Intent intent = new Intent("com.mogo.ACTION"); - intent.putExtra("oper", 1); - getContext().sendBroadcast(intent); - debugPanelGroup.setVisibility(View.GONE); - }); - - btnCloseLog.setOnClickListener(v -> { - Intent intent = new Intent("com.mogo.ACTION"); - intent.putExtra("oper", 2); - getContext().sendBroadcast(intent); - debugPanelGroup.setVisibility(View.GONE); - }); - - btnOpenV2XPanel.setOnClickListener(v -> { - Intent intent = new Intent("com.v2x.test_panel_control"); - intent.putExtra("TextPanelOpenStatus", true); - getContext().sendBroadcast(intent); - debugPanelGroup.setVisibility(View.GONE); - }); - - switch (DebugConfig.getObuType()) { - case DebugConfig.OBU_TYPE_CIDI: - rbCidi.setChecked(true); - break; - case DebugConfig.OBU_TYPE_HUALI: - rbHuali.setChecked(true); - break; - default: - rbGohigh.setChecked(true); - break; - } - - rbCidi.setOnClickListener(v -> exchangeObuType(DebugConfig.OBU_TYPE_CIDI)); - rbHuali.setOnClickListener(v -> exchangeObuType(DebugConfig.OBU_TYPE_HUALI)); - rbGohigh.setOnClickListener(v -> exchangeObuType(DebugConfig.OBU_TYPE_GOHIGH)); - - } - - private void exchangeObuType(int obuType) { - SharedPrefsMgr.getInstance(getContext()).putInt("OBU_TYPE", obuType); - DebugConfig.setObuType(obuType); - Intent intent = new Intent("com.mogo.launcher.v2x.action.EXCHANGE_OBU_TYPE"); - intent.putExtra("obuType", obuType); - getContext().sendBroadcast(intent); - } - - private final OnPreventFastClickListener clickListener = new OnPreventFastClickListener() { - @Override - public void onClickImpl(View v) { - if (v.getId() == R.id.module_entrance_id_upload_road_condition) { - // 分享按钮点击 - showShareDialog(); - playShareGuideVoice(); - } else if (v.getId() == R.id.module_ext_id_display_overview) { - // 全览按钮点击 - if (getContext() != null) { - // 加此判断是解决下面setDisplayOverview后,本Fragment回调中出现not attached to a context问题 - if (!mStatusManager.isDisplayOverview()) { - mMApUIController.displayOverview(mDisplayOverviewBounds); - UiThreadHandler.removeCallbacks(mLockCarRunnable); - UiThreadHandler.postDelayed(mLockCarRunnable, 20_000); - } else { - mMApUIController.recoverLockMode(); - UiThreadHandler.removeCallbacks(mLockCarRunnable); - } - mStatusManager.setDisplayOverview(TAG, !mStatusManager.isDisplayOverview()); - } - } else if (v.getId() == R.id.module_entrance_id_move2_current_location) { - // 回到自车位置 - if (mStatusManager.isDisplayOverview()) { - mStatusManager.setDisplayOverview(TAG, false); - UiThreadHandler.removeCallbacks(mLockCarRunnable); - } - if (!mApis.getStatusManagerApi().isVrMode()) { - if (!mApis.getRefreshStrategyControllerApi().restartAutoRefreshAtTime(0)) { - mStatusManager.setUserInteractionStatus(TAG, true, false); - mMApUIController.recoverLockMode(); - } - } else { - mMApUIController.recoverLockMode(); - } - } else if (v.getId() == R.id.module_entrance_id_exit_navi) { - // 退出导航 - if (mMogoNavi != null) { - if (mIsLock) { - new WMDialog.Builder(getContext()) - .setOkButton(R.string.module_commons_button_ok, (dlg, which) -> { - dlg.dismiss(); - mMogoNavi.stopNavi(); - }) - .setCancelButton(R.string.module_commons_button_cancel, - (dlg, which) -> { - dlg.dismiss(); - }) - .setContent(R.string.module_commons_exit_navi_content) - .build() - .show(); - } else { - MapCenterPointStrategy.setMapCenterPointByScene(mMApUIController, Scene.NAVI); - mMApUIController.recoverLockMode(); - } - } - } else if (v.getId() == R.id.module_ext_id_north) { - // 车头朝上 正北朝上 - if (mCameraMode.isSelected()) { - mMApUIController.changeMapMode(EnumMapUI.CarUp_2D); - } else { - mMApUIController.changeMapMode(EnumMapUI.NorthUP_2D); - } - } else if (v.getId() == R.id.module_ext_id_msg) { - // 消息框 - try { - if (mMessageHistoryPanelProvider == null) { - mMessageHistoryPanelProvider = (IFragmentProvider) ARouter.getInstance().build("/push/ui/message").navigation(getContext()); - } - mMessageHistoryPanelProvider.createFragment(getActivity(), mMogoFragmentManager.getMessageHistoryContainerId(), null); - } catch (Exception e) { - e.printStackTrace(); - } - } else if (v.getId() == R.id.module_ext_enter_vr_mode) { - // 进入vr模式 - mMApUIController.changeMapMode(EnumMapUI.Type_VR); - } else if (v.getId() == R.id.module_ext_exit_vr_mode) { - // 退出vr模式 - mMApUIController.changeMapMode(EnumMapUI.CarUp_2D); - } else if (v.getId() == R.id.btnFix) { - // 修改上报时间间隔 - try { - String times = etTimes.getText().toString().trim(); - int fixTime = Integer.parseInt(times); - Logger.d(TAG, "修改上报时间间隔: " + times + " fixTime: " + fixTime); - if (fixTime > 0) { - Intent intent = new Intent("com.mogo.launcher.action.FIX_UPLOAT_DELAY"); - intent.putExtra("fixTime", fixTime); - getContext().sendBroadcast(intent); - TipToast.tip("已经发送修改广播"); - } else { - TipToast.tip("fixTime为0,不发送广播"); - } - } catch (Exception e) { - TipToast.tip("fixTime异常"); - e.printStackTrace(); - } - } else if (v.getId() == R.id.debugPanel) { - // 简易调试面板 - long diff = SystemClock.elapsedRealtime() - lastDebugPanelClickTime; - Logger.d("DebugPanel", "diff: " + diff); - if (diff > 3000) { - debugPanelClickCount = 1; - } else { - debugPanelClickCount++; - } - - lastDebugPanelClickTime = SystemClock.elapsedRealtime(); - - if (debugPanelClickCount == 10) { - // show panel - debugPanelGroup.setVisibility(View.VISIBLE); - } - } - } - }; - } diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntrancePresenter.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntrancePresenter.java index 0c133ce961..356058af17 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntrancePresenter.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntrancePresenter.java @@ -1,33 +1,21 @@ package com.mogo.module.extensions.entrance; -import static com.mogo.module.share.constant.ShareConstants.KEY_SERVER_SHOW_DAY_COUNT; - import android.content.Context; import android.util.ArrayMap; import androidx.annotation.NonNull; import androidx.lifecycle.LifecycleOwner; -import com.alibaba.android.arouter.launcher.ARouter; import com.mogo.cloud.passport.MoGoAiCloudClientConfig; import com.mogo.commons.mvp.Presenter; -import com.mogo.eagle.core.data.constants.MogoServicePaths; -import com.mogo.eagle.core.network.utils.digest.DigestUtils; import com.mogo.eagle.core.utilcode.mogo.logger.Logger; import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr; import com.mogo.module.common.MogoApisHandler; import com.mogo.module.common.constants.HostConst; -import com.mogo.module.extensions.R; import com.mogo.module.extensions.bean.CommonConfig; import com.mogo.module.extensions.bean.CommonConfigResponse; import com.mogo.module.extensions.net.GetConfigApiServices; -import com.mogo.module.extensions.weather.Phenomena; -import com.mogo.module.extensions.weather.WeatherCallback; -import com.mogo.module.extensions.weather.WeatherInfo; -import com.mogo.module.extensions.weather.WeatherModel; import com.mogo.service.network.IMogoNetwork; -import com.mogo.service.statusmanager.IMogoMsgCenter; -import com.mogo.service.statusmanager.IMogoMsgCenterListener; import java.util.Map; @@ -42,85 +30,22 @@ import io.reactivex.schedulers.Schedulers; *

* 描述 */ -public class EntrancePresenter extends Presenter implements WeatherCallback, - IMogoMsgCenterListener { +public class EntrancePresenter extends Presenter { private static final String TAG = "EntrancePresenter"; - private WeatherModel mWeatherModel; - - private IMogoMsgCenter mMsgCenter; - private IMogoNetwork mNetWork; - private Context context; - - private boolean isResumed = false; - public EntrancePresenter(Context context, EntranceView view) { super(view); - this.context = context; - mWeatherModel = new WeatherModel(getContext()); mNetWork = MogoApisHandler.getInstance().getApis().getNetworkApi(); } - @Override - public void onCreate(@NonNull LifecycleOwner owner) { - super.onCreate(owner); - mWeatherModel.init(this); - mWeatherModel.queryWeatherInformation(); - mMsgCenter = - (IMogoMsgCenter) ARouter.getInstance().build(MogoServicePaths.PATH_MSG_CENTER).navigation(); - mMsgCenter.registerMsgCenterListener(this); - } - - @Override - public void onWeatherLoaded(WeatherInfo weatherInfo) { - if (weatherInfo == null) { - return; - } - Phenomena phenomena = Phenomena.getById(weatherInfo.getPhenomena()); - if (phenomena == null) { - return; - } - String temp = - getContext().getResources().getString(R.string.module_ext_str_weather_temp_format - , weatherInfo.getTemperature()); - String desc = phenomena.nameCn; - int resId = phenomena.resId; - mView.renderWeatherInfo(temp, desc, resId); - } - - @Override - public void onMsgChanged(boolean hasMsg, int amount) { - if (mView != null) { - mView.renderMsgInfo(hasMsg, amount); - } - } - @Override public void onResume(@NonNull LifecycleOwner owner) { super.onResume(owner); - isResumed = true; getCommonConfig(); } - @Override - public void onPause(@NonNull LifecycleOwner owner) { - super.onPause(owner); - isResumed = false; - } - - @Override - public void onDestroy(@NonNull LifecycleOwner owner) { - super.onDestroy(owner); - if (mWeatherModel != null) { - mWeatherModel.destroy(); - } - if (mMsgCenter != null) { - mMsgCenter.unregisterMsgCenterListener(this); - } - } - public void getCommonConfig() { Map params = new ArrayMap<>(); params.put("sn", MoGoAiCloudClientConfig.getInstance().getSn()); @@ -137,16 +62,7 @@ public class EntrancePresenter extends Presenter implements Weathe public void onSuccess(CommonConfigResponse config) { Logger.d(TAG, "getCommonConfig onSuccess -----> "); if (config != null && config.result != null) { - CommonConfig.Speech speech = config.result.speech; CommonConfig.ReportStrategy strategy = config.result.reportStrategy; - if (speech != null) { - Logger.d(TAG, - "getCommonConfig onSuccess speech.count = " + speech.count); - SharedPrefsMgr.getInstance(getContext()).putInt(KEY_SERVER_SHOW_DAY_COUNT, speech.count); - } else { - Logger.e(TAG, "getCommonConfig onSuccess speech == null "); - } - if (strategy != null) { Logger.d(TAG, "getCommonConfig onSuccess strategy.open = " + strategy.open); diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceView.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceView.java index 82abc6df6d..389a33207e 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceView.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceView.java @@ -1,8 +1,6 @@ package com.mogo.module.extensions.entrance; -import com.mogo.commons.mvp.IView; import com.mogo.module.extensions.ExtensionsView; -import com.mogo.module.extensions.userinfo.UserInfo; /** * @author congtaowang diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/MogoEntranceButtonControllerImpl.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/MogoEntranceButtonControllerImpl.java deleted file mode 100644 index 29149a4f27..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/MogoEntranceButtonControllerImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.mogo.module.extensions.entrance; - -import android.content.Context; -import android.view.View; -import android.widget.TextView; - -import com.alibaba.android.arouter.facade.annotation.Route; -import com.mogo.eagle.core.data.constants.MogoServicePaths; -import com.mogo.module.extensions.utils.EntranceViewHolder; -import com.mogo.service.entrance.ButtonIndex; -import com.mogo.service.entrance.IMogoEntranceButtonController; - -/** - * @author congtaowang - * @since 2020-04-16 - *

- * 描述 - */ -@Route(path = MogoServicePaths.PATH_ENTRANCE_BUTTON_API) -public class MogoEntranceButtonControllerImpl implements IMogoEntranceButtonController { - - @Override - public TextView getButton(ButtonIndex index) { - return MogoEntranceButtons.getButton(index); - } - - @Override - public void addBottomLayerView(View view, int x, int y) { - EntranceViewHolder.getInstance().addBottomLayerView(view, x, y); - } - - @Override - public void removeBottomLayerView(View view) { - EntranceViewHolder.getInstance().removeBottomLayerView(view); - } - - - @Override - public void showLeftNoticeByType(int noticeType, int iconRes, String content) { - EntranceViewHolder.getInstance().showLeftNoticeByType(noticeType, iconRes, content); - } - - @Override - public void hideLeftNoticeByType(int noticeType) { - EntranceViewHolder.getInstance().hideLeftNoticeByType(noticeType); - } - - @Override - public void init(Context context) { - - } - - @Override - public void addLeftFeatureView(View view) { - EntranceViewHolder.getInstance().addLeftFeatureView(view); - } - - @Override - public void removeLeftFeatureView(View view) { - EntranceViewHolder.getInstance().removeLeftFeatureView(view); - } -} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/MogoEntranceButtons.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/MogoEntranceButtons.java deleted file mode 100644 index e0ff5e482e..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/MogoEntranceButtons.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.mogo.module.extensions.entrance; - -import android.widget.TextView; - -import com.mogo.service.entrance.ButtonIndex; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author congtaowang - * @since 2020-04-16 - *

- * 描述 - */ -public class MogoEntranceButtons { - - private static final Map< ButtonIndex, TextView > sButtons = new HashMap<>(); - - public static void save( ButtonIndex index, TextView btn ) { - sButtons.put( index, btn ); - } - - public static TextView getButton( ButtonIndex index ) { - return sButtons.get( index ); - } - - public static void clear() { - sButtons.clear(); - } -} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/UploadButtonAnimatorController.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/UploadButtonAnimatorController.java deleted file mode 100644 index 9e2525370c..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/UploadButtonAnimatorController.java +++ /dev/null @@ -1,130 +0,0 @@ -package com.mogo.module.extensions.entrance; - -import android.os.Handler; -import android.os.Looper; -import android.os.Message; -import android.view.View; -import android.widget.ImageView; -import android.widget.TextView; - -import androidx.annotation.DrawableRes; - -import com.mogo.module.extensions.R; -import com.mogo.service.statusmanager.IMogoStatusManager; - -public -/** - * @author congtaowang - * @since 2020/7/16 - * - * 上传按钮动画 - */ -class UploadButtonAnimatorController { - - private static final String TAG = "UploadButtonAnimator"; - - private ImageView mUploading; - private TextView mUpload; - private IMogoStatusManager mStatusManager; - - private int mCurrentUploadFrame = 0; - public static final int MSG_FRAME_ANIM = 307; - public static final int MSG_STOP_ANIM = 308; - public static final long TIME_FRAME_INTERVAL_TIME = 80; - - private Handler mUploadFrameAnimHandler = new Handler( Looper.getMainLooper() ) { - @Override - public void handleMessage( Message msg ) { - super.handleMessage( msg ); - if ( msg.what == MSG_FRAME_ANIM ) { - if ( mUploadingFrameRes == null || mUploadingFrameRes.length == 0 ) { - if ( mUploading != null ) { - mUploading.setVisibility( View.GONE ); - } - if ( mUpload != null ) { - mUpload.setVisibility( View.VISIBLE ); - } - return; - } - if ( !mStatusManager.isUploading() ) { - mCurrentUploadFrame = 0; - return; - } - if ( mUploading != null ) { - if ( mCurrentUploadFrame == mUploadingFrameRes.length ) { - mCurrentUploadFrame = 12; - } - mUploading.setImageResource( mUploadingFrameRes[mCurrentUploadFrame++ % mUploadingFrameRes.length] ); - } - mUploadFrameAnimHandler.sendEmptyMessageDelayed( MSG_FRAME_ANIM, - TIME_FRAME_INTERVAL_TIME ); - } else if ( msg.what == MSG_STOP_ANIM ) { - mStatusManager.setUploadingStatus( TAG, false ); - } - } - }; - - @DrawableRes - private int[] mUploadingFrameRes = { - R.drawable.module_ext_ic_uploading_00000, - R.drawable.module_ext_ic_uploading_00001, - R.drawable.module_ext_ic_uploading_00002, - R.drawable.module_ext_ic_uploading_00003, - R.drawable.module_ext_ic_uploading_00004, - R.drawable.module_ext_ic_uploading_00005, - R.drawable.module_ext_ic_uploading_00006, - R.drawable.module_ext_ic_uploading_00007, - R.drawable.module_ext_ic_uploading_00008, - R.drawable.module_ext_ic_uploading_00009, - R.drawable.module_ext_ic_uploading_00010, - R.drawable.module_ext_ic_uploading_00011, - R.drawable.module_ext_ic_uploading_00012, - R.drawable.module_ext_ic_uploading_00013, - R.drawable.module_ext_ic_uploading_00014, - R.drawable.module_ext_ic_uploading_00015, - R.drawable.module_ext_ic_uploading_00016, - R.drawable.module_ext_ic_uploading_00017, - R.drawable.module_ext_ic_uploading_00018, - R.drawable.module_ext_ic_uploading_00019, - R.drawable.module_ext_ic_uploading_00020, - R.drawable.module_ext_ic_uploading_00021, - R.drawable.module_ext_ic_uploading_00022, - R.drawable.module_ext_ic_uploading_00023, - R.drawable.module_ext_ic_uploading_00024, - R.drawable.module_ext_ic_uploading_00025, - R.drawable.module_ext_ic_uploading_00026, - R.drawable.module_ext_ic_uploading_00027, - R.drawable.module_ext_ic_uploading_00028, - R.drawable.module_ext_ic_uploading_00029, - R.drawable.module_ext_ic_uploading_00030, - R.drawable.module_ext_ic_uploading_00031, - R.drawable.module_ext_ic_uploading_00032, - R.drawable.module_ext_ic_uploading_00033, - R.drawable.module_ext_ic_uploading_00034, - R.drawable.module_ext_ic_uploading_00035, - R.drawable.module_ext_ic_uploading_00036, - R.drawable.module_ext_ic_uploading_00037, - R.drawable.module_ext_ic_uploading_00038, - R.drawable.module_ext_ic_uploading_00039, - R.drawable.module_ext_ic_uploading_00040 - }; - - public UploadButtonAnimatorController( ImageView mUploading, TextView mUpload, IMogoStatusManager mStatusManager ) { - this.mUploading = mUploading; - this.mUpload = mUpload; - this.mStatusManager = mStatusManager; - } - - public void doFrameAnimOnUploadButton() { - mUploadFrameAnimHandler.removeMessages( MSG_STOP_ANIM ); - mUploadFrameAnimHandler.removeMessages( MSG_FRAME_ANIM ); - mUploadFrameAnimHandler.sendEmptyMessage( MSG_FRAME_ANIM ); - // 30s 后无论成功与否,停止动画 - mUploadFrameAnimHandler.sendEmptyMessageDelayed( MSG_STOP_ANIM, 30_000 ); - } - - public void stopAnimation() { - mCurrentUploadFrame = 0; - mUploadFrameAnimHandler.removeMessages( MSG_FRAME_ANIM ); - } -} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/CameraWindow3DAdapter.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/CameraWindow3DAdapter.java index d87fcb9e0f..8ce7638f14 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/CameraWindow3DAdapter.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/CameraWindow3DAdapter.java @@ -6,11 +6,7 @@ import android.view.View; import com.mogo.map.marker.IMogoInfoWindowAdapter; import com.mogo.map.marker.IMogoMarker; import com.mogo.map.marker.MogoMarkerOptions; -import com.mogo.module.common.drawer.marker.IMarkerView; import com.mogo.module.common.drawer.marker.MapCameraInfoView; -import com.mogo.module.common.drawer.marker.MapMarkerAdapter; -import com.mogo.module.common.drawer.marker.MapMarkerView; -import com.mogo.module.common.entity.MarkerShowEntity; /** * @author lixiaopeng diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/ExtensionServiceManager.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/ExtensionServiceManager.java index 7388ed8a5b..65f011fa6c 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/ExtensionServiceManager.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/ExtensionServiceManager.java @@ -2,18 +2,10 @@ package com.mogo.module.extensions.live; import android.content.Context; -import com.mogo.map.navi.IMogoNavi; -import com.mogo.module.common.MogoApisHandler; -import com.mogo.service.IMogoServiceApis; -import com.mogo.service.map.IMogoMapService; - public class ExtensionServiceManager { private static boolean isInit; private static Context mContext; - private static IMogoServiceApis mMogoServiceApis; - private static IMogoMapService mMapService; - private static IMogoNavi mNavi; private ExtensionServiceManager() { @@ -23,10 +15,6 @@ public class ExtensionServiceManager { if (!isInit) { isInit = true; mContext = context; - mMogoServiceApis = MogoApisHandler.getInstance().getApis(); - - mMapService = mMogoServiceApis.getMapServiceApi(); - mNavi = mMapService.getNavi(context); } } @@ -34,9 +22,5 @@ public class ExtensionServiceManager { return mContext; } - public static IMogoNavi getNavi() { - return mNavi; - } - } diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/impl/ICameraWindow.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/impl/ICameraWindow.java index a36f027d0e..7fa5153d73 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/impl/ICameraWindow.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/impl/ICameraWindow.java @@ -2,8 +2,6 @@ package com.mogo.module.extensions.live.impl; import android.view.View; -import com.mogo.module.extensions.live.listener.CameraLiveWindowStatusListener; - public interface ICameraWindow { /** diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/listener/CameraLiveWindowStatusListener.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/listener/CameraLiveWindowStatusListener.java deleted file mode 100644 index 8334977555..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/listener/CameraLiveWindowStatusListener.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.mogo.module.extensions.live.listener; - - -public interface CameraLiveWindowStatusListener { - void onViewShow(); - void onViewClose(); -} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/navi/AnimNavInfoView.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/navi/AnimNavInfoView.java deleted file mode 100644 index dd684e1146..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/navi/AnimNavInfoView.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.mogo.module.extensions.navi; - -import android.content.Context; -import android.transition.TransitionManager; -import android.util.AttributeSet; -import android.util.TypedValue; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ImageView; -import android.widget.TextView; - -import androidx.constraintlayout.widget.ConstraintSet; -import androidx.constraintlayout.widget.Group; - -import com.mogo.eagle.core.utilcode.util.LaunchUtils; -import com.mogo.map.navi.MogoNaviInfo; -import com.mogo.module.common.MogoApisHandler; -import com.mogo.module.common.view.OnPreventFastClickListener; -import com.mogo.module.extensions.R; - -import java.util.HashMap; -import java.util.Map; - -/** - * 带动画的导航框 - * - * @author tongchenfei - */ -public class AnimNavInfoView extends BaseNaviInfoView { - private final ImageView turnIcon; - private final TextView distance; - private final TextView distanceUnit; - private final TextView nextRoad; - - private final TextView remainingDistance; - private final TextView remainingDistanceUnit; - private final TextView remainingTime; - private final TextView remainingTimeUnit; - private final TextView arriveTime; - - private final View naviBg; - - private final TextView tvDestinationOnlineCar; - - private final Group remainTimeGroup, remainDistanceGroup, arriveTimeGroup; - - private final ConstraintSet constraintSet = new ConstraintSet(); - - public AnimNavInfoView(Context context) { - this(context, null); - } - - public AnimNavInfoView(Context context, AttributeSet attrs) { - this(context, attrs, 0); - } - - public AnimNavInfoView(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - LayoutInflater.from(context).inflate(R.layout.include_navi_info_panle, this); - - naviBg = findViewById(R.id.module_map_id_navi_bg); - - turnIcon = findViewById(R.id.module_map_id_navi_next_info_road_turn_icon); - distance = findViewById(R.id.module_map_id_navi_next_info_distance); - distanceUnit = findViewById(R.id.module_map_id_navi_next_info_distance_unit); - nextRoad = findViewById(R.id.module_map_id_navi_next_info_road); - - remainingDistance = findViewById(R.id.module_map_id_remaining_distance); - remainingDistanceUnit = findViewById(R.id.module_map_id_remaining_distance_unit); - remainingTime = findViewById(R.id.module_map_id_remaining_time); - remainingTimeUnit = findViewById(R.id.module_map_id_remaining_time_unit); - arriveTime = findViewById(R.id.module_map_id_arrive_time); - - remainTimeGroup = findViewById(R.id.remainTimeGroup); - remainDistanceGroup = findViewById(R.id.remainDistanceGroup); - arriveTimeGroup = findViewById(R.id.arriveTimeGroup); - - tvDestinationOnlineCar = findViewById(R.id.module_ext_id_destination_online_car); - - if ( tvDestinationOnlineCar != null ) { - tvDestinationOnlineCar.setOnClickListener(new OnPreventFastClickListener() { - @Override - public void onClickImpl(View v) { - MogoApisHandler.getInstance().getApis().getOnlineCarPanelApi().showPanel(); - Map properties = new HashMap<>(); - properties.put("type", 1); - MogoApisHandler.getInstance().getApis().getAnalyticsApi().track("APP_Find_Mogoer", properties); - } - }); - } - - naviBg.setOnClickListener(new OnPreventFastClickListener() { - @Override - public void onClickImpl(View v) { - try { - LaunchUtils.launchByPkg(getContext(), "com.autonavi.amapauto"); - } catch (Exception e) { - e.printStackTrace(); - } - } - }); - } - - @Override - public boolean isVisible() { - return getVisibility() == View.VISIBLE; - } - - - @Override - public void notifyChanged(MogoNaviInfo naviInfo) { - if (naviInfo == null) { - return; - } - fillNextCrossDistance(distance, distanceUnit, naviInfo.getCurStepRetainDistance()); - fillNextCrossIconType(turnIcon, naviInfo.getIconResId()); - nextRoad.setText(naviInfo.getNextRoadName()); - - remainingDistance.setText(getFormatSurplusDistance(naviInfo.getPathRetainDistance())); - remainingDistanceUnit.setText(getFormatSurplusDistanceUnit()); - - remainingTime.setText(getFormatSurplusTime(naviInfo.getPathRetainTime())); - remainingTimeUnit.setText(getFormatSurplusTimeUnit()); - - arriveTime.setText(getArriveTime(naviInfo.getPathRetainTime())); - } - - public void exchangeToSmall(boolean smooth) { - if (!isVisible()) { - return; - } - if (smooth) { - TransitionManager.beginDelayedTransition(this); - } - remainDistanceGroup.setVisibility(View.GONE); - remainTimeGroup.setVisibility(View.GONE); - arriveTimeGroup.setVisibility(View.GONE); - distance.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimensionPixelSize(R.dimen.module_ext_navi_info_panel_next_info_distance_textSize_small)); - distanceUnit.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimensionPixelSize(R.dimen.module_ext_navi_info_panel_next_info_distance_unit_textSize_small)); - - // 调整约束 - constraintSet.clone(this); - constraintSet.connect(distance.getId(), ConstraintSet.BOTTOM, - turnIcon.getId(), ConstraintSet.BOTTOM); - constraintSet.connect(turnIcon.getId(), ConstraintSet.LEFT, - naviBg.getId(), ConstraintSet.LEFT, - getResources().getDimensionPixelSize(R.dimen.module_ext_navi_info_panel_turn_icon_small_marginLeft)); - constraintSet.connect(nextRoad.getId(), ConstraintSet.BOTTOM, - distance.getId(), ConstraintSet.BOTTOM, - getResources().getDimensionPixelSize(R.dimen.module_map_id_navi_next_info_road_marginBottom_small)); - constraintSet.connect(nextRoad.getId(), ConstraintSet.LEFT, - R.id.module_map_id_navi_next_info_turn_info, ConstraintSet.RIGHT, - getResources().getDimensionPixelSize(R.dimen.dp_46)); - constraintSet.clear(turnIcon.getId(), ConstraintSet.TOP); - constraintSet.connect(turnIcon.getId(), ConstraintSet.BOTTOM, - naviBg.getId(), ConstraintSet.BOTTOM, - getResources().getDimensionPixelSize(R.dimen.module_ext_navi_info_turn_icon_margin_bottom)); - - // 目的地车友 - constraintSet.clear(tvDestinationOnlineCar.getId(), ConstraintSet.LEFT); - constraintSet.clear(tvDestinationOnlineCar.getId(), ConstraintSet.TOP); - constraintSet.connect(tvDestinationOnlineCar.getId(), - ConstraintSet.BOTTOM, naviBg.getId(), ConstraintSet.BOTTOM, - getResources().getDimensionPixelSize(R.dimen.module_ext_navi_small_margin_bottom)); - constraintSet.connect(tvDestinationOnlineCar.getId(), - ConstraintSet.RIGHT, naviBg.getId(), ConstraintSet.RIGHT, - getResources().getDimensionPixelSize(R.dimen.module_ext_navi_small_margin_right)); - - constraintSet.applyTo(this); - - turnIcon.getLayoutParams().height = - getResources().getDimensionPixelSize(R.dimen.module_ext_navi_info_panel_turn_icon_small_height); - turnIcon.getLayoutParams().width = - getResources().getDimensionPixelSize(R.dimen.module_ext_navi_info_panel_turn_icon_small_width); - naviBg.getLayoutParams().height = - getResources().getDimensionPixelSize(R.dimen.module_ext_navi_info_panel_small_height); - - tvDestinationOnlineCar.getLayoutParams().height = - getResources().getDimensionPixelSize(R.dimen.module_ext_button_height_small); - - tvDestinationOnlineCar.setBackgroundResource(R.drawable.module_ext_dw_navi_info_panel_small_bkg); - - } - - public void exchangeToBig(boolean smooth) { - if (!isVisible()) { - return; - } - if (smooth) { - TransitionManager.beginDelayedTransition(this); - } - - remainDistanceGroup.setVisibility(View.VISIBLE); - remainTimeGroup.setVisibility(View.VISIBLE); - arriveTimeGroup.setVisibility(View.VISIBLE); - distance.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimensionPixelSize(R.dimen.module_ext_navi_info_panel_next_info_distance_textSize)); - distanceUnit.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimensionPixelSize(R.dimen.module_ext_navi_info_panel_next_info_distance_unit_textSize)); - - // 调整约束 - constraintSet.clone(this); - constraintSet.clear(distance.getId(), ConstraintSet.BOTTOM); - constraintSet.connect(turnIcon.getId(), ConstraintSet.LEFT, - naviBg.getId(), ConstraintSet.LEFT, - getResources().getDimensionPixelSize(R.dimen.module_ext_navi_info_panel_turn_icon_marginLeft)); - constraintSet.connect(nextRoad.getId(), ConstraintSet.BOTTOM, turnIcon.getId(), - ConstraintSet.BOTTOM); - constraintSet.connect(nextRoad.getId(), ConstraintSet.LEFT, - distance.getId(), ConstraintSet.LEFT, - 0); - constraintSet.connect(turnIcon.getId(), ConstraintSet.TOP, naviBg.getId(), - ConstraintSet.TOP, 0); - constraintSet.connect(turnIcon.getId(), ConstraintSet.BOTTOM, - naviBg.getId(), ConstraintSet.BOTTOM, 0); - - // 目的地车友 - constraintSet.clear(tvDestinationOnlineCar.getId(), ConstraintSet.RIGHT); - constraintSet.clear(tvDestinationOnlineCar.getId(), ConstraintSet.BOTTOM); - constraintSet.connect(tvDestinationOnlineCar.getId(), ConstraintSet.LEFT, - naviBg.getId(), ConstraintSet.LEFT); - constraintSet.connect(tvDestinationOnlineCar.getId(), ConstraintSet.TOP, - naviBg.getId(), ConstraintSet.BOTTOM, - getResources().getDimensionPixelSize(R.dimen.module_ext_camera_button_marginTop)); - constraintSet.applyTo(this); - - turnIcon.getLayoutParams().height = - getResources().getDimensionPixelSize(R.dimen.module_ext_navi_info_panel_turn_icon_height); - turnIcon.getLayoutParams().width = - getResources().getDimensionPixelSize(R.dimen.module_ext_navi_info_panel_turn_icon_width); - naviBg.getLayoutParams().height = - getResources().getDimensionPixelSize(R.dimen.module_ext_navi_info_panel_height); - tvDestinationOnlineCar.getLayoutParams().height = - getResources().getDimensionPixelSize(R.dimen.module_ext_button_height); - tvDestinationOnlineCar.setBackgroundResource(R.drawable.module_ext_dw_navi_info_panel_bkg); - - } -} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/navi/BaseNaviInfoView.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/navi/BaseNaviInfoView.java deleted file mode 100644 index b807d7f67e..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/navi/BaseNaviInfoView.java +++ /dev/null @@ -1,162 +0,0 @@ -package com.mogo.module.extensions.navi; - -import android.content.Context; -import android.util.AttributeSet; -import android.view.View; -import android.widget.ImageView; -import android.widget.TextView; - -import androidx.constraintlayout.widget.ConstraintLayout; - -import com.mogo.map.navi.MogoNaviInfo; - -import java.text.SimpleDateFormat; -import java.util.Calendar; - -/** - * @author congtaowang - * @since 2019-10-03 - *

- * 描述 - */ -public abstract class BaseNaviInfoView extends ConstraintLayout { - public BaseNaviInfoView(Context context) { - this(context,null); - } - - public BaseNaviInfoView(Context context, AttributeSet attrs) { - this(context, attrs, 0); - } - - public BaseNaviInfoView(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - } - - public abstract void notifyChanged(MogoNaviInfo naviInfo ); - - protected void fillNextCrossIconType( ImageView target, int iconId ) { - if ( iconId > 0 ) { - target.setImageResource( iconId ); - } - } - - protected void fillNextCrossDistance( TextView target, TextView unit, int distance ) { - if ( distance >= 1000 ) { - target.setText( String.format( "%.1f", distance / 1000f ) ); - unit.setText( "公里" ); - } else { - target.setText( distance + "" ); - unit.setText( "米" ); - } - } - - protected void fillFormatSurplusDistance( int m, StringBuilder builder ) { - if ( m >= 1000 ) { - builder.append( String.format( "%.1f公里", m / 1000f ) ); - } else { - builder.append( m ).append( "米" ); - } - } - - protected String getFormatSurplusDistance( int m ) { - if ( m >= 1000 ) { - mFormatSurplusDistanceUnit = "公里"; - return String.format( "%.1f", m / 1000f ); - } else { - mFormatSurplusDistanceUnit = "米"; - return String.format( "%d", m ); - } - } - - private String mFormatSurplusDistanceUnit = ""; - - protected String getFormatSurplusDistanceUnit() { - return mFormatSurplusDistanceUnit; - } - - protected String getFormatSurplusTime( int seconds ) { - if ( seconds > 60 * 60 ) { - mFormatSurplusTimeUnit = "小时"; - return String.format( "%.1f", ( ( float ) seconds ) / ( 60 * 60 ) ); - } - - if ( seconds > 60 ) { - mFormatSurplusTimeUnit = "分钟"; - return String.format( "%.1f", ( ( float ) seconds ) / 60 ); - } - - mFormatSurplusTimeUnit = "秒"; - return String.format( "%d", seconds ); - } - - private String mFormatSurplusTimeUnit = ""; - - protected String getFormatSurplusTimeUnit() { - return mFormatSurplusTimeUnit; - } - - protected void fillFormatTime( int seconds, StringBuilder builder ) { - int days = seconds / ( 24 * 60 * 60 ); - if ( days > 0 ) { - builder.append( days ).append( "天" ); - } - seconds -= days * 24 * 60 * 60; - int hours = seconds / ( 60 * 60 ); - if ( hours > 0 ) { - builder.append( hours ).append( "小时" ); - } - seconds -= hours * 60 * 60; - int min = seconds / 60; - builder.append( min > 1 ? min : 1 ).append( "分钟" ); - } - - protected String getArriveTime( int seconds ) { - int days = seconds / ( 24 * 60 * 60 ); - if ( days > 0 ) { - return String.format( "%d天后", days ); - } else { - seconds -= days * 24 * 60 * 60; - int hours = seconds / ( 60 * 60 ); - seconds -= hours * 60 * 60; - int min = seconds / 60; - Calendar calendar = Calendar.getInstance(); - int curHour = calendar.get( Calendar.HOUR_OF_DAY ); - int curMin = calendar.get( Calendar.MINUTE ); - if ( curHour + hours + ( curMin + min ) / 60 > 24 ) { - return "一天后"; - } else { - calendar.add( Calendar.HOUR_OF_DAY, hours ); - calendar.add( Calendar.MINUTE, min ); - SimpleDateFormat dateFormat = new SimpleDateFormat( "HH:mm" ); - return dateFormat.format( calendar.getTime() ); - } - } - } - - protected void fillArriveTime( int seconds, StringBuilder builder ) { - - int days = seconds / ( 24 * 60 * 60 ); - if ( days > 0 ) { - builder.append( days ).append( "天后" ); - } else { - seconds -= days * 24 * 60 * 60; - int hours = seconds / ( 60 * 60 ); - seconds -= hours * 60 * 60; - int min = seconds / 60; - Calendar calendar = Calendar.getInstance(); - int curHour = calendar.get( Calendar.HOUR_OF_DAY ); - int curMin = calendar.get( Calendar.MINUTE ); - if ( curHour + hours + ( curMin + min ) / 60 > 24 ) { - builder.append( "一天后" ); - } else { - calendar.add( Calendar.HOUR_OF_DAY, hours ); - calendar.add( Calendar.MINUTE, min ); - SimpleDateFormat dateFormat = new SimpleDateFormat( "HH:mm" ); - builder.append( dateFormat.format( calendar.getTime() ) ); - } - } - builder.append( "到达" ); - } - - public abstract boolean isVisible(); -} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/navi/NaviInfoView.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/navi/NaviInfoView.java deleted file mode 100644 index 8d7f08e5a4..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/navi/NaviInfoView.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.mogo.module.extensions.navi; - -import android.content.Context; -import android.util.AttributeSet; -import android.view.View; -import android.widget.ImageView; -import android.widget.TextView; - -import com.mogo.map.navi.MogoNaviInfo; -import com.mogo.module.extensions.R; - -/** - * @author congtaowang - * @since 2019-09-29 - *

- * 导航信息 - * - * @deprecated 已经废弃 - */ -@Deprecated -public class NaviInfoView extends BaseNaviInfoView { - - private ImageView turnIcon; - private TextView distance; - private TextView distanceUnit; - private TextView nextRoad; - - private TextView remainingDistance; - private TextView remainingDistanceUnit; - private TextView remainingTime; - private TextView remainingTimeUnit; - private TextView arriveTime; - - public NaviInfoView(Context context) { - this(context,null); - } - - public NaviInfoView(Context context, AttributeSet attrs) { - this(context, attrs,0); - } - - public NaviInfoView(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - } - -// public NaviInfoView(View view) { -// super(view); -// turnIcon = view.findViewById( R.id.module_map_id_navi_next_info_road_turn_icon ); -// distance = view.findViewById( R.id.module_map_id_navi_next_info_distance ); -// distanceUnit = view.findViewById( R.id.module_map_id_navi_next_info_distance_unit ); -// nextRoad = view.findViewById( R.id.module_map_id_navi_next_info_road ); -// -// remainingDistance = view.findViewById( R.id.module_map_id_remaining_distance ); -// remainingDistanceUnit = view.findViewById( R.id.module_map_id_remaining_distance_unit ); -// remainingTime = view.findViewById( R.id.module_map_id_remaining_time ); -// remainingTimeUnit = view.findViewById( R.id.module_map_id_remaining_time_unit ); -// arriveTime = view.findViewById( R.id.module_map_id_arrive_time ); -// } - - @Override - public boolean isVisible() { - return turnIcon != null && turnIcon.getVisibility() == View.VISIBLE; - } - - - @Override - public void notifyChanged( MogoNaviInfo naviInfo ) { - if ( naviInfo == null ) { - return; - } - fillNextCrossDistance( distance, distanceUnit, naviInfo.getCurStepRetainDistance() ); - fillNextCrossIconType( turnIcon, naviInfo.getIconResId() ); - nextRoad.setText( naviInfo.getNextRoadName() ); - - remainingDistance.setText( getFormatSurplusDistance( naviInfo.getPathRetainDistance() ) ); - remainingDistanceUnit.setText( getFormatSurplusDistanceUnit() ); - - remainingTime.setText( getFormatSurplusTime( naviInfo.getPathRetainTime() ) ); - remainingTimeUnit.setText( getFormatSurplusTimeUnit() ); - - arriveTime.setText( getArriveTime( naviInfo.getPathRetainTime() ) ); - } -} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/net/NetApiServices.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/net/NetApiServices.java deleted file mode 100644 index 6a553dd22b..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/net/NetApiServices.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.mogo.module.extensions.net; - -import com.mogo.module.extensions.weather.WebWeatherData; - -import io.reactivex.Observer; -import retrofit2.http.GET; -import retrofit2.http.Query; - -/** - * @author congtaowang - * @since 2020-01-07 - *

- * 描述 - */ -public interface NetApiServices { - - /** - * 天气接口 - * - * @param area 城市Id - * @return - */ - @GET( "/common/?type=observe&key=a2c37c5b84a29761bf0abf8b98e6b708" ) - Observer< WebWeatherData > requestWeatherData( @Query( "area" ) String area ); -} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/net/UserInfoNetApiServices.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/net/UserInfoNetApiServices.java deleted file mode 100644 index 024f358f4e..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/net/UserInfoNetApiServices.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.mogo.module.extensions.net; - -import com.mogo.module.extensions.userinfo.UserInfoResponse; - -import java.util.Map; - -import io.reactivex.Observable; -import io.reactivex.Single; -import retrofit2.http.GET; -import retrofit2.http.QueryMap; - -/** - * 个人信息的获取api接口,baseUrl跟其他不太一样 - * - * @author tongchenfei - */ -public interface UserInfoNetApiServices { - /** - * 获取用户个人信息 - * @param params 参数 - * @return Observer - */ - @GET("carlife/carMachine/getAccountInfo") - Single requestUserInfo(@QueryMap Map params); -} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/userinfo/Address.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/userinfo/Address.java deleted file mode 100644 index 7b197b2223..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/userinfo/Address.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.mogo.module.extensions.userinfo; - -/** - * 用户的家和公司位置信息封装,用于接口获取 - * - * @author tongchenfei - */ -public class Address { - private String companyAddress; - private String homeAddress; - - public String getCompanyAddress() { - return companyAddress; - } - - public void setCompanyAddress(String companyAddress) { - this.companyAddress = companyAddress; - } - - public String getHomeAddress() { - return homeAddress; - } - - public void setHomeAddress(String homeAddress) { - this.homeAddress = homeAddress; - } -} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/userinfo/UserInfo.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/userinfo/UserInfo.java deleted file mode 100644 index 4a0fffd814..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/userinfo/UserInfo.java +++ /dev/null @@ -1,113 +0,0 @@ -package com.mogo.module.extensions.userinfo; - -/** - * 用户的个人信息 - * - * @author tongchenfei - */ -public class UserInfo { - private String userId; - - private String phone; - - private String displayName; - - private Address additionalOne; - - private String headImgurl; - - private int ownerAuthState; - - private int score; - - private String memberLevel; - - private String activeTime; - - public String getUserId() { - return userId; - } - - public void setUserId(String userId) { - this.userId = userId; - } - - public String getPhone() { - return phone; - } - - public void setPhone(String phone) { - this.phone = phone; - } - - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - public Address getAdditionalOne() { - return additionalOne; - } - - public void setAdditionalOne(Address additionalOne) { - this.additionalOne = additionalOne; - } - - public String getHeadImgurl() { - return headImgurl; - } - - public void setHeadImgurl(String headImgurl) { - this.headImgurl = headImgurl; - } - - public int getOwnerAuthState() { - return ownerAuthState; - } - - public void setOwnerAuthState(int ownerAuthState) { - this.ownerAuthState = ownerAuthState; - } - - public int getScore() { - return score; - } - - public void setScore(int score) { - this.score = score; - } - - public String getMemberLevel() { - return memberLevel; - } - - public void setMemberLevel(String memberLevel) { - this.memberLevel = memberLevel; - } - - public String getActiveTime() { - return activeTime; - } - - public void setActiveTime(String activeTime) { - this.activeTime = activeTime; - } - - @Override - public String toString() { - return "UserInfo{" + - "userId='" + userId + '\'' + - ", phone='" + phone + '\'' + - ", displayName='" + displayName + '\'' + - ", additionalOne=" + additionalOne + - ", headImgurl='" + headImgurl + '\'' + - ", ownerAuthState=" + ownerAuthState + - ", score=" + score + - ", memberLevel='" + memberLevel + '\'' + - ", activeTime='" + activeTime + '\'' + - '}'; - } -} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/userinfo/UserInfoResponse.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/userinfo/UserInfoResponse.java deleted file mode 100644 index 52be691f49..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/userinfo/UserInfoResponse.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.mogo.module.extensions.userinfo; - -/** - * 用户信息响应封装类 - * - * @author tongchenfei - */ -public class UserInfoResponse { - private String errmsg; - private int errno; - private UserInfo result; - - public String getErrmsg() { - return errmsg; - } - - public void setErrmsg(String errmsg) { - this.errmsg = errmsg; - } - - public int getErrno() { - return errno; - } - - public void setErrno(int errno) { - this.errno = errno; - } - - public UserInfo getResult() { - return result; - } - - public void setResult(UserInfo result) { - this.result = result; - } -} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/CameraLiveNoticeHelper.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/CameraLiveNoticeHelper.java index 979797eb29..34024a2db7 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/CameraLiveNoticeHelper.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/CameraLiveNoticeHelper.java @@ -63,16 +63,6 @@ public class CameraLiveNoticeHelper implements IMogoCloudOnMsgListener { mContext = null; } - public void enterVrMode() { - Logger.d(TAG, "进入vr模式========="); - isVrMode = true; - } - - public void exitVrMode() { - Logger.d(TAG, "退出vr模式========="); - isVrMode = false; - } - /** * PushRoadConditionDrawer * vr模式 diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/EntranceViewHolder.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/EntranceViewHolder.java deleted file mode 100644 index 3da7e1e378..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/EntranceViewHolder.java +++ /dev/null @@ -1,287 +0,0 @@ -package com.mogo.module.extensions.utils; - -import static com.mogo.service.entrance.IMogoEntranceButtonController.NOTICE_TYPE_SEEK_HELP; - -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.FrameLayout; -import android.widget.ImageView; -import android.widget.TextView; - -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; -import com.mogo.module.common.MogoApisHandler; -import com.mogo.module.extensions.R; -import com.mogo.module.extensions.bean.BottomLayerViewWrapper; -import com.mogo.service.windowview.IMogoEntranceViewListener; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -/** - * 入口页view管理 - * - * @author tongchenfei - */ -public class EntranceViewHolder { - private static final String TAG = "EntranceViewHolder"; - - private EntranceViewHolder() { - } - - private volatile static EntranceViewHolder instance = null; - - public static EntranceViewHolder getInstance() { - if (instance == null) { - synchronized (EntranceViewHolder.class) { - if (instance == null) { - instance = new EntranceViewHolder(); - } - } - } - return instance; - } - - private final List preAddView = new ArrayList<>(); - private final List leftFeaturePreAddView = new ArrayList<>(); - private View preAddLeftNoticeView = null; - - private ViewGroup rootViewGroup = null; - private ViewGroup featureViewGroup = null; - private ViewGroup leftNoticeContainer = null; - - public void initRootViewGroup(View rootView) { - Logger.i(TAG, "initRootViewGroup=="); - if (rootView instanceof ViewGroup) { - Logger.d(TAG, "initRootViewGroup 赋值"); - rootViewGroup = (ViewGroup) rootView.getParent(); - leftNoticeContainer = - rootView.findViewById(R.id.module_ext_vr_mode_left_notice_container); - featureViewGroup = rootView.findViewById(R.id.module_entrance_id_buttons_container); - if (!preAddView.isEmpty()) { - Logger.d(TAG, "initRootViewGroup 增加底层view: " + preAddView.size()); - Iterator iterator = preAddView.iterator(); - while (iterator.hasNext()) { - BottomLayerViewWrapper wrapper = iterator.next(); - realAddView(wrapper); - iterator.remove(); - } - } - if (!leftFeaturePreAddView.isEmpty()) { - Logger.d(TAG, "initRootViewGroup 增加左下角FeatureView: " + leftFeaturePreAddView.size()); - for (View view : leftFeaturePreAddView) { - featureViewGroup.addView(view); - } - } - if (preAddLeftNoticeView != null) { - realShowLeftNoticeView(preAddLeftNoticeView); - } - } - } - - public void addBottomLayerView(View view) { - Logger.d(TAG, "addBottomLayerView, rootViewGroup is null: " + (rootViewGroup == null)); - addBottomLayerView(view, 0, 0); - } - - public void addBottomLayerView(View view, int x, int y) { - Logger.d(TAG, "addBottomLayerView, rootViewGroup is null: " + (rootViewGroup == null) + - "\n x: " + x + ", y: " + y); - BottomLayerViewWrapper wrapper = new BottomLayerViewWrapper(view, x, y); - if (rootViewGroup == null) { - if (!preAddView.contains(wrapper)) { - preAddView.add(wrapper); - } - } else { - if (!containView(view)) { - realAddView(wrapper); - } - } - } - - private boolean containView(View view) { - int count = rootViewGroup.getChildCount(); - for (int i = 0; i < count; i++) { - if (rootViewGroup.getChildAt(i).equals(view)) { - return true; - } - } - return false; - } - - private boolean containFeatureView(View view) { - int count = featureViewGroup.getChildCount(); - for (int i = 0; i < count; i++) { - if (featureViewGroup.getChildAt(i).equals(view)) { - return true; - } - } - return false; - } - - /** - * 使用的时候需要预先判断rootViewGroup是否为空,本方法默认rootViewGroup不为空 - */ - private void realAddView(BottomLayerViewWrapper wrapper) { - FrameLayout.LayoutParams params = - new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, - FrameLayout.LayoutParams.WRAP_CONTENT); - params.topMargin = wrapper.getY(); - params.leftMargin = wrapper.getX(); - View v = wrapper.getView(); - v.setLayoutParams(params); - rootViewGroup.addView(v, 0); - // rootViewGroup.setBackgroundColor(Color.WHITE); - } - - public void removeBottomLayerView(View view) { - if (rootViewGroup != null) { - rootViewGroup.removeView(view); - } - Iterator iterator = preAddView.iterator(); - while (iterator.hasNext()) { - BottomLayerViewWrapper wrapper = iterator.next(); - if (wrapper.getView().equals(view)) { - iterator.remove(); - } - } - } - - public void addLeftFeatureView(View view) { - Logger.d(TAG, "addLeftFeatureView==" + view); - if (featureViewGroup == null) { - // 先缓存起来,等待时机加载 - if (!leftFeaturePreAddView.contains(view)) { - leftFeaturePreAddView.add(view); - } - } else { - // 直接加载 - if (!containFeatureView(view)) { - featureViewGroup.addView(view); - } - } - } - - public void removeLeftFeatureView(View view) { - if (featureViewGroup != null) { - featureViewGroup.removeView(view); - } - Iterator iterator = leftFeaturePreAddView.iterator(); - while (iterator.hasNext()) { - View wrapper = iterator.next(); - if (wrapper.equals(view)) { - iterator.remove(); - } - } - } - - - public void showLeftNoticeView(View view) { - if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) { - if (leftNoticeContainer != null) { - realShowLeftNoticeView(view); - } else { - preAddLeftNoticeView = view; - } - } - } - - public void hideLeftNoticeView(View view) { - if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) { - if (preAddLeftNoticeView != null && preAddLeftNoticeView == view) { - preAddLeftNoticeView = null; - } - if (leftNoticeContainer != null) { - realHideLeftNoticeView(view); - } - } - } - - public void forceHideNoticeView() { - for (IMogoEntranceViewListener listener : listeners) { - listener.onViewRemoved(currentShowNoticeType); - } - preAddLeftNoticeView = null; - currentShowNoticeType = 0; - if (leftNoticeContainer != null) { - leftNoticeContainer.removeAllViews(); - } - } - - private int currentShowNoticeType = 0; - - public void showLeftNoticeByType(int noticeType, int iconRes, String content) { - if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) { - if (currentShowNoticeType != noticeType && currentShowNoticeType != 0) { - for (IMogoEntranceViewListener listener : listeners) { - listener.onViewRemoved(currentShowNoticeType); - } - } - currentShowNoticeType = noticeType; - if (leftNoticeContainer != null) { - realShowLeftNoticeView(generateNoticeViewByType(noticeType, iconRes, content)); - } else { - preAddLeftNoticeView = generateNoticeViewByType(noticeType, iconRes, content); - } - } - - } - - public void hideLeftNoticeByType(int noticeType) { - if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) { - if (currentShowNoticeType == noticeType) { - forceHideNoticeView(); - } - } - } - - private View generateNoticeViewByType(int noticeType, int iconRes, String content) { - View view = - LayoutInflater.from(leftNoticeContainer.getContext()).inflate(R.layout.item_vr_left_notice, leftNoticeContainer, false); - ImageView icon = view.findViewById(R.id.module_ext_iv_left_notice_icon); - if (noticeType == NOTICE_TYPE_SEEK_HELP) { - // 自车求助,是橘色的背景 - icon.setBackgroundResource(R.drawable.module_ext_left_notice_icon_orange_bg); - } else { - // 其他是红色背景 - icon.setBackgroundResource(R.drawable.module_ext_left_notice_icon_red_bg); - } - icon.setImageResource(iconRes); - TextView tvContent = view.findViewById(R.id.module_ext_tv_left_notice_content); - tvContent.setText(content); - return view; - } - - private void realShowLeftNoticeView(View view) { - leftNoticeContainer.setVisibility(View.VISIBLE); - leftNoticeContainer.removeAllViews(); - leftNoticeContainer.addView(view); - preAddLeftNoticeView = null; - for (IMogoEntranceViewListener listener : listeners) { - listener.onViewAdded(currentShowNoticeType); - } - } - - private void realHideLeftNoticeView(View view) { - leftNoticeContainer.removeView(view); - leftNoticeContainer.setVisibility(View.GONE); - } - - private final List listeners = new ArrayList<>(); - - public void addEntranceViewListener(IMogoEntranceViewListener listener) { - listeners.add(listener); - } - - public void removeEntranceViewListener(IMogoEntranceViewListener listener) { - listeners.remove(listener); - } - - public void release() { - rootViewGroup = null; - featureViewGroup = null; - leftNoticeContainer = null; - } - -} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/TopViewAnimHelper.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/TopViewAnimHelper.java index 5c8676606b..1e119e105c 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/TopViewAnimHelper.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/TopViewAnimHelper.java @@ -1,19 +1,15 @@ package com.mogo.module.extensions.utils; import android.animation.Animator; -import android.os.Handler; import android.util.ArrayMap; import android.view.View; import android.view.ViewGroup; import android.view.ViewGroup.LayoutParams; -import android.widget.TextView; import androidx.constraintlayout.widget.ConstraintLayout; import com.mogo.eagle.core.utilcode.mogo.logger.Logger; -import com.mogo.map.uicontroller.IMogoMapUIController; import com.mogo.module.common.MogoApisHandler; -import com.mogo.module.common.map.MapCenterPointStrategy; import com.mogo.module.common.map.Scene; import com.mogo.module.extensions.ExtensionsModuleConst; import com.mogo.module.extensions.R; @@ -54,11 +50,6 @@ public class TopViewAnimHelper { return instance; } - private IMogoMapUIController mogoMapUIController; - - public void setIMogoMapUIController(IMogoMapUIController mogoMapUIController) { - this.mogoMapUIController = mogoMapUIController; - } public void init(ConstraintLayout rootView) { init(rootView, null); @@ -314,7 +305,6 @@ public class TopViewAnimHelper { scene = Scene.AIMLESS_WITH_ROAD_EVENT; topContainer.animate().translationY(params.height).setListener(mainAnimListener).start(); Logger.d(TAG, "show top setMapCenterPointByScene: " + scene); - MapCenterPointStrategy.setMapCenterPointByScene(mogoMapUIController, scene); } catch (Exception e) { Logger.e(TAG, e, "添加view异常"); e.printStackTrace(); @@ -364,7 +354,6 @@ public class TopViewAnimHelper { int scene = 0; scene = Scene.AIMLESS; Logger.d(TAG, "hide top setMapCenterPointByScene: " + scene); - MapCenterPointStrategy.setMapCenterPointByScene(mogoMapUIController, scene); MogoApisHandler.getInstance().getApis().getStatusManagerApi().setTopViewShow(ExtensionsModuleConst.TYPE_ENTRANCE, false); } } @@ -383,7 +372,6 @@ public class TopViewAnimHelper { scene = Scene.NAVI; } Logger.d(TAG, "navi show setMapCenterPointByScene: " + scene); - MapCenterPointStrategy.setMapCenterPointByScene(mogoMapUIController, scene); checkCameraModePosition(true); } @@ -400,7 +388,6 @@ public class TopViewAnimHelper { scene = Scene.AIMLESS_WITH_ROAD_EVENT; } Logger.d(TAG, "hide navi setMapCenterPointByScene: " + scene); - MapCenterPointStrategy.setMapCenterPointByScene(mogoMapUIController, scene); checkCameraModePosition(true); } @@ -448,8 +435,6 @@ public class TopViewAnimHelper { topContainer.setTranslationY(0); topContainer.removeAllViews(); hideNaviView(); - MapCenterPointStrategy.setMapCenterPointByScene(mogoMapUIController, Scene.AIMLESS); - } public void removeAllView() { diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/TopViewNoLinkageAnimHelper.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/TopViewNoLinkageAnimHelper.java index 0985d9f04d..95bd6b4294 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/TopViewNoLinkageAnimHelper.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/TopViewNoLinkageAnimHelper.java @@ -10,12 +10,12 @@ import androidx.constraintlayout.widget.ConstraintLayout; import com.mogo.eagle.core.utilcode.mogo.logger.Logger; import com.mogo.map.uicontroller.IMogoMapUIController; import com.mogo.module.common.MogoApisHandler; -import com.mogo.module.common.map.MapCenterPointStrategy; import com.mogo.module.common.map.Scene; import com.mogo.module.extensions.ExtensionsModuleConst; import com.mogo.module.extensions.R; import com.mogo.module.extensions.navi.TopView; import com.mogo.service.windowview.IMogoTopViewStatusListener; + import java.util.Map; @@ -98,7 +98,6 @@ public class TopViewNoLinkageAnimHelper { topContainerNoLinkage.animate().translationY(child.getHeight()).setListener(mainAnimListener).start(); int scene = Scene.AIMLESS_WITH_ROAD_EVENT; Logger.d(TAG, "show top setMapCenterPointByScene: " + scene); - MapCenterPointStrategy.setMapCenterPointByScene(mogoMapUIController, scene); }); MogoApisHandler.getInstance().getApis().getStatusManagerApi().setTopViewShow(ExtensionsModuleConst.TYPE_ENTRANCE, true); @@ -135,7 +134,6 @@ public class TopViewNoLinkageAnimHelper { topContainerNoLinkage.animate().translationY(-topContainerNoLinkage.getTranslationY()).setListener(mainAnimListener).start(); int scene = Scene.AIMLESS; Logger.d(TAG, "hide top setMapCenterPointByScene: " + scene); - MapCenterPointStrategy.setMapCenterPointByScene(mogoMapUIController, scene); MogoApisHandler.getInstance().getApis().getStatusManagerApi().setTopViewShow(ExtensionsModuleConst.TYPE_ENTRANCE, false); } } @@ -159,7 +157,6 @@ public class TopViewNoLinkageAnimHelper { } topContainerNoLinkage.removeAllViews(); } - MapCenterPointStrategy.setMapCenterPointByScene(mogoMapUIController, Scene.AIMLESS); } public void clear() { @@ -167,16 +164,6 @@ public class TopViewNoLinkageAnimHelper { topContainerNoLinkage = null; } - public void enterVrMode() { - removeAllView(); - topContainerNoLinkage.getLayoutParams().width = (int) getDimen(R.dimen.module_ext_top_view_no_link_width_in_vr_mode); - } - - public void exitVrMode() { - removeAllView(); - topContainerNoLinkage.getLayoutParams().width = LayoutParams.MATCH_PARENT; - } - private final Animator.AnimatorListener mainAnimListener = new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/view/VerticalTrafficLightView.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/view/VerticalTrafficLightView.java deleted file mode 100644 index 80bbde5e18..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/view/VerticalTrafficLightView.java +++ /dev/null @@ -1,141 +0,0 @@ -package com.mogo.module.extensions.view; - -import android.content.Context; -import android.content.res.TypedArray; -import android.graphics.Color; -import android.util.AttributeSet; -import android.view.LayoutInflater; -import android.view.View; -import android.widget.ImageView; -import android.widget.TextView; - -import androidx.annotation.IntDef; -import androidx.constraintlayout.widget.ConstraintLayout; -import androidx.constraintlayout.widget.Group; - -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; -import com.mogo.module.common.constants.TrafficLightConst; -import com.mogo.module.extensions.R; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -import static com.mogo.module.common.constants.TrafficLightConst.TRAFFIC_LIGHT_COLOR_GRAY; -import static com.mogo.module.common.constants.TrafficLightConst.TRAFFIC_LIGHT_COLOR_GREEN; -import static com.mogo.module.common.constants.TrafficLightConst.TRAFFIC_LIGHT_COLOR_RED; -import static com.mogo.module.common.constants.TrafficLightConst.TRAFFIC_LIGHT_COLOR_YELLOW; - -/** - * vr模式下的纵向显示的红绿灯封装 - * - * @author tongchenfei - */ -public class VerticalTrafficLightView extends ConstraintLayout { - private static final String TAG = "VerticalTrafficLightView"; - - private ImageView ivTrafficLight, ivNoLeftTime; - private TextView tvLeftTime, tvLeftTimeUnit; - private Group groupLeftTime; - - private static final int[] TURN_AROUND_ICON_RES = new int[]{R.drawable.module_ext_dw_traffic_turn_around_gray, R.drawable.module_ext_dw_traffic_turn_around_red, R.drawable.module_ext_dw_traffic_turn_around_yellow, R.drawable.module_ext_dw_traffic_turn_around_green}; - private static final int[] TURN_LEFT_ICON_RES = new int[]{R.drawable.module_ext_dw_traffic_turn_left_gray, R.drawable.module_ext_dw_traffic_turn_left_red, R.drawable.module_ext_dw_traffic_turn_left_yellow, R.drawable.module_ext_dw_traffic_turn_left_green}; - private static final int[] STRAIGHT_ICON_RES = new int[]{R.drawable.module_ext_dw_traffic_straight_gray, R.drawable.module_ext_dw_traffic_straight_red, R.drawable.module_ext_dw_traffic_straight_yellow, R.drawable.module_ext_dw_traffic_straight_green}; - private static final int[] TURN_RIGHT_ICON_RES = new int[]{R.drawable.module_ext_dw_traffic_turn_right_gray, R.drawable.module_ext_dw_traffic_turn_right_red, R.drawable.module_ext_dw_traffic_turn_right_yellow, R.drawable.module_ext_dw_traffic_turn_right_green}; - - private final int[] iconRes; - private final int[] colorRes = new int[]{-1, Color.parseColor("#F63A35"), Color.parseColor("#FFA71F"), Color.parseColor("#11FF89")}; - - public VerticalTrafficLightView(Context context) { - this(context, null); - } - - public VerticalTrafficLightView(Context context, AttributeSet attrs) { - this(context, attrs, 0); - } - - public VerticalTrafficLightView(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - LayoutInflater.from(context).inflate(R.layout.merge_vertical_traffic_light_in_vr, this); - TypedArray typedArray = context.getTheme().obtainStyledAttributes(attrs, R.styleable.VerticalTrafficLightView, 0, 0); - int lightType = typedArray.getInt(R.styleable.VerticalTrafficLightView_iconRes, 0); - typedArray.recycle(); - switch (lightType) { - case 1: - // turn left - iconRes = TURN_LEFT_ICON_RES; - break; - case 2: - // straight - iconRes = STRAIGHT_ICON_RES; - break; - case 3: - // turn right - iconRes = TURN_RIGHT_ICON_RES; - break; - default: - // turn around - iconRes = TURN_AROUND_ICON_RES; - break; - } - initView(); - } - - private void initView() { - ivTrafficLight = findViewById(R.id.module_ext_id_traffic_light_icon); - ivNoLeftTime = findViewById(R.id.module_ext_id_traffic_light_no_left_time); - tvLeftTime = findViewById(R.id.module_ext_id_traffic_light_left_time); - tvLeftTimeUnit = findViewById(R.id.module_ext_id_traffic_light_left_time_unit); - groupLeftTime = findViewById(R.id.module_ext_id_group_left_time); - ivTrafficLight.setImageResource(iconRes[0]); - } - - /** - * 设置红绿灯的颜色,根据颜色来展示不同的效果 - * - * @param color 红绿灯颜色{@link TrafficLightConst#TRAFFIC_LIGHT_COLOR_GRAY},{@link TrafficLightConst#TRAFFIC_LIGHT_COLOR_RED}等四个颜色 - */ - private void setTrafficLightColor(@TrafficLightColor int color) { - if (iconRes == null) { - Logger.e(TAG, "红绿灯Icon数据为空,无法进行设置"); - return; - } - ivTrafficLight.setImageResource(iconRes[color]); - if (color != TRAFFIC_LIGHT_COLOR_GRAY) { - tvLeftTime.setTextColor(colorRes[color]); - tvLeftTimeUnit.setTextColor(colorRes[color]); - } - } - - /** - * 设置红绿灯剩余时长 - * - * @param leftTime 剩余时长,null或者empty表示没有时长数据 - */ - private void setTrafficLightLeftTime(String leftTime) { - if (leftTime == null || leftTime.isEmpty()) { - groupLeftTime.setVisibility(View.GONE); - ivNoLeftTime.setVisibility(View.VISIBLE); - } else { - groupLeftTime.setVisibility(View.VISIBLE); - ivNoLeftTime.setVisibility(View.GONE); - tvLeftTime.setText(leftTime); - } - } - - /** - * 设置红绿灯状态,需设置颜色及时长 - * - * @param color 红绿灯颜色,使用{@link TrafficLightConst#TRAFFIC_LIGHT_COLOR_RED}等四个值 - * @param leftTime 剩余时长,null或者empty表示没有时长数据 - */ - public void setTrafficLightStatus(@TrafficLightColor int color, String leftTime) { - setTrafficLightColor(color); - setTrafficLightLeftTime(leftTime); - } - - @IntDef({TRAFFIC_LIGHT_COLOR_GRAY, TRAFFIC_LIGHT_COLOR_GREEN, TRAFFIC_LIGHT_COLOR_RED, TRAFFIC_LIGHT_COLOR_YELLOW}) - @Retention(RetentionPolicy.SOURCE) - public @interface TrafficLightColor { - } - -} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/Phenomena.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/Phenomena.java deleted file mode 100644 index e8b8227a46..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/Phenomena.java +++ /dev/null @@ -1,101 +0,0 @@ -package com.mogo.module.extensions.weather; - -import android.text.TextUtils; - -import com.mogo.module.extensions.R; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author Lzq - */ -public enum Phenomena { - Sunny( "00", "晴", "Sunny", R.drawable.module_ext_ic_sunny ), - Cloudy( "01", "多云", "Cloudy", R.drawable.module_ext_ic_cloudy ), - Overcast( "02", "阴", "Overcast", R.drawable.module_ext_ic_overcast ), - - Shower( "03", "阵雨", "Shower", R.drawable.module_ext_ic_shower ), - Thundershower( "04", "雷阵雨", "Thundershower", R.drawable.module_ext_ic_thundershower ), - ThundershowerWithHail( "05", "雷阵雨伴有冰雹", "Thundershower with hail", R.drawable.module_ext_ic_thundershower ), - Sleet( "06", "雨夹雪", "Sleet", R.drawable.module_ext_ic_snow ), - LightRain( "07", "小雨", "Light rain", R.drawable.module_ext_ic_light_rain ), - ModerateRain( "08", "中雨", "Moderate rain", R.drawable.module_ext_ic_light_rain ), - HeavyRain( "09", "大雨", "Heavy rain", R.drawable.module_ext_ic_heavy_rain ), - Storm( "10", "暴雨", "Storm", R.drawable.module_ext_ic_heavy_rain ), - HeavyStorm( "11", "大暴雨", "Heavy storm", R.drawable.module_ext_ic_heavy_rain ), - SevereStorm( "12", "特大暴雨", "Severe storm", R.drawable.module_ext_ic_severe_storm ), - - SnowFlurry( "13", "阵雪", "Snow flurry", R.drawable.module_ext_ic_snow ), - LightSnow( "14", "小雪", "Light snow", R.drawable.module_ext_ic_snow ), - ModerateSnow( "15", "中雪", "Moderate snow", R.drawable.module_ext_ic_snow ), - HeavySnow( "16", "大雪", "Heavy snow", R.drawable.module_ext_ic_snow ), - Snowstorm( "17", "暴雪", "Snowstorm", R.drawable.module_ext_ic_snow ), - - Foggy( "18", "雾", "Foggy", R.drawable.module_ext_ic_fog ), - IceRain( "19", "冻雨", "Ice rain", R.drawable.module_ext_ic_heavy_rain ), - Duststorm( "20", "沙尘暴", "Duststorm", R.drawable.module_ext_ic_duststorm ), - - LightToModerateRain( "21", "小到中雨", "Light to moderate rain", R.drawable.module_ext_ic_moderate_rain ), - ModerateToHeavyRain( "22", "中到大雨", "Moderate to heavy rain", R.drawable.module_ext_ic_heavy_rain ), - HeavyRainToStorm( "23", "大到大雨", "Heavy rain to storm", R.drawable.module_ext_ic_heavy_rain ), - StormToHeavyStorm( "24", "暴雨到大暴雨", "Storm to heavy storm", R.drawable.module_ext_ic_severe_storm ), - HeavyToSevereStorm( "25", "大暴雨到特大暴雨", "Heavy to severe storm", R.drawable.module_ext_ic_severe_storm ), - - LightToModerateSnow( "26", "小到中雪", "Light to moderate snow", R.drawable.module_ext_ic_snow ), - ModerateToHeavySnow( "27", "中到大雪", "Moderate to heavy snow", R.drawable.module_ext_ic_snow ), - HeavySnowToSnowStorm( "28", "大到暴雪", "Heavy snow to snowstorm", R.drawable.module_ext_ic_snow ), - - Dust( "29", "浮尘", "Dust", R.drawable.module_ext_ic_dust_sand ), - Sand( "30", "扬沙", "Sand", R.drawable.module_ext_ic_dust_sand ), - SandStorm( "31", "强沙尘暴", "Sandstorm", R.drawable.module_ext_ic_duststorm ), - - Densefog( "32", "浓雾", "Dense fog", R.drawable.module_ext_ic_fog ), - StrongFog( "49", "强浓雾", "Strong fog", R.drawable.module_ext_ic_fog ), - DenseFog( "57", "大雾", "Dense fog", R.drawable.module_ext_ic_fog ), - ExtraHeavyFog( "58", "特强浓雾", "Extra heavy fog", R.drawable.module_ext_ic_fog ), - - Haze( "53", "霾", "Haze", R.drawable.module_ext_ic_haze ), - ModerateHaze( "54", "中度霾", "Moderate haze", R.drawable.module_ext_ic_haze ), - Severehaze( "55", "重度霾", "Severe haze", R.drawable.module_ext_ic_haze ), - SevereHaze( "56", "严重霾", "Severe haze", R.drawable.module_ext_ic_haze ), - - Unknown( "99", "无", "Unknown", R.drawable.module_ext_ic_unknown ), - - Rain( "301", "雨", "rain", R.drawable.module_ext_ic_heavy_rain ), - Snow( "302", "雪", "snow", R.drawable.module_ext_ic_snow ); - - public final String id; - public final String nameCn; - public final String nameEn; - public final int resId; - - Phenomena( String id, String nameCn, String nameEn, int resId ) { - this.id = id; - this.nameCn = nameCn; - this.nameEn = nameEn; - this.resId = resId; - } - - static Map< String, Phenomena > mPhenomenas; - - static { - if ( mPhenomenas == null ) { - synchronized ( Phenomena.class ) { - if ( mPhenomenas == null ) { - mPhenomenas = new HashMap<>(); - for ( Phenomena weather : Phenomena.values() ) { - mPhenomenas.put( weather.id, weather ); - } - } - } - } - } - - public static synchronized Phenomena getById( String id ) { - if ( TextUtils.isEmpty( id ) ) { - return null; - } - return mPhenomenas.get( id ); - } -} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/StrokeTextView.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/StrokeTextView.java deleted file mode 100644 index a7fac74c20..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/StrokeTextView.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.mogo.module.extensions.weather; - -import android.content.Context; -import android.graphics.Canvas; -import android.graphics.Color; -import android.graphics.Paint; -import android.text.Layout; -import android.text.TextPaint; -import android.util.AttributeSet; -import android.widget.TextView; - -import androidx.annotation.Nullable; -import androidx.appcompat.widget.AppCompatTextView; - -import java.lang.reflect.Field; - -/** - * 带边框的textView - * - * @author tongchenfei - */ -public class StrokeTextView extends AppCompatTextView { - - - public StrokeTextView(Context context) { - this(context,null); - } - - public StrokeTextView(Context context, @Nullable AttributeSet attrs) { - this(context, attrs, 0); - } - - public StrokeTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - } - - @Override - public void setTextAppearance(Context context, int resId) { - super.setTextAppearance(context, resId); - } - - @Override - protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - super.onMeasure(widthMeasureSpec, heightMeasureSpec); - int widthMode = MeasureSpec.getMode(widthMeasureSpec); - int widthSize = getMeasuredWidth(); - if (widthMode == MeasureSpec.AT_MOST) { - widthSize += 20; - Layout mLayout = getLayout(); - if (mLayout != null) { - mLayout.increaseWidthTo(widthSize); - } - setMeasuredDimension(widthSize, getMeasuredHeight()); - } - } - - @Override - protected void onDraw(Canvas canvas) { - int oriColor = getCurrentTextColor(); - // 先画边框 - TextPaint paint = getPaint(); - setCurTextColor(Color.YELLOW); - paint.setStyle(Paint.Style.STROKE); - paint.setShadowLayer(10F, 0F, 0F, Color.YELLOW); - float b = getTextSize() / 20; - float shadowWidth = Math.max(b, 2f); - paint.setStrokeWidth(shadowWidth); - super.onDraw(canvas); - // 再画文字 - setCurTextColor(oriColor); - paint.setStyle(Paint.Style.FILL); - super.onDraw(canvas); - } - - /** - * 通过反射直接设置mCurTextColor这个变量,直接调用{@link #setTextColor(int)}会出现重复递归的问题 - * - * @param color 要设置的颜色值 - */ - private void setCurTextColor(int color) { - try { - Field mCurTextColor = TextView.class.getDeclaredField("mCurTextColor"); - mCurTextColor.setAccessible(true); - mCurTextColor.set(this,color); - mCurTextColor.setAccessible(false); - } catch (NoSuchFieldException | IllegalAccessException e) { - e.printStackTrace(); - } - } - -} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/WeatherCallback.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/WeatherCallback.java deleted file mode 100644 index 38b7d1d521..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/WeatherCallback.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.mogo.module.extensions.weather; - -public interface WeatherCallback { - void onWeatherLoaded( WeatherInfo weatherInfo ); -} \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/WeatherConstants.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/WeatherConstants.java deleted file mode 100644 index 6e2376bd34..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/WeatherConstants.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.mogo.module.extensions.weather; - -/** - * 天气 - */ -public class WeatherConstants { - - public final static String WEATHER_URI = "content://com.zhidao.weather/weatherinfo"; - - /** - * 天气 - */ - public static final String TEMPERATURE = "observetemperature"; - /** - * 气象 - */ - public static final String PHENOMENA = "observephenomena"; - /** - * 风向 - */ - public static final String WIND_DIRECTION = "observewinddirection"; - /** - * 风力 - */ - public static final String WIND_FORCE = "observewindforce"; - - /** - * 天气消息加载完毕 - */ - public static final int MSG_WEATHER_LOADED = 0x1000; -} - diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/WeatherInfo.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/WeatherInfo.java deleted file mode 100644 index d5afeb8d23..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/WeatherInfo.java +++ /dev/null @@ -1,142 +0,0 @@ -package com.mogo.module.extensions.weather; - -import android.os.Parcel; -import android.os.Parcelable; -import android.text.TextUtils; - -import java.util.Objects; - -/** - * 天气 - */ -public class WeatherInfo implements Parcelable { - /** - * 温度 - */ - private String temperature; - - /** - * 描述信息 - */ - private String phenomena; - - /** - * 风向 - */ - private String windDirection; - - /** - * 风力 - */ - private String windForce; - - @Override - public String toString() { - return "WeatherInfo{" + - "temperature='" + temperature + '\'' + - ", phenomena='" + phenomena + '\'' + - ", windDirection='" + windDirection + '\'' + - ", windForce='" + windForce + '\'' + - '}'; - } - - @Override - public boolean equals( Object o ) { - if ( this == o ) { - return true; - } - if ( !( o instanceof WeatherInfo ) ) { - return false; - } - WeatherInfo that = ( WeatherInfo ) o; - return Objects.equals( temperature, that.temperature ) && - Objects.equals( phenomena, that.phenomena ) && - Objects.equals( windDirection, that.windDirection ) && - Objects.equals( windForce, that.windForce ); - } - - @Override - public int hashCode() { - return Objects.hash( temperature, phenomena, windDirection, windForce ); - } - - public WeatherInfo() { - } - - public WeatherInfo( String temperature, String phenomena, String windDirection, String windForce ) { - this.temperature = temperature; - this.phenomena = phenomena; - this.windDirection = windDirection; - this.windForce = windForce; - } - - public String getTemperature() { - return temperature; - } - - public void setTemperature( String temperature ) { - this.temperature = temperature; - } - - public String getPhenomena() { - return phenomena; - } - - public void setPhenomena( String phenomena ) { - this.phenomena = phenomena; - } - - public String getWindDirection() { - return windDirection; - } - - public void setWindDirection( String windDirection ) { - this.windDirection = windDirection; - } - - public String getWindForce() { - return windForce; - } - - public void setWindForce( String windForce ) { - this.windForce = windForce; - } - - public boolean isLegal() { - return !TextUtils.isEmpty( phenomena ) - && !TextUtils.isEmpty( temperature ); - } - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel( Parcel dest, int flags ) { - dest.writeString( this.temperature ); - dest.writeString( this.phenomena ); - dest.writeString( this.windDirection ); - dest.writeString( this.windForce ); - } - - protected WeatherInfo( Parcel in ) { - this.temperature = in.readString(); - this.phenomena = in.readString(); - this.windDirection = in.readString(); - this.windForce = in.readString(); - } - - public static final Creator< WeatherInfo > CREATOR = new Creator< WeatherInfo >() { - @Override - public WeatherInfo createFromParcel( Parcel source ) { - return new WeatherInfo( source ); - } - - @Override - public WeatherInfo[] newArray( int size ) { - return new WeatherInfo[size]; - } - }; -} - diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/WeatherModel.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/WeatherModel.java deleted file mode 100644 index af5f06a76d..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/WeatherModel.java +++ /dev/null @@ -1,137 +0,0 @@ -package com.mogo.module.extensions.weather; - -import android.content.ContentResolver; -import android.content.Context; -import android.database.ContentObserver; -import android.database.Cursor; -import android.net.Uri; -import android.os.Handler; -import android.os.Looper; -import android.os.Message; - -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; -import com.mogo.eagle.core.utilcode.util.ThreadPoolService; - -import androidx.annotation.NonNull; - - -/** - * @author congtaowang - * @since 2020-01-05 - *

- * 描述 - */ -public class WeatherModel { - - private static final String TAG = "WeatherModel"; - - private Context mContext; - - private Uri mWeatherUri; - private Handler mHandler; - private ContentResolver mContentResolver; - private ContentObserver mContentObserver; - private WeatherCallback mCallback; - - public WeatherModel( Context context ) { - this.mContext = context; - } - - public void init( WeatherCallback callback ) { - mCallback = callback; - mWeatherUri = Uri.parse( WeatherConstants.WEATHER_URI ); - mContentResolver = mContext.getContentResolver(); - mHandler = new Handler( Looper.getMainLooper() ) { - @Override - public void handleMessage( @NonNull Message msg ) { - if ( msg.what == WeatherConstants.MSG_WEATHER_LOADED ) { - if ( mCallback != null ) { - mCallback.onWeatherLoaded( ( ( WeatherInfo ) msg.obj ) ); - } - } - } - }; - mContentObserver = new ContentObserver( mHandler ) { - @Override - public void onChange( boolean selfChange, Uri uri ) { - super.onChange( selfChange, uri ); - try { - queryWeatherInformation(); - } catch ( Exception e ) { - Logger.e( TAG, e, "error. " ); - } - } - }; - try { - mContentResolver.registerContentObserver( mWeatherUri, false, mContentObserver ); - } catch ( Exception e ) { - Logger.e( TAG, e, "error when query weather info." ); - } - } - - public void queryWeatherInformation() { - - if ( mCallback == null ) { - Logger.e( TAG, "WeatherModel#init should invoked " ); - return; - } - startNewThreadToQuery(); - } - - - private void startNewThreadToQuery() { - ThreadPoolService.execute(new Runnable() { - @Override - public void run() { - if ( mContentResolver == null ) { - return; - } - Cursor cursor = null; - try { - cursor = mContentResolver.query( mWeatherUri, null, null, null, null, null ); - } catch ( Exception e ) { - return; - } - if ( cursor == null ) { - return; - } - WeatherInfo weatherInfo = new WeatherInfo(); - if ( cursor.moveToFirst() ) { - int index = cursor.getColumnIndex( WeatherConstants.TEMPERATURE ); - if ( index != -1 ) { - weatherInfo.setTemperature( cursor.getString( index ) ); - } - index = cursor.getColumnIndex( WeatherConstants.PHENOMENA ); - if ( index != -1 ) { - weatherInfo.setPhenomena( cursor.getString( index ) ); - } - index = cursor.getColumnIndex( WeatherConstants.WIND_DIRECTION ); - if ( index != -1 ) { - weatherInfo.setWindDirection( cursor.getString( index ) ); - } - index = cursor.getColumnIndex( WeatherConstants.WIND_FORCE ); - if ( index != -1 ) { - weatherInfo.setWindForce( cursor.getString( index ) ); - } - Message msg = Message.obtain(); - msg.obj = weatherInfo; - msg.what = WeatherConstants.MSG_WEATHER_LOADED; - mHandler.sendMessage( msg ); - } - cursor.close(); - } - } ); - } - - public void destroy() { - if ( mContentResolver != null && mContentObserver != null ) { - mContentResolver.unregisterContentObserver( mContentObserver ); - } - mContext = null; - mWeatherUri = null; - mHandler = null; - mContentResolver = null; - mContentObserver = null; - mCallback = null; - } -} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/WebWeatherData.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/WebWeatherData.java deleted file mode 100644 index 57235ac0b5..0000000000 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/weather/WebWeatherData.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.mogo.module.extensions.weather; - -import com.google.gson.annotations.SerializedName; - -/** - * @author congtaowang - * @since 2020-01-07 - *

- * 天气数据描述 - */ -public class WebWeatherData { - - @SerializedName( "observe" ) - public ObserveDataType observe; - - /** - * 实时数据 - */ - public static class ObserveDataType { - @SerializedName( "101010200" ) - public ObserveData data; - } - - /** - * 实时数据对象 - */ - public static class ObserveData { - @SerializedName( "1001002" ) - public Data data; - } - - /** - * what the fuck. - */ - public static class Data { - @SerializedName( "000" ) - public String time; - @SerializedName( "001" ) - public String phenomena; - @SerializedName( "002" ) - public String temperature; - @SerializedName( "003" ) - public String windForce; - @SerializedName( "004" ) - public String windDirection; - } -} diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/icon_car_up.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/icon_car_up.png deleted file mode 100644 index 94ca2ed92c..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/icon_car_up.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/icon_north_up.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/icon_north_up.png deleted file mode 100644 index 2c88c8d9a1..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/icon_north_up.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/model_ext_default_user_head.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/model_ext_default_user_head.png deleted file mode 100644 index f95b06e2af..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/model_ext_default_user_head.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/model_ext_default_user_head_board.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/model_ext_default_user_head_board.png deleted file mode 100644 index 6f17f06032..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/model_ext_default_user_head_board.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_destination_online_car_dw.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_destination_online_car_dw.png deleted file mode 100644 index 36a731a814..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_destination_online_car_dw.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_cloudy.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_cloudy.png deleted file mode 100644 index 8a9ef00365..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_cloudy.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_display_overview.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_display_overview.png deleted file mode 100644 index df4f12f225..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_display_overview.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_dust_sand.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_dust_sand.png deleted file mode 100644 index e4b369fd5d..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_dust_sand.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_duststorm.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_duststorm.png deleted file mode 100644 index 3df9ec7236..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_duststorm.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_fog.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_fog.png deleted file mode 100644 index 62fd9f4242..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_fog.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_haze.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_haze.png deleted file mode 100644 index 5448cd94e6..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_haze.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_heavy_rain.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_heavy_rain.png deleted file mode 100644 index fa9f6d73bf..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_heavy_rain.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_light_rain.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_light_rain.png deleted file mode 100644 index 19365b521a..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_light_rain.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_message2.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_message2.png deleted file mode 100755 index b6f6c4dd25..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_message2.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_moderate_rain.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_moderate_rain.png deleted file mode 100644 index 19365b521a..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_moderate_rain.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_navi_info1.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_navi_info1.png deleted file mode 100644 index 8495a826bc..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_navi_info1.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_navi_info2.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_navi_info2.png deleted file mode 100644 index 797cb5f596..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_navi_info2.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_navi_info3.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_navi_info3.png deleted file mode 100644 index c62dfd068d..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_navi_info3.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_overcast.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_overcast.png deleted file mode 100644 index 4a90f7c87e..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_overcast.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_right_arrow.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_right_arrow.png deleted file mode 100644 index 348a125779..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_right_arrow.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_severe_storm.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_severe_storm.png deleted file mode 100644 index 4650033797..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_severe_storm.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_shower.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_shower.png deleted file mode 100644 index ed7ccf66b9..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_shower.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_snow.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_snow.png deleted file mode 100644 index 67d43a2ee1..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_snow.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_sunny.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_sunny.png deleted file mode 100644 index 73ceaaf264..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_sunny.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_thunder.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_thunder.png deleted file mode 100644 index 8609690645..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_thunder.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_thundershower.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_thundershower.png deleted file mode 100644 index e5821e3fc3..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_thundershower.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_unknown.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_unknown.png deleted file mode 100644 index 2e2a052a74..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_unknown.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00000.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00000.png deleted file mode 100644 index 767a0daae1..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00000.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00001.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00001.png deleted file mode 100644 index a42e41b5db..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00001.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00002.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00002.png deleted file mode 100644 index feb52311e6..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00002.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00003.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00003.png deleted file mode 100644 index 02d90c866a..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00003.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00004.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00004.png deleted file mode 100644 index 2c44d8dff0..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00004.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00005.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00005.png deleted file mode 100644 index 9de4dea89f..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00005.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00006.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00006.png deleted file mode 100644 index 7196982ec9..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00006.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00007.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00007.png deleted file mode 100644 index 59ca169573..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00007.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00008.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00008.png deleted file mode 100644 index 097ba24307..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00008.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00009.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00009.png deleted file mode 100644 index 5cc7f33552..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00009.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00010.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00010.png deleted file mode 100644 index 7e4ef678af..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00010.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00011.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00011.png deleted file mode 100644 index e8cf54cbbc..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00011.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00012.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00012.png deleted file mode 100644 index 0b72c9764d..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00012.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00013.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00013.png deleted file mode 100644 index 618fbf72af..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00013.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00014.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00014.png deleted file mode 100644 index 65f2ae53ce..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00014.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00015.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00015.png deleted file mode 100644 index 8e7b97f13d..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00015.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00016.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00016.png deleted file mode 100644 index 21d2111b0a..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00016.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00017.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00017.png deleted file mode 100644 index d7136954cc..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00017.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00018.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00018.png deleted file mode 100644 index b58a5f1aa9..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00018.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00019.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00019.png deleted file mode 100644 index 30311edfae..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00019.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00020.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00020.png deleted file mode 100644 index 853e2b3000..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00020.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00021.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00021.png deleted file mode 100644 index cfde8452ac..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00021.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00022.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00022.png deleted file mode 100644 index c629066c85..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00022.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00023.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00023.png deleted file mode 100644 index bc0ea2d023..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00023.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00024.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00024.png deleted file mode 100644 index 8f6f222034..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00024.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00025.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00025.png deleted file mode 100644 index b09b1c3b96..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00025.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00026.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00026.png deleted file mode 100644 index b5ef21355c..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00026.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00027.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00027.png deleted file mode 100644 index 13aab52111..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00027.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00028.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00028.png deleted file mode 100644 index c2e853d2a4..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00028.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00029.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00029.png deleted file mode 100644 index 6125a094d4..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00029.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00030.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00030.png deleted file mode 100644 index 062f90c18a..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00030.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00031.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00031.png deleted file mode 100644 index dce2426df9..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00031.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00032.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00032.png deleted file mode 100644 index d8846dea07..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00032.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00033.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00033.png deleted file mode 100644 index 36a0d5ccf7..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00033.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00034.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00034.png deleted file mode 100644 index f075e6f138..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00034.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00035.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00035.png deleted file mode 100644 index c10d7976ce..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00035.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00036.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00036.png deleted file mode 100644 index 321a6baff0..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00036.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00037.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00037.png deleted file mode 100644 index d0aeb46f52..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00037.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00038.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00038.png deleted file mode 100644 index 689999c833..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00038.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00039.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00039.png deleted file mode 100644 index ae919cc4d8..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00039.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00040.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00040.png deleted file mode 100644 index 33059a422a..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_ic_uploading_00040.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_icon_seek_help_notice_icon.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_icon_seek_help_notice_icon.png deleted file mode 100644 index df529f009a..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_icon_seek_help_notice_icon.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_navi_in_vr_speed_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_navi_in_vr_speed_bg.xml deleted file mode 100644 index 0d13832107..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_navi_in_vr_speed_bg.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_navi_in_vr_traffic_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_navi_in_vr_traffic_bg.xml deleted file mode 100644 index daf6c5e846..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_navi_in_vr_traffic_bg.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_share_no_map.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_share_no_map.png deleted file mode 100644 index c2aa81d0f6..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_share_no_map.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_share_no_map_click.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_share_no_map_click.png deleted file mode 100644 index fade23ec8e..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_ext_share_no_map_click.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_map_ic_company.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_map_ic_company.png deleted file mode 100644 index e44aafa371..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_map_ic_company.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_map_ic_home.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_map_ic_home.png deleted file mode 100644 index ff7674dcbd..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_map_ic_home.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_map_ic_move2_current_location.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_map_ic_move2_current_location.png deleted file mode 100644 index b542105123..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_map_ic_move2_current_location.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_map_ic_search.png b/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_map_ic_search.png deleted file mode 100644 index a03c6eb313..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-ldpi/module_map_ic_search.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/icon_car_up.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/icon_car_up.png deleted file mode 100644 index 94ca2ed92c..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/icon_car_up.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/icon_north_up.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/icon_north_up.png deleted file mode 100644 index 2c88c8d9a1..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/icon_north_up.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/model_ext_default_user_head.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/model_ext_default_user_head.png deleted file mode 100644 index f95b06e2af..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/model_ext_default_user_head.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/model_ext_default_user_head_board.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/model_ext_default_user_head_board.png deleted file mode 100644 index 6f17f06032..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/model_ext_default_user_head_board.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_destination_online_car_dw.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_destination_online_car_dw.png deleted file mode 100644 index 36a731a814..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_destination_online_car_dw.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_cloudy.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_cloudy.png deleted file mode 100644 index 8a9ef00365..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_cloudy.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_display_overview.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_display_overview.png deleted file mode 100644 index df4f12f225..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_display_overview.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_dust_sand.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_dust_sand.png deleted file mode 100644 index e4b369fd5d..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_dust_sand.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_duststorm.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_duststorm.png deleted file mode 100644 index 3df9ec7236..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_duststorm.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_fog.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_fog.png deleted file mode 100644 index 62fd9f4242..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_fog.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_haze.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_haze.png deleted file mode 100644 index 5448cd94e6..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_haze.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_heavy_rain.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_heavy_rain.png deleted file mode 100644 index fa9f6d73bf..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_heavy_rain.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_light_rain.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_light_rain.png deleted file mode 100644 index 19365b521a..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_light_rain.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_message2.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_message2.png deleted file mode 100755 index b6f6c4dd25..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_message2.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_moderate_rain.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_moderate_rain.png deleted file mode 100644 index 19365b521a..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_moderate_rain.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_navi_info1.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_navi_info1.png deleted file mode 100644 index 8495a826bc..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_navi_info1.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_navi_info2.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_navi_info2.png deleted file mode 100644 index 797cb5f596..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_navi_info2.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_navi_info3.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_navi_info3.png deleted file mode 100644 index c62dfd068d..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_navi_info3.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_overcast.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_overcast.png deleted file mode 100644 index 4a90f7c87e..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_overcast.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_right_arrow.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_right_arrow.png deleted file mode 100644 index 348a125779..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_right_arrow.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_severe_storm.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_severe_storm.png deleted file mode 100644 index 4650033797..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_severe_storm.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_shower.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_shower.png deleted file mode 100644 index ed7ccf66b9..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_shower.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_snow.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_snow.png deleted file mode 100644 index 67d43a2ee1..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_snow.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_sunny.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_sunny.png deleted file mode 100644 index 73ceaaf264..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_sunny.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_thunder.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_thunder.png deleted file mode 100644 index 8609690645..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_thunder.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_thundershower.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_thundershower.png deleted file mode 100644 index e5821e3fc3..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_thundershower.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_unknown.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_unknown.png deleted file mode 100644 index 2e2a052a74..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_unknown.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00000.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00000.png deleted file mode 100644 index 767a0daae1..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00000.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00001.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00001.png deleted file mode 100644 index a42e41b5db..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00001.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00002.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00002.png deleted file mode 100644 index feb52311e6..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00002.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00003.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00003.png deleted file mode 100644 index 02d90c866a..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00003.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00004.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00004.png deleted file mode 100644 index 2c44d8dff0..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00004.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00005.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00005.png deleted file mode 100644 index 9de4dea89f..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00005.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00006.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00006.png deleted file mode 100644 index 7196982ec9..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00006.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00007.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00007.png deleted file mode 100644 index 59ca169573..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00007.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00008.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00008.png deleted file mode 100644 index 097ba24307..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00008.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00009.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00009.png deleted file mode 100644 index 5cc7f33552..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00009.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00010.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00010.png deleted file mode 100644 index 7e4ef678af..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00010.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00011.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00011.png deleted file mode 100644 index e8cf54cbbc..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00011.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00012.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00012.png deleted file mode 100644 index 0b72c9764d..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00012.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00013.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00013.png deleted file mode 100644 index 618fbf72af..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00013.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00014.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00014.png deleted file mode 100644 index 65f2ae53ce..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00014.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00015.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00015.png deleted file mode 100644 index 8e7b97f13d..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00015.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00016.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00016.png deleted file mode 100644 index 21d2111b0a..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00016.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00017.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00017.png deleted file mode 100644 index d7136954cc..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00017.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00018.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00018.png deleted file mode 100644 index b58a5f1aa9..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00018.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00019.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00019.png deleted file mode 100644 index 30311edfae..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00019.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00020.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00020.png deleted file mode 100644 index 853e2b3000..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00020.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00021.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00021.png deleted file mode 100644 index cfde8452ac..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00021.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00022.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00022.png deleted file mode 100644 index c629066c85..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00022.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00023.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00023.png deleted file mode 100644 index bc0ea2d023..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00023.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00024.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00024.png deleted file mode 100644 index 8f6f222034..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00024.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00025.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00025.png deleted file mode 100644 index b09b1c3b96..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00025.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00026.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00026.png deleted file mode 100644 index b5ef21355c..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00026.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00027.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00027.png deleted file mode 100644 index 13aab52111..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00027.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00028.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00028.png deleted file mode 100644 index c2e853d2a4..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00028.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00029.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00029.png deleted file mode 100644 index 6125a094d4..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00029.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00030.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00030.png deleted file mode 100644 index 062f90c18a..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00030.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00031.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00031.png deleted file mode 100644 index dce2426df9..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00031.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00032.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00032.png deleted file mode 100644 index d8846dea07..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00032.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00033.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00033.png deleted file mode 100644 index 36a0d5ccf7..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00033.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00034.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00034.png deleted file mode 100644 index f075e6f138..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00034.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00035.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00035.png deleted file mode 100644 index c10d7976ce..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00035.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00036.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00036.png deleted file mode 100644 index 321a6baff0..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00036.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00037.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00037.png deleted file mode 100644 index d0aeb46f52..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00037.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00038.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00038.png deleted file mode 100644 index 689999c833..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00038.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00039.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00039.png deleted file mode 100644 index ae919cc4d8..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00039.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00040.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00040.png deleted file mode 100644 index 33059a422a..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_ic_uploading_00040.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_icon_seek_help_notice_icon.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_icon_seek_help_notice_icon.png deleted file mode 100644 index df529f009a..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_icon_seek_help_notice_icon.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_share_no_map.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_share_no_map.png deleted file mode 100644 index c2aa81d0f6..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_share_no_map.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_share_no_map_click.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_share_no_map_click.png deleted file mode 100644 index fade23ec8e..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_ext_share_no_map_click.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_map_ic_company.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_map_ic_company.png deleted file mode 100644 index e44aafa371..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_map_ic_company.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_map_ic_home.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_map_ic_home.png deleted file mode 100644 index ff7674dcbd..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_map_ic_home.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_map_ic_move2_current_location.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_map_ic_move2_current_location.png deleted file mode 100644 index b542105123..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_map_ic_move2_current_location.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_map_ic_search.png b/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_map_ic_search.png deleted file mode 100644 index a03c6eb313..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-mdpi/module_map_ic_search.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_destination_online_car_dw.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_destination_online_car_dw.png deleted file mode 100644 index fcfe56f4f4..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_destination_online_car_dw.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_ic_navi_info1.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_ic_navi_info1.png deleted file mode 100644 index f9cfe3d8ba..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_ic_navi_info1.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_ic_navi_info2.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_ic_navi_info2.png deleted file mode 100644 index 71cb049800..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_ic_navi_info2.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_ic_navi_info3.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_ic_navi_info3.png deleted file mode 100644 index 2f3f0e54d9..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_ic_navi_info3.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/icon_car_up.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/icon_car_up.png deleted file mode 100755 index ca3b614440..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/icon_car_up.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/icon_north_up.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/icon_north_up.png deleted file mode 100755 index ca77810e0c..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/icon_north_up.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/model_ext_default_user_head.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/model_ext_default_user_head.png deleted file mode 100644 index 7abea7cdfc..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/model_ext_default_user_head.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/model_ext_default_user_head_board.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/model_ext_default_user_head_board.png deleted file mode 100644 index 8f08dbc8db..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/model_ext_default_user_head_board.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_accident_warn.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_accident_warn.png deleted file mode 100644 index f28134a5ff..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_accident_warn.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_destination_online_car_dw.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_destination_online_car_dw.png deleted file mode 100644 index fcfe56f4f4..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_destination_online_car_dw.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_no_time.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_no_time.png deleted file mode 100644 index 736027225e..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_no_time.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_straight_gray.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_straight_gray.png deleted file mode 100644 index 04ae7093cc..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_straight_gray.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_straight_green.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_straight_green.png deleted file mode 100644 index 88b1c512af..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_straight_green.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_straight_red.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_straight_red.png deleted file mode 100644 index 4102f1f704..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_straight_red.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_straight_yellow.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_straight_yellow.png deleted file mode 100644 index 478fc8bc52..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_straight_yellow.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_around_gray.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_around_gray.png deleted file mode 100644 index 9656ca0b09..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_around_gray.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_around_green.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_around_green.png deleted file mode 100644 index bba7c0eec7..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_around_green.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_around_red.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_around_red.png deleted file mode 100644 index 5f838f8634..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_around_red.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_around_yellow.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_around_yellow.png deleted file mode 100644 index 8a4a93f136..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_around_yellow.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_left_gray.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_left_gray.png deleted file mode 100644 index ccc024ae2f..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_left_gray.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_left_green.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_left_green.png deleted file mode 100644 index 6e67909ef8..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_left_green.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_left_red.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_left_red.png deleted file mode 100644 index 05f69ce9e3..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_left_red.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_left_yellow.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_left_yellow.png deleted file mode 100644 index eedef25bb8..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_left_yellow.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_right_gray.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_right_gray.png deleted file mode 100644 index 0cc6a50e65..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_right_gray.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_right_green.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_right_green.png deleted file mode 100644 index efb4005264..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_right_green.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_right_red.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_right_red.png deleted file mode 100644 index b84b11449c..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_right_red.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_right_yellow.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_right_yellow.png deleted file mode 100644 index bf3495faaf..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_dw_traffic_turn_right_yellow.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_cloudy.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_cloudy.png deleted file mode 100755 index fee3071109..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_cloudy.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_display_overview.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_display_overview.png deleted file mode 100644 index 9adb3bbe30..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_display_overview.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_dust_sand.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_dust_sand.png deleted file mode 100755 index d6bdc42cc5..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_dust_sand.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_duststorm.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_duststorm.png deleted file mode 100755 index 510d168d17..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_duststorm.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_fog.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_fog.png deleted file mode 100755 index 53d738e171..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_fog.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_haze.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_haze.png deleted file mode 100755 index 5f849c95dc..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_haze.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_heavy_rain.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_heavy_rain.png deleted file mode 100755 index 041b44358b..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_heavy_rain.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_light_rain.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_light_rain.png deleted file mode 100755 index bd633baec4..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_light_rain.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_message2.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_message2.png deleted file mode 100644 index 2c4fe2dcb8..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_message2.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_moderate_rain.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_moderate_rain.png deleted file mode 100755 index bd633baec4..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_moderate_rain.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_navi_info1.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_navi_info1.png deleted file mode 100644 index b962d1c80b..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_navi_info1.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_navi_info2.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_navi_info2.png deleted file mode 100644 index a9ae343af8..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_navi_info2.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_navi_info3.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_navi_info3.png deleted file mode 100644 index 51ba7976b5..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_navi_info3.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_overcast.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_overcast.png deleted file mode 100755 index 9598476d19..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_overcast.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_right_arrow.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_right_arrow.png deleted file mode 100644 index 3482d56ece..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_right_arrow.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_severe_storm.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_severe_storm.png deleted file mode 100755 index e7a3cf6b4d..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_severe_storm.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_shower.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_shower.png deleted file mode 100755 index 845717f32e..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_shower.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_snow.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_snow.png deleted file mode 100755 index bce4861309..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_snow.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_sunny.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_sunny.png deleted file mode 100755 index 287ce9cc30..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_sunny.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_thunder.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_thunder.png deleted file mode 100755 index ebc955f081..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_thunder.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_thundershower.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_thundershower.png deleted file mode 100755 index e863a7b159..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_thundershower.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_unknown.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_unknown.png deleted file mode 100755 index 68dd2d64fd..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_unknown.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00000.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00000.png deleted file mode 100755 index bf90653042..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00000.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00001.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00001.png deleted file mode 100755 index e7f59bba82..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00001.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00002.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00002.png deleted file mode 100755 index e7484815dd..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00002.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00003.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00003.png deleted file mode 100755 index 23e05162f3..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00003.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00004.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00004.png deleted file mode 100755 index 426e5d87fa..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00004.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00005.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00005.png deleted file mode 100755 index 35710444af..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00005.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00006.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00006.png deleted file mode 100755 index 4fdd8412d7..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00006.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00007.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00007.png deleted file mode 100755 index bf0e1639c9..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00007.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00008.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00008.png deleted file mode 100755 index 3bf0fd645c..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00008.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00009.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00009.png deleted file mode 100755 index 150af8181a..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00009.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00010.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00010.png deleted file mode 100755 index 1cbf60fa82..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00010.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00011.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00011.png deleted file mode 100755 index 1314781ec1..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00011.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00012.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00012.png deleted file mode 100755 index ad5ae7b2ad..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00012.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00013.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00013.png deleted file mode 100755 index 5eb1f39f54..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00013.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00014.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00014.png deleted file mode 100755 index e60c535dc7..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00014.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00015.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00015.png deleted file mode 100755 index ea0afe381f..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00015.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00016.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00016.png deleted file mode 100755 index 3cee9ff9af..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00016.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00017.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00017.png deleted file mode 100755 index 7cd4c671b7..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00017.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00018.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00018.png deleted file mode 100755 index 1690e4229c..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00018.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00019.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00019.png deleted file mode 100755 index f47489e733..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00019.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00020.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00020.png deleted file mode 100755 index 0c9bfb1681..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00020.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00021.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00021.png deleted file mode 100755 index 2dd8c9d81f..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00021.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00022.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00022.png deleted file mode 100755 index 1de34da823..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00022.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00023.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00023.png deleted file mode 100755 index b11e82192c..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00023.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00024.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00024.png deleted file mode 100755 index 6a012d3b19..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00024.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00025.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00025.png deleted file mode 100755 index 4692719d27..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00025.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00026.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00026.png deleted file mode 100755 index 9d0d1eccc1..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00026.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00027.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00027.png deleted file mode 100755 index 939008c6a3..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00027.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00028.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00028.png deleted file mode 100755 index dbdd995434..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00028.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00029.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00029.png deleted file mode 100755 index 5c440b540f..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00029.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00030.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00030.png deleted file mode 100755 index 3de70dc4b5..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00030.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00031.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00031.png deleted file mode 100755 index 63c8fd21a6..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00031.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00032.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00032.png deleted file mode 100755 index 23ece79d66..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00032.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00033.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00033.png deleted file mode 100755 index 07dff143d6..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00033.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00034.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00034.png deleted file mode 100755 index 2cd8aec809..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00034.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00035.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00035.png deleted file mode 100755 index c9a85c91ad..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00035.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00036.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00036.png deleted file mode 100755 index 47801f8697..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00036.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00037.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00037.png deleted file mode 100755 index 3fdb83809c..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00037.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00038.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00038.png deleted file mode 100755 index 0e93f3cc10..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00038.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00039.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00039.png deleted file mode 100755 index 89fa263065..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00039.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00040.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00040.png deleted file mode 100755 index 44f6e29055..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_ic_uploading_00040.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_icon_seek_help_notice_icon.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_icon_seek_help_notice_icon.png deleted file mode 100644 index d23e70cbb4..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_icon_seek_help_notice_icon.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_illegal_overtake.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_illegal_overtake.png deleted file mode 100644 index 05d5853b91..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_illegal_overtake.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_people_warn.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_people_warn.png deleted file mode 100644 index 147e16a28b..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_people_warn.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_self_car.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_self_car.png deleted file mode 100644 index 01f991d7f7..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_self_car.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_traffic_light_green.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_traffic_light_green.png deleted file mode 100644 index 7d7ddedd8a..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_traffic_light_green.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_traffic_light_red.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_traffic_light_red.png deleted file mode 100644 index 694cfd0725..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_traffic_light_red.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_traffic_light_yellow.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_traffic_light_yellow.png deleted file mode 100644 index 8598d800f0..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_traffic_light_yellow.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_traffic_panel_bg.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_traffic_panel_bg.png deleted file mode 100644 index a1d9781b94..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_ext_traffic_panel_bg.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_map_ic_company.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_map_ic_company.png deleted file mode 100644 index 47b1217f4a..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_map_ic_company.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_map_ic_home.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_map_ic_home.png deleted file mode 100755 index 80702ee564..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_map_ic_home.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_map_ic_move2_current_location.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_map_ic_move2_current_location.png deleted file mode 100644 index 3f520955ef..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_map_ic_move2_current_location.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_map_ic_search.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_map_ic_search.png deleted file mode 100644 index 27b414c367..0000000000 Binary files a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi/module_map_ic_search.png and /dev/null differ diff --git a/modules/mogo-module-extensions/src/main/res/drawable/green_light_vr_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/green_light_vr_bg.xml deleted file mode 100644 index 053ca17b45..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/green_light_vr_bg.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_drawable_msg_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_drawable_msg_bkg.xml deleted file mode 100644 index 670765d49a..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_drawable_msg_bkg.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_drawable_msg_container_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_drawable_msg_container_bkg.xml deleted file mode 100644 index f5b8b562ee..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_drawable_msg_container_bkg.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_drawable_seek_help_notice_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_drawable_seek_help_notice_bg.xml deleted file mode 100644 index a66e635a90..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_drawable_seek_help_notice_bg.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_drawable_weather_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_drawable_weather_bkg.xml deleted file mode 100644 index c710e38f52..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_drawable_weather_bkg.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_bottom_corner_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_bottom_corner_bkg.xml deleted file mode 100644 index b2f63a7f5e..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_bottom_corner_bkg.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_common_corner_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_common_corner_bkg.xml deleted file mode 100644 index a5e236e189..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_common_corner_bkg.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_grey_bottom_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_grey_bottom_bkg.xml deleted file mode 100644 index 68f51f1d56..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_grey_bottom_bkg.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_left_corner_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_left_corner_bkg.xml deleted file mode 100644 index 315c306750..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_left_corner_bkg.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_navi_info_extras_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_navi_info_extras_bkg.xml deleted file mode 100644 index cc7147c272..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_navi_info_extras_bkg.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_navi_info_panel_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_navi_info_panel_bkg.xml deleted file mode 100644 index c3a0d13b70..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_navi_info_panel_bkg.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_navi_info_panel_small_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_navi_info_panel_small_bkg.xml deleted file mode 100644 index a438f2fa4f..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_navi_info_panel_small_bkg.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_right_corner_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_right_corner_bkg.xml deleted file mode 100644 index a92749a818..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_right_corner_bkg.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_speed_limit_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_speed_limit_bkg.xml deleted file mode 100644 index 290a36041c..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_speed_limit_bkg.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - /> - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_top_corner_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_top_corner_bkg.xml deleted file mode 100644 index 86e1035ab3..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_top_corner_bkg.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_upload_road_condition_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_upload_road_condition_bkg.xml deleted file mode 100644 index e46aa1dcdd..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_upload_road_condition_bkg.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_left_notice_content_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_left_notice_content_bg.xml deleted file mode 100644 index 2ac3e00cf5..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_left_notice_content_bg.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_left_notice_icon_orange_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_left_notice_icon_orange_bg.xml deleted file mode 100644 index bfa3cc96a1..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_left_notice_icon_orange_bg.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_left_notice_icon_red_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_left_notice_icon_red_bg.xml deleted file mode 100644 index 3d7b109e99..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_left_notice_icon_red_bg.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_navi_in_vr_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_navi_in_vr_bg.xml deleted file mode 100644 index d37d6205c8..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_navi_in_vr_bg.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_share_no_map_selector.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_share_no_map_selector.xml deleted file mode 100644 index b1a91b4bfe..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_share_no_map_selector.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_top_container_shader_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_top_container_shader_bg.xml deleted file mode 100644 index 12be6e29d0..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_top_container_shader_bg.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_limit_speed_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_limit_speed_bg.xml deleted file mode 100644 index 5b79ae5ac8..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_limit_speed_bg.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_speed_green_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_speed_green_bg.xml deleted file mode 100644 index d13f3fc8a1..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_speed_green_bg.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_speed_red_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_speed_red_bg.xml deleted file mode 100644 index 6293d9a7fb..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_speed_red_bg.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_speed_white_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_speed_white_bg.xml deleted file mode 100644 index 95184c01ec..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_speed_white_bg.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_traffic_light_green_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_traffic_light_green_bg.xml deleted file mode 100644 index 0f824c43c0..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_traffic_light_green_bg.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_traffic_light_red_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_traffic_light_red_bg.xml deleted file mode 100644 index 10a256f8cc..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_traffic_light_red_bg.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_traffic_light_yellow_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_traffic_light_yellow_bg.xml deleted file mode 100644 index 2edd68c52b..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_vr_mode_traffic_light_yellow_bg.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/red_light_vr_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/red_light_vr_bg.xml deleted file mode 100644 index c8b510cfd4..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/red_light_vr_bg.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/selector_icon_north_up.xml b/modules/mogo-module-extensions/src/main/res/drawable/selector_icon_north_up.xml deleted file mode 100644 index 6259b5b4de..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/selector_icon_north_up.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/traffic_light_vr_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/traffic_light_vr_bg.xml deleted file mode 100644 index 90c7bde175..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/traffic_light_vr_bg.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/view_traffic_light_vr_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/view_traffic_light_vr_bg.xml deleted file mode 100644 index a63c02e5a6..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/view_traffic_light_vr_bg.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/yellow_light_vr_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/yellow_light_vr_bg.xml deleted file mode 100644 index 9248409de9..0000000000 --- a/modules/mogo-module-extensions/src/main/res/drawable/yellow_light_vr_bg.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/layout/demo_top.xml b/modules/mogo-module-extensions/src/main/res/layout/demo_top.xml deleted file mode 100644 index 21851e18a4..0000000000 --- a/modules/mogo-module-extensions/src/main/res/layout/demo_top.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/layout/dialog_navi_notice.xml b/modules/mogo-module-extensions/src/main/res/layout/dialog_navi_notice.xml index 219a84d48b..3c337fbd1f 100644 --- a/modules/mogo-module-extensions/src/main/res/layout/dialog_navi_notice.xml +++ b/modules/mogo-module-extensions/src/main/res/layout/dialog_navi_notice.xml @@ -11,7 +11,7 @@ android:layout_height="@dimen/dp_56" android:layout_marginTop="@dimen/dp_134" android:text="是否退出导航?" - android:textColor="@color/white" + android:textColor="#FFF" android:textSize="@dimen/sp_40" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" @@ -26,7 +26,7 @@ android:background="@drawable/shape_react_blue_grident" android:gravity="center" android:text="确认" - android:textColor="@color/white" + android:textColor="#FFF" android:textSize="@dimen/dp_40" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" @@ -39,7 +39,7 @@ android:background="@drawable/shape_react_gray_grident" android:gravity="center" android:text="取消" - android:textColor="@color/white" + android:textColor="#FFF" android:textSize="@dimen/dp_40" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintRight_toRightOf="parent" diff --git a/modules/mogo-module-extensions/src/main/res/layout/include_debug_panel.xml b/modules/mogo-module-extensions/src/main/res/layout/include_debug_panel.xml deleted file mode 100644 index 4242b5b5e6..0000000000 --- a/modules/mogo-module-extensions/src/main/res/layout/include_debug_panel.xml +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - -