Skip to content
Commit 1460b76a authored by Paul Murphy's avatar Paul Murphy
Browse files

Add COMPANION_APPROVE_WIFI_CONNECTIONS to shell permissions

1. This is a minimally scoped permission (which allows the new WiFi API's
to silently connect to a wifi network).
2. I explored writing a GTS test instead of a CTS test, with the idea being that it would run inside the Android Auto user. Unfortunately the API under test requires two permissions, MANAGE_COMPANION_DEVICES and COMPANION_APPROVE_WIFI_CONNECTIONS. Android Auto will only have COMPANION_APPROVE_WIFI_CONNECTIONS, and if I elevate to Shell privileges the test will have MANAGE_COMPANION_DEVICES, but not COMPANION_APPROVE_WIFI_CONNECTIONS. Beyond this, I've been told that it's better for us to test this API in CTS than what it is under GTS.

The addition of the permission to androis.os.shell could theoretically allow it to connect to a WiFi network using the new WiFi APIs without the user being prompted. Android R will still allow the legacy WiFi API's which also allow wifi connections without users being prompted without this permission. Android Auto requires the new API's as they better handle cases of connecting to WiFi networks with no internet access. The old API's will not always result in fallback to LTE, whereas the new ones do that.

Test: Unit test in separate change.
Change-Id: Ifd8ae6b7e53307ea8973406fdefa468dfa679bda
Bug: b/147748710
parent d506a78e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment