From 013eeeb54887a46fc9353b76e50c1e14972cf88f Mon Sep 17 00:00:00 2001 From: xiajiid Date: Sun, 8 Feb 2026 17:16:38 +0800 Subject: [PATCH] Reduce permissions and simplify CameraActivity for Huawei install compatibility --- app/src/main/AndroidManifest.xml | 2 -- .../java/com/example/app/CameraActivity.kt | 34 +------------------ 2 files changed, 1 insertion(+), 35 deletions(-) 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