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

Commit 548c5b97 authored by Pat Manning's avatar Pat Manning
Browse files

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
parent 60b397e8
Loading
Loading
Loading
Loading
+1 −12
Original line number Original line Diff line number Diff line
@@ -607,22 +607,11 @@ public class StatusBarManagerServiceTest {
    public void testSetNavBarMode_invalidInputThrowsError() throws RemoteException {
    public void testSetNavBarMode_invalidInputThrowsError() throws RemoteException {
        int navBarModeInvalid = -1;
        int navBarModeInvalid = -1;


        assertThrows(UnsupportedOperationException.class,
        assertThrows(IllegalArgumentException.class,
                () -> mStatusBarManagerService.setNavBarMode(navBarModeInvalid));
                () -> mStatusBarManagerService.setNavBarMode(navBarModeInvalid));
        verify(mOverlayManager, never()).setEnabledExclusiveInCategory(anyString(), anyInt());
        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
    @Test
    public void testSetNavBarMode_noPackageDoesNotEnable() throws Exception {
    public void testSetNavBarMode_noPackageDoesNotEnable() throws Exception {
        mContext.setMockPackageManager(mPackageManager);
        mContext.setMockPackageManager(mPackageManager);