[thread] loose the restrictions on ThreadNetworkManager APIs
1. We don't need to assert that ThreadNetworkManager is always null when the Thread hardware features are not present. There can be more useful Thread features which don't require the hardware 2. The getAllThreadNetworkControllers() API has no documentation says the returned list is guaranteed not empty. Change-Id: Ie77110067ff670053a2125b30b2791b9f54b2582
This commit is contained in:
parent
7cb5078ba1
commit
17740cb799
1 changed files with 0 additions and 17 deletions
|
|
@ -90,21 +90,4 @@ public class ThreadNetworkManagerTest {
|
|||
|
||||
assertThat(mManager).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getManager_noThreadFeature_returnsNull() {
|
||||
assumeFalse(mPackageManager.hasSystemFeature("android.hardware.thread_network"));
|
||||
|
||||
assertThat(mManager).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
@IgnoreUpTo(Build.VERSION_CODES.TIRAMISU)
|
||||
public void getAllThreadNetworkControllers_managerIsNotNull_returnsNotEmptyList() {
|
||||
assumeNotNull(mManager);
|
||||
|
||||
List<ThreadNetworkController> controllers = mManager.getAllThreadNetworkControllers();
|
||||
|
||||
assertThat(controllers).isNotEmpty();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue