Removing a failing test which isn't required.

This test is really only testing ServiceManager.getService, which is unrelated to the actual class, so it can be removed.

Test: StatusBarManagerServiceTest.java
Fix: 223622448
Change-Id: I86eab8a4aa2df44799669132e82f5f0961b87b27
This commit is contained in:
Pat Manning
2022-03-09 18:23:56 +00:00
parent 60b397e84a
commit 548c5b9729

View File

@@ -607,22 +607,11 @@ public class StatusBarManagerServiceTest {
public void testSetNavBarMode_invalidInputThrowsError() throws RemoteException {
int navBarModeInvalid = -1;
assertThrows(UnsupportedOperationException.class,
assertThrows(IllegalArgumentException.class,
() -> mStatusBarManagerService.setNavBarMode(navBarModeInvalid));
verify(mOverlayManager, never()).setEnabledExclusiveInCategory(anyString(), anyInt());
}
@Test
public void testSetNavBarMode_noOverlayManagerDoesNotEnable() throws RemoteException {
mOverlayManager = null;
int navBarModeKids = StatusBarManager.NAV_BAR_MODE_KIDS;
mStatusBarManagerService.setNavBarMode(navBarModeKids);
assertEquals(navBarModeKids, mStatusBarManagerService.getNavBarMode());
verify(mOverlayManager, never()).setEnabledExclusiveInCategory(anyString(), anyInt());
}
@Test
public void testSetNavBarMode_noPackageDoesNotEnable() throws Exception {
mContext.setMockPackageManager(mPackageManager);