home-assistant:master
← jpelgrom:android-13-locked-controls-2381
opened 05:59PM - 25 Aug 22 UTC
## Summary
Add support for using device controls while the device is locked o…n Android 13. By default this is enabled, as I feel like this is what most users expect and the system level setting for this was enabled by default on upgrade for me.
Because this is Home Assistant, users can enable/disable it for all entities or control the setting for individual entities. When enable/disable all has been used new entities will follow this setting, when individual entities have been adjusted new entities are enabled by default.
To make this possible this PR bumps the `compileSdk` to `33` (Android 13). The change in `GeocodeSensorManager` is because of this, as the function that is used was changed to be nullable.
Fixes #2381
## Screenshots
A demo of the functionality, showing a locked device where you can use one control without entering the PIN and another that does require entering the PIN:
https://user-images.githubusercontent.com/8148535/186732084-e5133e50-f9b2-4268-a418-5438dbe53cc4.mp4
A new setting was added to Settings > Companion app when using Android 13, using the same icon and name as the tile in quick settings:
|Light|Dark|
|-----|-----|
|||
The 'Manage Device Controls' screen includes a short description of the functionality, buttons to enable/disable all entities, a list of entities with checkboxes, and a help icon in the toolbar that links to the documentation:
|Light|Dark|
|-----|-----|
|||
## Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#799
## Any other notes