Rename methods to reflect the correct names of nav modes
Bug: 146004827 Test: make RunSettingsRoboTests ROBOTEST_FILTER=SystemNavigationGestureSettingsTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=SystemNavigationPreferenceControllerTest Change-Id: I00602c41aed5e675b8e0d3df7a3b3b318e6ec903
This commit is contained in:
@@ -137,30 +137,36 @@ public class SystemNavigationPreferenceControllerTest {
|
||||
public void testIsSwipeUpEnabled() {
|
||||
SettingsShadowResources.overrideResource(R.integer.config_navBarInteractionMode,
|
||||
NAV_BAR_MODE_2BUTTON);
|
||||
assertThat(SystemNavigationPreferenceController.isSwipeUpEnabled(mContext)).isTrue();
|
||||
assertThat(SystemNavigationPreferenceController.is2ButtonNavigationEnabled(
|
||||
mContext)).isTrue();
|
||||
|
||||
SettingsShadowResources.overrideResource(R.integer.config_navBarInteractionMode,
|
||||
NAV_BAR_MODE_3BUTTON);
|
||||
assertThat(SystemNavigationPreferenceController.isSwipeUpEnabled(mContext)).isFalse();
|
||||
assertThat(SystemNavigationPreferenceController.is2ButtonNavigationEnabled(
|
||||
mContext)).isFalse();
|
||||
|
||||
SettingsShadowResources.overrideResource(R.integer.config_navBarInteractionMode,
|
||||
NAV_BAR_MODE_GESTURAL);
|
||||
assertThat(SystemNavigationPreferenceController.isSwipeUpEnabled(mContext)).isFalse();
|
||||
assertThat(SystemNavigationPreferenceController.is2ButtonNavigationEnabled(
|
||||
mContext)).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsEdgeToEdgeEnabled() {
|
||||
SettingsShadowResources.overrideResource(R.integer.config_navBarInteractionMode,
|
||||
NAV_BAR_MODE_GESTURAL);
|
||||
assertThat(SystemNavigationPreferenceController.isEdgeToEdgeEnabled(mContext)).isTrue();
|
||||
assertThat(SystemNavigationPreferenceController.isGestureNavigationEnabled(
|
||||
mContext)).isTrue();
|
||||
|
||||
SettingsShadowResources.overrideResource(R.integer.config_navBarInteractionMode,
|
||||
NAV_BAR_MODE_3BUTTON);
|
||||
assertThat(SystemNavigationPreferenceController.isEdgeToEdgeEnabled(mContext)).isFalse();
|
||||
assertThat(SystemNavigationPreferenceController.isGestureNavigationEnabled(
|
||||
mContext)).isFalse();
|
||||
|
||||
SettingsShadowResources.overrideResource(R.integer.config_navBarInteractionMode,
|
||||
NAV_BAR_MODE_2BUTTON);
|
||||
assertThat(SystemNavigationPreferenceController.isEdgeToEdgeEnabled(mContext)).isFalse();
|
||||
assertThat(SystemNavigationPreferenceController.isGestureNavigationEnabled(
|
||||
mContext)).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user