Merge branch 'dev_robotaxi-d-app-module_290_220715_2.9.0' of gitlab.zhidaoauto.com:zhjt/AndroidApp/MoGoEagleEye into dev_robotaxi-d-app-module_290_220715_2.9.0

This commit is contained in:
wangmingjun
2022-07-31 15:25:46 +08:00

View File

@@ -33,9 +33,7 @@ object EnvChangeManager {
fun getCityName(): String {
val cache = getConfig()
return if (cache == null) {
val cityCode = CallerMapLocationListenerManager.getCurrentLocation()?.cityCode ?: SharedPrefsMgr.getInstance(Utils.getApp()).getString(SharedPrefsConstants.LOCATION_CITY_CODE) ?: "010"
updateCityCode(cityCode)
when(cityCode) {
when(CallerMapLocationListenerManager.getCurrentLocation()?.cityCode ?: SharedPrefsMgr.getInstance(Utils.getApp()).getString(SharedPrefsConstants.LOCATION_CITY_CODE) ?: "010") {
"010" -> "北京"
"0734" -> "衡阳"
else -> "未知"
@@ -51,17 +49,15 @@ object EnvChangeManager {
fun getNetMode(): String {
val cache = getConfig()
if (cache == null) {
val mode = DebugConfig.getNetMode()
updateNetMode(mode)
return when(mode) {
return if (cache == null) {
when(DebugConfig.getNetMode()) {
DebugConfig.NET_MODE_RELEASE -> "生产"
DebugConfig.NET_MODE_QA -> "测试"
DebugConfig.NET_MODE_DEMO -> "演示"
else -> "未知"
}
} else {
return when(cache.second) {
when(cache.second) {
DebugConfig.NET_MODE_RELEASE -> "生产"
DebugConfig.NET_MODE_QA -> "测试"
DebugConfig.NET_MODE_DEMO -> "演示"