Grant the NEARBY_WIFI_DEVICES permission to VpnHostside tests
Fix forward for b/405308292 Background: new / existing runtime permission is now used to guard access to local networks. apps / tests now need to hold this permission to do traffic with local devices. Test: CtsHostsideNetworkTests, TH Bug: 405308292 Change-Id: Ib4892cc817946c74094bfc5d9c54a95bb17ad30b
This commit is contained in:
parent
4703e17d98
commit
042ebce713
2 changed files with 6 additions and 0 deletions
|
|
@ -27,6 +27,7 @@
|
|||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
|
||||
<uses-permission android:name="android.permission.NEARBY_WIFI_DEVICES" />
|
||||
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
|
||||
|
|
|
|||
|
|
@ -267,6 +267,11 @@ public class VpnTest {
|
|||
mNetwork = null;
|
||||
mTestContext = getInstrumentation().getContext();
|
||||
mTargetContext = getInstrumentation().getTargetContext();
|
||||
getInstrumentation()
|
||||
.getUiAutomation()
|
||||
.grantRuntimePermission(
|
||||
"com.android.cts.net.hostside",
|
||||
"android.permission.NEARBY_WIFI_DEVICES");
|
||||
storePrivateDnsSetting();
|
||||
mDevice = UiDevice.getInstance(getInstrumentation());
|
||||
mActivity = launchActivity(mTargetContext.getPackageName(), MyActivity.class);
|
||||
|
|
|
|||
Loading…
Reference in a new issue