feat: Start BLE scanning with only core permissions granted

Allow the app to scan for AirPods when only BLE scan permissions are granted, without waiting for all optional permissions (notifications, overlay, etc.).

Add isScanBlocking flag to Permission enum. Gate monitor service and pod scanning on scan permissions only. Show scan-blocking permission cards with error color and sorted first. Wrap BLUETOOTH_CONNECT-dependent calls in try-catch for graceful degradation. Fix POST_NOTIFICATIONS minApiLevel from S (31) to TIRAMISU (33).
This commit is contained in:
darken
2026-03-10 16:37:43 +00:00
committed by Matthias Urhahn
parent 12e35631d6
commit 193a1030fb
10 changed files with 51 additions and 20 deletions
@@ -22,6 +22,7 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.test.UnconfinedTestDispatcher
import kotlinx.coroutines.test.resetMain
import kotlinx.coroutines.test.runTest
@@ -81,6 +82,9 @@ class OverviewViewModelTest : BaseTest() {
permissionTool = mockk<PermissionTool>(relaxed = true).also {
every { it.missingPermissions } returns missingPermissionsFlow
every { it.missingScanPermissions } returns missingPermissionsFlow.map { perms ->
perms.filter { it.isScanBlocking }.toSet()
}
}
generalSettings = mockk<GeneralSettings>().also {