Test Entitlement when telephony is present

bug: 187331752
Test: atest android.tethering.test.TetheringManagerTest
Original-Change: https://android-review.googlesource.com/1735336
Merged-In: I9fbb7141691fbbf8685b46359c050e0385928805
Change-Id: I9fbb7141691fbbf8685b46359c050e0385928805
This commit is contained in:
Treehugger Robot
2021-07-02 04:41:18 +00:00
committed by Mark Chien
parent 0def47421d
commit 0cc6f3b99d

View File

@@ -361,6 +361,7 @@ public class TetheringManagerTest {
@Test @Test
public void testRequestLatestEntitlementResult() throws Exception { public void testRequestLatestEntitlementResult() throws Exception {
assumeTrue(mTM.isTetheringSupported()); assumeTrue(mTM.isTetheringSupported());
assumeTrue(mPm.hasSystemFeature(FEATURE_TELEPHONY));
// Verify that requestLatestTetheringEntitlementResult() can get entitlement // Verify that requestLatestTetheringEntitlementResult() can get entitlement
// result(TETHER_ERROR_ENTITLEMENT_UNKNOWN due to invalid downstream type) via listener. // result(TETHER_ERROR_ENTITLEMENT_UNKNOWN due to invalid downstream type) via listener.
assertEntitlementResult(listener -> mTM.requestLatestTetheringEntitlementResult( assertEntitlementResult(listener -> mTM.requestLatestTetheringEntitlementResult(