v0.3.0 — floating threat-circle overlay (chat-bubble style)
A 140dp draggable bubble shows the same map / tier scrim / user dot / ALPR dots that the in-app circle does, on top of any other app, while scanning is on. Tap = brings the host app forward; drag = repositions. - Manifest: add SYSTEM_ALERT_WINDOW (special-access — granted via system Settings page, not the runtime prompt). - Settings: add overlayEnabled flag (default off) + a "Display over other apps" section in SettingsScreen. Flipping the toggle to on fires Settings.ACTION_MANAGE_OVERLAY_PERMISSION so the user can grant via the system page; if they deny or revoke, the OverlayMgr re-checks canDrawOverlays() at every show() call and silently no-ops, no crash. - New OverlayManager: owns the WindowManager view at TYPE_APPLICATION_OVERLAY with FLAG_NOT_FOCUSABLE | FLAG_NOT_TOUCH_MODAL so touches outside the bubble pass through and the bubble never steals IME focus. Custom OverlayOwner implementing LifecycleOwner + SavedStateRegistryOwner since LifecycleService doesn't satisfy SSR (Compose's ComposeView requires both via the view tree). - Drag/tap handler at the View layer: rawX/rawY math for the drag, TAP_SLOP_PX guard to discriminate tap from drag, tap launches MainActivity (FLAG_ACTIVITY_NEW_TASK | SINGLE_TOP). - New OverlayBubble composable: smaller (140dp) self-contained version of the in-app threat circle that pulls running/threat/location/ mapPoints/proximity from the same companion StateFlows. Shared dot-drawable helper extracted into ui/MarkerIcons.kt. - DetectionService observes settings.overlayEnabled in beginScanning and toggles the overlay; endScanning hides it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -38,6 +38,12 @@
|
||||
<!-- Vibration on threat-tier escalation -->
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
|
||||
<!-- Floating threat-circle overlay (chat-bubble style). Special-access
|
||||
permission — user grants via system Settings page, not the runtime
|
||||
prompt. Only consumed when the user opts in to the bubble in app
|
||||
Settings; otherwise dormant. -->
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
|
||||
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true" />
|
||||
|
||||
<!-- Allow Intent.setPackage("com.google.android.apps.maps") on Android 11+
|
||||
|
||||
Reference in New Issue
Block a user