Merge "Add fixed amplitude check for keyboard vibration" into main

This commit is contained in:
Wilson Wu
2024-03-07 04:30:36 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 2 deletions

View File

@@ -84,6 +84,9 @@ public class KeyboardVibrationTogglePreferenceControllerTest {
public void getAvailabilityStatus_featureSupported_available() {
mSetFlagsRule.enableFlags(Flags.FLAG_KEYBOARD_CATEGORY_ENABLED);
when(mResources.getBoolean(R.bool.config_keyboard_vibration_supported)).thenReturn(true);
when(mResources.getFloat(
com.android.internal.R.dimen.config_keyboardHapticFeedbackFixedAmplitude))
.thenReturn(0.8f);
assertThat(mController.getAvailabilityStatus()).isEqualTo(AVAILABLE);
}