Merge remote-tracking branch 'origin/dev' into dev
@@ -373,8 +373,19 @@ dependencies {
|
||||
apply from: "./functions/widgets.gradle"
|
||||
apply from: "./functions/tts.gradle"
|
||||
|
||||
// implementation group: "com.tencent.matrix", name: "matrix-trace-canary", version:'0.6.6', changing: true
|
||||
|
||||
}
|
||||
|
||||
//apply plugin: 'com.tencent.matrix-plugin'
|
||||
//matrix {
|
||||
// trace {
|
||||
// enable = true //if you don't want to use trace canary, set false
|
||||
// baseMethodMapFile = "${project.buildDir}/matrix_output/Debug.methodmap"
|
||||
// blackListFile = "${project.projectDir}/matrixTrace/blackMethodList.txt"
|
||||
// }
|
||||
//}
|
||||
|
||||
android.applicationVariants.all { variant ->
|
||||
def buildTime = new Date().format("yyyyMMdd", TimeZone.getTimeZone("GMT+08:00"))
|
||||
def flavor = variant.productFlavors.collect { it.name }.join('-')
|
||||
|
||||
@@ -21,6 +21,7 @@ buildscript {
|
||||
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.71'
|
||||
classpath "com.alibaba:arouter-register:1.0.2"
|
||||
classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.4'
|
||||
// classpath ("com.tencent.matrix:matrix-gradle-plugin:0.6.6") { changing = true }
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
|
||||
@@ -7,7 +7,30 @@
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
#org.gradle.jvmargs=-Xmx1536m
|
||||
org.gradle.daemon=true
|
||||
org.gradle.configureondemand=true
|
||||
org.gradle.parallel=true
|
||||
org.gradle.jvmargs=-Xmx4096m
|
||||
|
||||
#开启gradle缓存
|
||||
org.gradle.caching=true
|
||||
android.enableBuildCache=true
|
||||
|
||||
#开启kotlin的增量和并行编译
|
||||
kotlin.incremental=true
|
||||
kotlin.incremental.java=true
|
||||
kotlin.caching.enabled=true
|
||||
#开启kotlin并行编译
|
||||
kotlin.parallel.tasks.in.project=true
|
||||
|
||||
#优化kapt
|
||||
#并行运行kapt1.2.60版本以上支持
|
||||
kapt.use.worker.api=true
|
||||
#增量编译 kapt1.3.30版本以上支持
|
||||
kapt.incremental.apt=true
|
||||
#kapt avoiding 如果用kapt依赖的内容没有变化,会完全重用编译内容,省掉app:kaptGenerateStubsDebugKotlin的时间
|
||||
kapt.include.compile.classpath=false
|
||||
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
@@ -18,7 +41,7 @@ org.gradle.jvmargs=-Xmx4096m
|
||||
android.useAndroidX=true
|
||||
# Automatically convert third-party libraries to use AndroidX
|
||||
android.enableJetifier=true
|
||||
org.gradle.parallel=true
|
||||
|
||||
|
||||
## maven 配置
|
||||
RELEASE_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-releases/
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.zhidao.roadcondition.util.StrategyPreferenceUtil.Companion.getStrateg
|
||||
import com.zhidao.roadcondition.util.StrategyPreferenceUtil.Companion.getStrategyMinSpeed
|
||||
import com.zhidao.roadcondition.util.StrategyPreferenceUtil.Companion.getStrategyType
|
||||
import java.io.File
|
||||
import kotlin.math.abs
|
||||
|
||||
/**
|
||||
* @description 记录仪相关操作
|
||||
@@ -175,16 +176,16 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
// TANLU_ROAD_WORK
|
||||
// )
|
||||
// ) {
|
||||
taskAsync(1_500) {
|
||||
try {
|
||||
// taskAsync(1_500) {
|
||||
// try {
|
||||
// VoiceController.speakVoice("上报失败")
|
||||
// if (isCustom) {
|
||||
// sendGetInfoFailedReceiver(mType)
|
||||
// }
|
||||
} catch (e: java.lang.Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
// } catch (e: java.lang.Exception) {
|
||||
// e.printStackTrace()
|
||||
// }
|
||||
// }
|
||||
|
||||
//获取图片失败也上报,图片不打点
|
||||
if (isCustom) {
|
||||
@@ -222,19 +223,19 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
return
|
||||
}
|
||||
|
||||
var minSpeedPic =
|
||||
val minSpeedPic =
|
||||
getStrategyMinSpeed(
|
||||
AbsMogoApplication.getApp().applicationContext,
|
||||
"pic",
|
||||
getStrategyType("pic")
|
||||
)
|
||||
var maxSpeedPic =
|
||||
val maxSpeedPic =
|
||||
getStrategyMaxSpeed(
|
||||
AbsMogoApplication.getApp().applicationContext,
|
||||
"pic",
|
||||
getStrategyType("pic")
|
||||
)
|
||||
var speed = LocationUtil.getInstance().getSpeed()
|
||||
val speed = LocationUtil.getInstance().getSpeed()
|
||||
|
||||
if (!TextUtils.isEmpty(mType)) {
|
||||
Log.d(TAG, "onTakePhotoSuccess mType != null")
|
||||
@@ -247,8 +248,8 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
"onTakePhotoSuccess maxSpeedPic = $maxSpeedPic ---> speed = $speed ---->minSpeedPic= $minSpeedPic"
|
||||
)
|
||||
if (maxSpeedPic == -1) {
|
||||
if (speed >= (Math.abs(minSpeedPic) / 3.6f)) {
|
||||
Log.d(TAG, "onTakePhotoSuccess abs =" + (Math.abs(minSpeedPic) / 3.6f))
|
||||
if (speed >= (abs(minSpeedPic) / 3.6f)) {
|
||||
Log.d(TAG, "onTakePhotoSuccess abs =" + (abs(minSpeedPic) / 3.6f))
|
||||
CosStatusController().uploadFile(
|
||||
mutableListOf(photoPath as String),
|
||||
entity,
|
||||
@@ -283,9 +284,9 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
|
||||
//获取视频成功
|
||||
override fun onTakeVideoSuccess(camera: Int, videoPath: String?) {
|
||||
var thumbnailPath =
|
||||
val thumbnailPath =
|
||||
AbsMogoApplication.getApp().applicationContext.filesDir.parent + File.separator + "Thumbnail${System.currentTimeMillis()}.jpg"
|
||||
var isSuccess = getVideoThumbnail(videoPath!!, thumbnailPath)
|
||||
val isSuccess = getVideoThumbnail(videoPath!!, thumbnailPath)
|
||||
Log.d(
|
||||
TAG,
|
||||
"getVideo onTakeVideoSuccess===$videoPath -----> isSuccess= $isSuccess ----> mType = $mType --- mainInfoId = $mainInfoId"
|
||||
@@ -300,39 +301,39 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
}
|
||||
|
||||
if (isSuccess) {
|
||||
var minSpeedVideo = getStrategyMinSpeed(
|
||||
val minSpeedVideo = getStrategyMinSpeed(
|
||||
AbsMogoApplication.getApp().applicationContext, "video",
|
||||
getStrategyType("video")
|
||||
)
|
||||
var maxSpeedVideo = getStrategyMaxSpeed(
|
||||
val maxSpeedVideo = getStrategyMaxSpeed(
|
||||
AbsMogoApplication.getApp().applicationContext, "video",
|
||||
getStrategyType("video")
|
||||
)
|
||||
var speed = LocationUtil.getInstance().getSpeed()
|
||||
val speed = LocationUtil.getInstance().getSpeed()
|
||||
|
||||
entity?.let {
|
||||
if (entity.isCustom) {
|
||||
compressVideo(videoPath, thumbnailPath, entity)
|
||||
if (it.isCustom) {
|
||||
compressVideo(videoPath, thumbnailPath, it)
|
||||
}else if (entity.fromType in STRATEGY_UPLOAD_TYPE_ARRAY) {
|
||||
// 属于策略上报
|
||||
compressVideo(videoPath, thumbnailPath, entity)
|
||||
compressVideo(videoPath, thumbnailPath, it)
|
||||
} else {
|
||||
Log.d(
|
||||
TAG,
|
||||
"onTakeVideoSuccess maxSpeedVideo = $maxSpeedVideo --->speed= $speed + minSpeedVideo = $minSpeedVideo"
|
||||
)
|
||||
if (maxSpeedVideo == -1) {
|
||||
Log.d(TAG, "onTakeVideoSuccess 111 abs =" + (Math.abs(minSpeedVideo) / 3.6f))
|
||||
if (speed >= (Math.abs(minSpeedVideo) / 3.6f)) {
|
||||
Log.d(TAG, "onTakeVideoSuccess 111 abs =" + (abs(minSpeedVideo) / 3.6f))
|
||||
if (speed >= (abs(minSpeedVideo) / 3.6f)) {
|
||||
//获取视频以及缩略图成功,开始上报
|
||||
compressVideo(videoPath, thumbnailPath, entity)
|
||||
compressVideo(videoPath, thumbnailPath, it)
|
||||
}
|
||||
}
|
||||
|
||||
if (minSpeedVideo > 0 && maxSpeedVideo > 0) {
|
||||
Log.d(TAG, "onTakeVideoSuccess minSpeedVideo > 0 -- speed = $speed")
|
||||
if ((speed >= (minSpeedVideo / 3.6f)) && speed <= (maxSpeedVideo / 3.6f)) {
|
||||
compressVideo(videoPath, thumbnailPath, entity)
|
||||
compressVideo(videoPath, thumbnailPath, it)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -342,7 +343,7 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
}
|
||||
}
|
||||
|
||||
var videoAndThumbMap: MutableMap<String, String> = mutableMapOf()
|
||||
private var videoAndThumbMap: MutableMap<String, String> = mutableMapOf()
|
||||
|
||||
//获取视频失败
|
||||
override fun onTakeVideoFail(camera: Int) {
|
||||
@@ -387,12 +388,12 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
/**
|
||||
* 压缩视频并且上传
|
||||
*/
|
||||
fun compressVideo(videoPath: String, thumbnailPath: String, entity: TakeEntity) {
|
||||
private fun compressVideo(videoPath: String, thumbnailPath: String, entity: TakeEntity) {
|
||||
Log.d(
|
||||
TAG,
|
||||
"outputVideoPath = " + outputVideoPath + ">> videoPath=" + videoPath + " isCustom = ${entity?.isCustom}"
|
||||
"outputVideoPath = " + outputVideoPath + ">> videoPath=" + videoPath + " isCustom = ${entity.isCustom}"
|
||||
)
|
||||
var startTime = System.currentTimeMillis()
|
||||
val startTime = System.currentTimeMillis()
|
||||
Thread(Runnable {
|
||||
try {
|
||||
VideoProcessor.processor(AbsMogoApplication.getApp().applicationContext)
|
||||
|
||||
@@ -44,7 +44,7 @@ object InformationUploadController {
|
||||
it.cosParameter = cosParameter
|
||||
it.isCustomSend = isCustomSend
|
||||
it.callback = callback
|
||||
tryUploadInformation(it)
|
||||
// tryUploadInformation(it)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ object InformationUploadController {
|
||||
it.informationType = informationType
|
||||
it.newsType = newsType
|
||||
it.operType = operType
|
||||
tryUploadInformation(it)
|
||||
// tryUploadInformation(it)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,4 +3,5 @@
|
||||
<color name="module_commons_dlg_bkg">#7f000000</color>
|
||||
<color name="module_commons_wm_dialog_text_textColor">#FFFFFF</color>
|
||||
<color name="v2x_FFF_666">#FFFFFF</color>
|
||||
<color name="module_commons_FFF_333">#FFFFFF</color>
|
||||
</resources>
|
||||
@@ -146,8 +146,8 @@
|
||||
android:background="@drawable/module_ext_dw_common_corner_bkg"
|
||||
android:gravity="center"
|
||||
android:text="前方\n实况"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/module_ext_navi_exit_textSize"
|
||||
android:textColor="@color/module_commons_FFF_333"
|
||||
android:textSize="@dimen/v2x_cancel_help_text_size"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
@@ -160,8 +160,8 @@
|
||||
android:background="@drawable/module_ext_dw_common_corner_bkg"
|
||||
android:gravity="center"
|
||||
android:text="取消\n求助"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/module_ext_navi_exit_textSize"
|
||||
android:textColor="@color/module_commons_FFF_333"
|
||||
android:textSize="@dimen/v2x_cancel_help_text_size"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
<dimen name="module_ext_button_container_marginLeft">32px</dimen>
|
||||
<dimen name="module_ext_button_container_marginBottom">60px</dimen>
|
||||
<dimen name="module_ext_navi_exit_textSize">32px</dimen>
|
||||
<dimen name="v2x_cancel_help_text_size">30px</dimen>
|
||||
<dimen name="module_entrance_id_button_marginTop">20px</dimen>
|
||||
|
||||
<!-- module_ext_layout_extensions.xml-->
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
<dimen name="module_ext_button_container_marginLeft">32px</dimen>
|
||||
<dimen name="module_ext_button_container_marginBottom">60px</dimen>
|
||||
<dimen name="module_ext_navi_exit_textSize">32px</dimen>
|
||||
<dimen name="v2x_cancel_help_text_size">30px</dimen>
|
||||
<dimen name="module_entrance_id_button_marginTop">20px</dimen>
|
||||
|
||||
<!-- module_ext_layout_extensions.xml-->
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
<dimen name="module_ext_button_container_marginLeft">20px</dimen>
|
||||
<dimen name="module_ext_button_container_marginBottom">30px</dimen>
|
||||
<dimen name="module_ext_navi_exit_textSize">16px</dimen>
|
||||
<dimen name="v2x_cancel_help_text_size">14px</dimen>
|
||||
<dimen name="module_entrance_id_button_marginTop">8px</dimen>
|
||||
|
||||
<!-- module_ext_layout_extensions.xml-->
|
||||
@@ -171,4 +172,5 @@
|
||||
<dimen name="module_ext_seek_help_notice_text_margin_start">10px</dimen>
|
||||
<dimen name="module_ext_seek_help_notice_number_text_size">22px</dimen>
|
||||
<dimen name="module_ext_seek_help_notice_bg_margin_top">16px</dimen>
|
||||
|
||||
</resources>
|
||||
@@ -43,6 +43,7 @@ class GuideFragment : MvpFragment<GuideConstract.View, GuidePresenter>(), GuideC
|
||||
adapter = GuideAdapter(this)
|
||||
moduleGuideViewPager.adapter = adapter
|
||||
(moduleGuideViewPager.getChildAt(0) as RecyclerView).layoutManager!!.isItemPrefetchEnabled = false
|
||||
@Suppress("DEPRECATION")
|
||||
moduleGuideIndicator.setSliderColor(context!!.resources.getColor(R.color.module_guide_indicator_dark), context!!.resources.getColor(R.color.module_guide_indicator_white))
|
||||
.setSliderWidth(context!!.resources.getDimension(R.dimen.dp_22))
|
||||
.setSlideMode(IndicatorSlideMode.NORMAL)
|
||||
|
||||
@@ -30,6 +30,7 @@ class GuideStageFiveFragment : MvpFragment<IView, Presenter<IView>> {
|
||||
|
||||
override fun initViews() {
|
||||
if(!DebugConfig.isLauncher()){
|
||||
@Suppress("DEPRECATION")
|
||||
moduleGuidePageFive.background = context!!.resources!!.getDrawable(R.mipmap.module_guide_item_stage_five)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ class GuideStageFourFragment : MvpFragment<IView, Presenter<IView>> {
|
||||
|
||||
override fun initViews() {
|
||||
if(!DebugConfig.isLauncher()){
|
||||
@Suppress("DEPRECATION")
|
||||
moduleGuidePageFour.background = context!!.resources!!.getDrawable(R.mipmap.module_guide_item_stage_four)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ class GuideStageOneFragment : MvpFragment<IView, Presenter<IView>> {
|
||||
override fun initViews() {
|
||||
containerFragment?.visibleRight()
|
||||
if(!DebugConfig.isLauncher()){
|
||||
@Suppress("DEPRECATION")
|
||||
moduleGuidePageOne.background = context!!.resources!!.getDrawable(R.mipmap.module_guide_item_stage_one)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ class GuideStageThreeFragment : MvpFragment<IView, Presenter<IView>> {
|
||||
|
||||
override fun initViews() {
|
||||
if(!DebugConfig.isLauncher()){
|
||||
@Suppress("DEPRECATION")
|
||||
moduleGuidePageThree.background = context!!.resources!!.getDrawable(R.mipmap.module_guide_item_stage_three)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ class GuideStageTwoFragment : MvpFragment<IView, Presenter<IView>> {
|
||||
|
||||
override fun initViews() {
|
||||
if(!DebugConfig.isLauncher()){
|
||||
@Suppress("DEPRECATION")
|
||||
moduleGuidePageTwo.background = context!!.resources!!.getDrawable(R.mipmap.module_guide_item_stage_two)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@file:Suppress("DEPRECATION")
|
||||
|
||||
package com.zhidao.mogo.module.left.panel
|
||||
|
||||
import android.content.Context
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@file:Suppress("DEPRECATION")
|
||||
|
||||
package com.mogo.module.push.utils
|
||||
|
||||
import android.util.ArrayMap
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.module.push.view
|
||||
|
||||
import android.animation.Animator
|
||||
import android.animation.ObjectAnimator
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.PixelFormat
|
||||
import android.os.Build
|
||||
@@ -87,7 +88,7 @@ class FloatView constructor(
|
||||
}
|
||||
|
||||
private fun turnNextMessage() {
|
||||
pushViewModel?.pushBean?.apply {
|
||||
pushViewModel.pushBean?.apply {
|
||||
showTimeout = 0
|
||||
updateTimer()
|
||||
}
|
||||
@@ -123,17 +124,17 @@ class FloatView constructor(
|
||||
pushTimer.text = if (bean.showTimeout > 99) "" else "${bean.showTimeout}s"
|
||||
|
||||
// image
|
||||
if (bean.imageUrl.isNullOrEmpty() && bean.QRCode.isNullOrEmpty()) {
|
||||
if (bean.imageUrl.isEmpty() && bean.QRCode.isEmpty()) {
|
||||
pushImage.gone()
|
||||
} else if (!bean.imageUrl.isNullOrEmpty()) {
|
||||
var params = pushImage.layoutParams
|
||||
} else if (bean.imageUrl.isNotEmpty()) {
|
||||
val params = pushImage.layoutParams
|
||||
params.width = getImgWidth()
|
||||
params.height = getImgHeight()
|
||||
pushImage.layoutParams = params
|
||||
pushImage.visible()
|
||||
GlideApp.with(this).load(bean.imageUrl).into(pushImage)
|
||||
} else if (!bean.QRCode.isNullOrEmpty()) {
|
||||
var params = pushImage.layoutParams
|
||||
} else if (bean.QRCode.isNotEmpty()) {
|
||||
val params = pushImage.layoutParams
|
||||
params.width = getQrImgWidth()
|
||||
params.height = getQrImgHeight()
|
||||
pushImage.layoutParams = params
|
||||
@@ -167,7 +168,7 @@ class FloatView constructor(
|
||||
}
|
||||
|
||||
// content
|
||||
if (bean.content.isNullOrEmpty()) {
|
||||
if (bean.content.isEmpty()) {
|
||||
pushContent.gone()
|
||||
} else {
|
||||
pushContent.text = bean.content
|
||||
@@ -175,7 +176,7 @@ class FloatView constructor(
|
||||
}
|
||||
|
||||
// tts
|
||||
if (!bean?.tts?.isNullOrEmpty()) {
|
||||
if (bean.tts.isNotEmpty()) {
|
||||
AIAssist.getInstance(context).speakTTSVoice(bean.tts)
|
||||
}
|
||||
}
|
||||
@@ -185,6 +186,7 @@ class FloatView constructor(
|
||||
abstract fun getQrImgWidth(): Int
|
||||
abstract fun getQrImgHeight(): Int
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun timer(time: Int) {
|
||||
Logger.d(TAG, "time = $time")
|
||||
pushTimer.text = "${time}s"
|
||||
@@ -211,7 +213,7 @@ class FloatView constructor(
|
||||
private var topViewStatusListener = object : IMogoTopViewStatusListener {
|
||||
override fun onViewRemoved(view: View?) {
|
||||
isAddWindow = false
|
||||
if (pushViewModel?.pushBean?.showTimeout ?: 0 > 0) {
|
||||
if (pushViewModel.pushBean?.showTimeout ?: 0 > 0) {
|
||||
if (getApis(context).statusManagerApi.isV2XShow) {
|
||||
// 被中断的消息,需要再次被显示一次
|
||||
uiHandler.removeCallbacks(delayClosePush)
|
||||
@@ -332,7 +334,7 @@ class FloatView constructor(
|
||||
|
||||
override fun setBean(bean: PushBean) {
|
||||
super.setBean(bean)
|
||||
var paddingBottom: Int = 0
|
||||
var paddingBottom = 0
|
||||
if (pushButton.isVisible) {
|
||||
paddingBottom =
|
||||
context.resources.getDimensionPixelSize(R.dimen.module_push_content_paddingBottom_vertical)
|
||||
@@ -467,7 +469,7 @@ class FloatView constructor(
|
||||
|
||||
private fun updateTimer() {
|
||||
uiHandler.removeCallbacks(delayClosePush)
|
||||
var time = pushViewModel.pushBean?.showTimeout ?: 0
|
||||
val time = pushViewModel.pushBean?.showTimeout ?: 0
|
||||
if (time > 0) {
|
||||
pushViewModel.pushBean!!.showTimeout--
|
||||
pushViewController?.timer(time)
|
||||
|
||||
@@ -81,7 +81,7 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
}
|
||||
|
||||
override fun onCalculateSuccess() {
|
||||
var calculatedStrategies = SearchApisHolder.getNaviApis().calculatedStrategies
|
||||
val calculatedStrategies = SearchApisHolder.getNaviApis().calculatedStrategies
|
||||
if (calculatedStrategies != null && calculatedStrategies.size > 0) {
|
||||
mAdapter.setDatas(calculatedStrategies)
|
||||
mAdapter.selectTag = calculatedStrategies[0].tagId
|
||||
@@ -143,14 +143,14 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
return R.layout.fragment_search_category
|
||||
}
|
||||
|
||||
var mogoTip: MogoLatLng? = null
|
||||
private var mogoTip: MogoLatLng? = null
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
mogoTip = arguments?.getParcelable<MogoLatLng>(AMapConstants.KEY_PARCELABLE)
|
||||
mogoTip = arguments?.getParcelable(AMapConstants.KEY_PARCELABLE)
|
||||
}
|
||||
|
||||
// 是否开启导航
|
||||
var isStartedNavi = false
|
||||
private var isStartedNavi = false
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
|
||||
@@ -167,7 +167,7 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
|
||||
SearchApisHolder.getRegisterCenterApis().registerMogoNaviListener(AMapConstants.PATH_FRAGMENT_CHOOSE_PATH, this)
|
||||
|
||||
var arrayList = ArrayList<MogoCalculatePath>()
|
||||
val arrayList = ArrayList<MogoCalculatePath>()
|
||||
mAdapter = CalculatePathAdapter(activity, arrayList)
|
||||
rv_search_result.layoutManager = LinearLayoutManager(activity, LinearLayoutManager.VERTICAL, false)
|
||||
|
||||
@@ -185,7 +185,7 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
}
|
||||
|
||||
mAdapter.setOnClickListener {
|
||||
var item = it.getTag(R.id.tag_item) as MogoCalculatePath
|
||||
val item = it.getTag(R.id.tag_item) as MogoCalculatePath
|
||||
selectPath(item)
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
}
|
||||
|
||||
private fun registerRetryVoice() {
|
||||
AIAssist.getInstance(context).registerUnWakeupCommand("retry", arrayOf<String>("重试"), this)
|
||||
AIAssist.getInstance(context).registerUnWakeupCommand("retry", arrayOf("重试"), this)
|
||||
}
|
||||
|
||||
private fun unregisterRetryVoice() {
|
||||
@@ -229,7 +229,7 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
|
||||
private fun selectPath(item: MogoCalculatePath?) {
|
||||
item?.let {
|
||||
mAdapter.setSelectTag(item.tagId)
|
||||
mAdapter.selectTag = item.tagId
|
||||
if (SearchApisHolder.getNaviApis().itemClickInteraction != null) {
|
||||
SearchApisHolder.getNaviApis().itemClickInteraction.onItemClicked(item.tagId)
|
||||
}
|
||||
@@ -265,11 +265,10 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
}
|
||||
|
||||
private fun choosePath(intent: Intent?) {
|
||||
var dataJsonStr = intent?.getStringExtra("data") ?: ""
|
||||
val dataJsonStr = intent?.getStringExtra("data") ?: ""
|
||||
try {
|
||||
var jsonObj = JSONObject(dataJsonStr)
|
||||
var routePlan = jsonObj.optString("route_choice", " ")
|
||||
when (routePlan) {
|
||||
val jsonObj = JSONObject(dataJsonStr)
|
||||
when (jsonObj.optString("route_choice", " ")) {
|
||||
"fastest" -> {
|
||||
// 时间最短
|
||||
selectItem(mTimeShortestPosition)
|
||||
@@ -282,19 +281,18 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
@JvmField
|
||||
val TAG: String = "ChoosePathFragment"
|
||||
const val TAG: String = "ChoosePathFragment"
|
||||
|
||||
fun newInstance(searchPoi: MogoLatLng): Fragment {
|
||||
var bundle = Bundle()
|
||||
val bundle = Bundle()
|
||||
bundle.putParcelable(AMapConstants.KEY_PARCELABLE, searchPoi)
|
||||
var choosePathFragment = ChoosePathFragment()
|
||||
val choosePathFragment = ChoosePathFragment()
|
||||
choosePathFragment.arguments = bundle
|
||||
return choosePathFragment
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@file:Suppress("DEPRECATION")
|
||||
|
||||
package com.mogo.module.share
|
||||
|
||||
import android.content.Context
|
||||
|
||||
@@ -61,6 +61,7 @@ object UploadHelper {
|
||||
// 没网就直接提示失败
|
||||
Logger.e("UploadHelper", "upload not net ")
|
||||
AIAssist.getInstance(context).speakTTSVoice("分享失败,请检查网络")
|
||||
@Suppress("DEPRECATION")
|
||||
TipToast.tip("分享失败,请检查网络", TipDrawable(context.resources.getDrawable(R.drawable.module_share_upload_fail)))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@file:Suppress("DEPRECATION")
|
||||
|
||||
package com.zhidao.mogo.module.splash
|
||||
|
||||
import android.content.Context
|
||||
|
||||
@@ -22,7 +22,7 @@ android {
|
||||
}
|
||||
}
|
||||
ndk {
|
||||
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a"
|
||||
abiFilters "armeabi-v7a"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ public class V2XSeekHelpButton implements IV2XButton {
|
||||
tv = V2XServiceManager.getMogoEntranceButtonController().getButton(ButtonIndex.BUTTON2);
|
||||
tv.setText("取消\n求助");
|
||||
tv.setVisibility(View.VISIBLE);
|
||||
tv.setBackgroundResource(R.drawable.bg_v2x_event_live_show);
|
||||
tv.setBackgroundResource(R.drawable.bg_v2x_cancel_help);
|
||||
tv.setOnClickListener(v -> {
|
||||
//调用取消求助接口
|
||||
// TODO: 2020/5/18 回调,显示对话框
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true">
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:angle="135" android:endColor="#3A435E" android:startColor="#525B7B" android:type="linear" />
|
||||
<corners android:radius="@dimen/dp_26" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:angle="135" android:endColor="#3A435E" android:startColor="#525B7B" android:type="linear" />
|
||||
<corners android:radius="@dimen/dp_26" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -33,7 +33,7 @@
|
||||
android:layout_alignTop="@+id/road_case_style"
|
||||
android:paddingRight="@dimen/dp_28"
|
||||
android:text="100"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textSize="@dimen/dp_26" />
|
||||
|
||||
<ImageView
|
||||
@@ -56,7 +56,7 @@
|
||||
android:gravity="left"
|
||||
android:paddingRight="@dimen/dp_28"
|
||||
android:text="100"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textSize="@dimen/dp_26" />
|
||||
|
||||
<ImageView
|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 822 B After Width: | Height: | Size: 701 B |
|
Before Width: | Height: | Size: 771 B After Width: | Height: | Size: 486 B |
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="module_commons_FFF_333_light">#333333</color>
|
||||
</resources>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true">
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:angle="135" android:endColor="#E6DEDEDE" android:startColor="#E6DEDEDE" android:type="linear" />
|
||||
<corners android:radius="@dimen/dp_26" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:angle="135" android:endColor="#E6DEDEDE" android:startColor="#E6DEDEDE" android:type="linear" />
|
||||
<corners android:radius="@dimen/dp_26" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -4,8 +4,8 @@
|
||||
<corners android:radius="@dimen/dp_21"/>
|
||||
|
||||
<gradient
|
||||
android:startColor="#B31F7EFF"
|
||||
android:endColor="#B31E57A4"
|
||||
android:startColor="#579EFF"
|
||||
android:endColor="#357BDA"
|
||||
android:type="linear"
|
||||
android:angle="180"/>
|
||||
|
||||
|
||||