Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ab82a0a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix cannot find removeUnwantedCapability on R device" into sc-dev am: 4df05617

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13966708

Change-Id: Idba9101d96bf9ef9c265996f05e974e307e6fc75
parents fed96efa 4df05617
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -611,17 +611,18 @@ public class NetworkCapabilitiesTest {
            // From S, it is not allowed to have the same capability in both wanted and
            // unwanted list.
            assertThrows(IllegalArgumentException.class, () -> nc2.combineCapabilities(nc1));
            // Remove unwanted capability to continue other tests.
            nc1.removeUnwantedCapability(NET_CAPABILITY_NOT_ROAMING);
        } else {
            nc2.combineCapabilities(nc1);
            // We will get this capability in both requested and unwanted lists thus this request
            // will never be satisfied.
            assertTrue(nc2.hasCapability(NET_CAPABILITY_NOT_ROAMING));
            assertTrue(nc2.hasUnwantedCapability(NET_CAPABILITY_NOT_ROAMING));
            // For R or below, remove unwanted capability via removeCapability.
            nc1.removeCapability(NET_CAPABILITY_NOT_ROAMING);
        }

        // Remove unwanted capability to continue other tests.
        nc1.removeUnwantedCapability(NET_CAPABILITY_NOT_ROAMING);

        nc1.setSSID(TEST_SSID);
        nc2.combineCapabilities(nc1);
        if (isAtLeastR()) {