Merge "Show the footer when global switch is off."

This commit is contained in:
TreeHugger Robot
2020-02-13 15:34:31 +00:00
committed by Android (Google) Code Review
2 changed files with 23 additions and 0 deletions

View File

@@ -105,4 +105,20 @@ public class GraphicsDriverFooterPreferenceControllerTest {
verify(mGraphicsDriverContentObserver).unregister(mResolver);
}
@Test
public void updateState_available_visible() {
when(mController.getAvailabilityStatus()).thenReturn(AVAILABLE_UNSEARCHABLE);
mController.updateState(mPreference);
verify(mPreference).setVisible(true);
}
@Test
public void updateState_unavailable_invisible() {
when(mController.getAvailabilityStatus()).thenReturn(CONDITIONALLY_UNAVAILABLE);
mController.updateState(mPreference);
verify(mPreference).setVisible(false);
}
}