Remove unnecessary null check

Address review comments from aosp/2131752 and aosp/2117045
sConfigurationMap must have a entry for UID_RULES_CONFIGURATION_KEY
because this bpf map is an array

Bug: 217624062
Test: atest BpfNetMapsTest
Change-Id: Ic52623e11c1f53e363416d57c0d8705d5510ef04
This commit is contained in:
Motomu Utsumi
2022-06-28 04:21:41 +00:00
parent 51a03d629e
commit 1f73fedfef
2 changed files with 0 additions and 27 deletions

View File

@@ -174,14 +174,6 @@ public final class BpfNetMapsTest {
assertThrows(expected, () -> mBpfNetMaps.isChainEnabled(1000 /* childChain */));
}
@Test
@IgnoreUpTo(Build.VERSION_CODES.S_V2)
public void testIsChainEnabledMissingConfiguration() {
// sConfigurationMap does not have entry for UID_RULES_CONFIGURATION_KEY
assertThrows(ServiceSpecificException.class,
() -> mBpfNetMaps.isChainEnabled(FIREWALL_CHAIN_DOZABLE));
}
@Test
@IgnoreAfter(Build.VERSION_CODES.S_V2)
public void testIsChainEnabledBeforeT() {
@@ -251,14 +243,6 @@ public final class BpfNetMapsTest {
() -> mBpfNetMaps.setChildChain(1000 /* childChain */, true /* enable */));
}
@Test
@IgnoreUpTo(Build.VERSION_CODES.S_V2)
public void testSetChildChainMissingConfiguration() {
// sConfigurationMap does not have entry for UID_RULES_CONFIGURATION_KEY
assertThrows(ServiceSpecificException.class,
() -> mBpfNetMaps.setChildChain(FIREWALL_CHAIN_DOZABLE, true /* enable */));
}
@Test
@IgnoreAfter(Build.VERSION_CODES.S_V2)
public void testSetChildChainBeforeT() {