From 85ec10836b519551a0d16f0c9bbfd818946111aa Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Aug 2026 22:56:27 +0000 Subject: [PATCH] Request only the Bluetooth permission the app actually uses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lint flagged ACCESS_FINE_LOCATION declared without ACCESS_COARSE_LOCATION, which Android 12 requires to be requested together. Rather than add the missing one, drop location entirely: the Bluetooth transport only talks to already-paired devices, enumerating bonded devices and opening an RFCOMM socket. Neither is a scan, so no location access is needed. BLUETOOTH_SCAN and BLUETOOTH_ADVERTISE go for the same reason — nothing was using them. Discovery of unpaired devices would bring all of these back; the manifest notes what that would require. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_015qjfMiPUDshdKEUa6vxqzN --- app/src/main/AndroidManifest.xml | 23 ++++++++----------- .../org/prolibertate/games/MainActivity.kt | 10 +++----- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d1e9b20..4e8e6f9 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -10,25 +10,22 @@ - + - - - - diff --git a/app/src/main/java/org/prolibertate/games/MainActivity.kt b/app/src/main/java/org/prolibertate/games/MainActivity.kt index eb041c1..7d13af8 100644 --- a/app/src/main/java/org/prolibertate/games/MainActivity.kt +++ b/app/src/main/java/org/prolibertate/games/MainActivity.kt @@ -47,14 +47,10 @@ class MainActivity : ComponentActivity() { } private fun requestBluetoothPermissions() { + // Only CONNECT: the transport reaches paired devices and never scans. + // See the manifest for what discovery of unpaired devices would add. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { - bluetoothPermissions.launch( - arrayOf( - Manifest.permission.BLUETOOTH_CONNECT, - Manifest.permission.BLUETOOTH_SCAN, - Manifest.permission.BLUETOOTH_ADVERTISE, - ) - ) + bluetoothPermissions.launch(arrayOf(Manifest.permission.BLUETOOTH_CONNECT)) } }