1+16强制去掉故障求助

This commit is contained in:
tongchenfei
2020-12-04 18:22:15 +08:00
parent 6deb58d5fc
commit 3449eb61a3
3 changed files with 9 additions and 3 deletions

1
.idea/gradle.xml generated
View File

@@ -74,6 +74,7 @@
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>

View File

@@ -6,6 +6,7 @@ import android.view.View
import android.widget.GridLayout
import android.widget.ImageView
import android.widget.TextView
import com.mogo.commons.debug.DebugConfig
import com.mogo.module.share.R
import com.mogo.module.share.bean.FixableButton
import com.mogo.module.share.constant.ShareConstants
@@ -64,7 +65,9 @@ class GridBtnManager(val context: Context, private val container: GridLayout, pr
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_ACCIDENT, title = "事故"))
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_ROAD_CONSTRUCTION, title = "道路施工"))
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_REAL_TIME_TRAFFIC, title = "实时路况"))
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_SEEK_HELP, title = "故障求助"))
if(DebugConfig.isMapBased()) {
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_SEEK_HELP, title = "故障求助"))
}
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_STAGNANT_WATER, title = "道路积水"))
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_ROAD_ICY, title = "道路结冰"))
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_DENSE_FOG, title = "浓雾"))
@@ -72,7 +75,9 @@ class GridBtnManager(val context: Context, private val container: GridLayout, pr
val btnList = GsonUtil.arrayFromJson(config, FixableButton::class.java)
if(btnList!=null&&btnList.isNotEmpty()) {
btnList.forEach { btn ->
generateShareButton(btn)
if(btn.poiType != IMogoTanluProvider.TYPE_SEEK_HELP||btn.poiType == IMogoTanluProvider.TYPE_SEEK_HELP&&DebugConfig.isMapBased()){
generateShareButton(btn)
}
}
}
}

View File

@@ -136,7 +136,7 @@ class BlockStrategy(private val context: Context, private val apis: IMogoService
if (current - startRecordDistanceTime >= DISTANCE_RECORD_TIME) {
// 超过阈值,准备判断是否拥堵
startRecordDistanceTime = 0L
if (tripDistance in 30..1000 && isClose() && currentSpeed < 40) {
if (tripDistance in 100..1000 && isClose() && currentSpeed < 40) {
Logger.d(TAG, "根据距离,判定为拥堵,准备上报, tripDistance: $tripDistance, frontDistance: $frontDistance, currentSpeed: $currentSpeed")
val p = TanluUploadParams(IMogoTanluProvider.TYPE_BLOCK, IMogoTanluProvider.UPLOAD_FROM_STRATEGY_BLOCK_AUTO)
val latLon = MogoLatLng(lat, lon)