Merge "[Thread] grant the NEARBY_WIFI_DEVICES permission to Thread tests" into main am: a72fc32e50
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3555847 Change-Id: I5a161009c1d146b44684dc92b4335eefddee5b1b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
fc89769613
2 changed files with 9 additions and 0 deletions
|
|
@ -24,6 +24,7 @@
|
|||
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
|
||||
<uses-permission android:name="android.permission.THREAD_NETWORK_PRIVILEGED"/>
|
||||
<uses-permission android:name="android.permission.NETWORK_SETTINGS"/>
|
||||
<uses-permission android:name="android.permission.NEARBY_WIFI_DEVICES" />
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<application android:debuggable="true">
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ import static android.net.thread.utils.IntegrationTestUtils.waitFor;
|
|||
import static android.net.thread.utils.ThreadNetworkControllerWrapper.JOIN_TIMEOUT;
|
||||
import static android.os.SystemClock.elapsedRealtime;
|
||||
|
||||
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
|
||||
|
||||
import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
|
||||
import static com.android.compatibility.common.util.SystemUtil.runShellCommandOrThrow;
|
||||
import static com.android.testutils.TestPermissionUtil.runAsShell;
|
||||
|
|
@ -121,6 +123,12 @@ public class ThreadIntegrationTest {
|
|||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
getInstrumentation()
|
||||
.getUiAutomation()
|
||||
.grantRuntimePermission(
|
||||
"com.android.thread.tests.integration",
|
||||
"android.permission.NEARBY_WIFI_DEVICES");
|
||||
|
||||
mExecutor = Executors.newSingleThreadExecutor();
|
||||
mFtd = new FullThreadDevice(10 /* nodeId */);
|
||||
mOtCtl = new OtDaemonController();
|
||||
|
|
|
|||
Loading…
Reference in a new issue