Merge "Use ACCESS_WIFI_STATE when clearing wifi blacklist" am: f5ae03550a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1490016 Change-Id: I0ce24470417b17ad94f11c6dcdfd4e9d1587df81
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.net.cts.util;
|
||||
|
||||
import static android.Manifest.permission.ACCESS_WIFI_STATE;
|
||||
import static android.Manifest.permission.NETWORK_SETTINGS;
|
||||
import static android.net.ConnectivityManager.PRIVATE_DNS_MODE_OPPORTUNISTIC;
|
||||
import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
|
||||
@@ -331,7 +332,7 @@ public final class CtsNetUtils {
|
||||
* to them.
|
||||
*/
|
||||
private void clearWifiBlacklist() {
|
||||
runAsShell(NETWORK_SETTINGS, () -> {
|
||||
runAsShell(NETWORK_SETTINGS, ACCESS_WIFI_STATE, () -> {
|
||||
for (WifiConfiguration cfg : mWifiManager.getConfiguredNetworks()) {
|
||||
assertTrue(mWifiManager.enableNetwork(cfg.networkId, false /* attemptConnect */));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user