An option was added for developers in Android 10 called "Sensors Off" that adds a "quick settings tile" in the quick settings tray and allows the user to completely turn off all sensors. When a user enables Sensors off in developer options, a new tile appears in the quick settings tray. You can use the tile to prevent apps from accessing the camera, microphone, and all sensors managed by the SensorManager class. This is an added benefit making your phone more private. Here's how...

To add the tile, follow these instructions:

  1. Go to Settings > About phone, and scroll down to Build number
  2. Tap Build number 7 times until you see a message that says "You are now a developer!"
  3. Go back out to Settings > System > Developer options > Quick settings developer tiles
  4. Activate the Sensors Off toggle switch

Now when you pull down from the top of the screen to show the quick settings tray, you can use the Sensors Off tile.

Also, as of Android 12, there are two new buttons already in the quick settings tray that restrict camera and microphone access. Use either of these to fine-tune which is on at the time.


References: