From 7ceba4fee258202fa9f08340f6f42cb93f5676bb Mon Sep 17 00:00:00 2001 From: chenfufeng Date: Fri, 19 Jul 2024 15:27:03 +0800 Subject: [PATCH] =?UTF-8?q?[6.5.0][Fix]=E8=A7=A3=E5=86=B3=E9=A6=96?= =?UTF-8?q?=E6=AC=A1=E5=AE=89=E8=A3=85=E6=97=A0=E6=B3=95=E8=8E=B7=E5=BE=97?= =?UTF-8?q?=E9=AB=98=E5=BE=B7=E5=AE=9A=E4=BD=8D=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mogo/eagle/core/function/main/MainActivity.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.kt index 8eb8f56460..12d2acb53f 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.kt @@ -34,6 +34,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager import com.mogo.eagle.core.function.call.hmi.CallerHmiFloatViewManager import com.mogo.eagle.core.function.call.hmi.CallerHmiManager +import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager import com.mogo.eagle.core.function.call.setting.CallerRequestActivityHandleManager import com.mogo.eagle.core.function.call.startup.CallerStartUpManager.initStageTwo import com.mogo.eagle.core.function.hmi.R @@ -356,6 +357,7 @@ open class MainActivity : MvpActivity(), MainView, super.onRequestPermissionsResult(requestCode, permissions, grantResults) if (requestCode == MainPresenter.MOGO_PERMISSION_REQUEST_CODE) { var isAllGranted = true + var isLocationGranted = true // 判断是否所有的权限都已经授予了 val reasong = StringBuffer() grantResults.forEachIndexed { index, grant -> @@ -377,6 +379,7 @@ open class MainActivity : MvpActivity(), MainView, Manifest.permission.ACCESS_LOCATION_EXTRA_COMMANDS, Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION -> { + isLocationGranted = false if(!reasong.contains("定位")){ reasong.append("定位、") } @@ -385,6 +388,9 @@ open class MainActivity : MvpActivity(), MainView, } } } + if (isLocationGranted) { + CallerMapUIServiceManager.getGDLocationServer()?.start(context!!) + } if (isAllGranted) { isFirst = false } else {