diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a119d03..00aede0 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -8,7 +8,6 @@ - @@ -20,7 +19,6 @@ android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/Theme.LogCam" - android:requestLegacyExternalStorage="true" tools:targetApi="q"> - this.currentLocation = location - } - - // 开始实时位置更新 - locationManagerHelper?.requestLocationUpdates { location -> - this.currentLocation = location - } - } - - @SuppressLint("MissingPermission") - private fun getCurrentLocation(): Location? { - return currentLocation - } - - override fun onDestroy() { - super.onDestroy() - // 停止位置更新 - locationManagerHelper?.stopLocationUpdates() - cameraExecutor.shutdown() - } private fun allPermissionsGranted() = REQUIRED_PERMISSIONS.all { ContextCompat.checkSelfPermission(baseContext, it) == PackageManager.PERMISSION_GRANTED