The Android Open Source Project has infrastructure for this since it's a regular part of the app sandbox and permission model improving. We add Network and Sensors permission toggles in GrapheneOS where Network is based on the existing low-level INTERNET permission and Sensors is entirely new.

Reply to this note

Please Login to reply.

Discussion

So what exactly is in the sensors category?

Accelerometer, gyroscope, compass, barometer, plus anything device specific like the thermometer

When Android apps request a permission is it an active request they make or are syscalls routed to some policy engine that triggers the "Allow/deny window" to pop up?