Merge "Delete keyboard_category_enabled flag (2/2)" into main

This commit is contained in:
Ming-Shin Lu
2024-08-06 11:38:41 +00:00
committed by Android (Google) Code Review
2 changed files with 1 additions and 16 deletions

View File

@@ -33,7 +33,6 @@ import android.app.settings.SettingsEnums;
import android.content.ContentResolver;
import android.content.Context;
import android.content.res.Resources;
import android.os.vibrator.Flags;
import android.platform.test.flag.junit.SetFlagsRule;
import android.provider.Settings;
@@ -41,7 +40,6 @@ import androidx.preference.PreferenceScreen;
import androidx.preference.SwitchPreference;
import androidx.test.core.app.ApplicationProvider;
import com.android.settings.R;
import com.android.settings.testutils.FakeFeatureFactory;
import org.junit.Before;
@@ -87,7 +85,6 @@ public class KeyboardVibrationTogglePreferenceControllerTest {
@Test
public void getAvailabilityStatus_featureSupported_available() {
mSetFlagsRule.enableFlags(Flags.FLAG_KEYBOARD_CATEGORY_ENABLED);
when(mResources.getBoolean(
com.android.internal.R.bool.config_keyboardVibrationSettingsSupported))
.thenReturn(true);
@@ -97,7 +94,6 @@ public class KeyboardVibrationTogglePreferenceControllerTest {
@Test
public void getAvailabilityStatus_featureNotSupported_unavailable() {
mSetFlagsRule.enableFlags(Flags.FLAG_KEYBOARD_CATEGORY_ENABLED);
when(mResources.getBoolean(
com.android.internal.R.bool.config_keyboardVibrationSettingsSupported))
.thenReturn(false);
@@ -105,15 +101,6 @@ public class KeyboardVibrationTogglePreferenceControllerTest {
assertThat(mController.getAvailabilityStatus()).isEqualTo(UNSUPPORTED_ON_DEVICE);
}
@Test
public void getAvailabilityStatus_keyboardCategoryDisabled_unavailable() {
mSetFlagsRule.disableFlags(Flags.FLAG_KEYBOARD_CATEGORY_ENABLED);
when(mResources.getBoolean(
com.android.internal.R.bool.config_keyboardVibrationSettingsSupported))
.thenReturn(true);
assertThat(mController.getAvailabilityStatus()).isEqualTo(UNSUPPORTED_ON_DEVICE);
}
@Test
public void updateState_mainVibrateDisabled_shouldReturnFalseForCheckedAndEnabled() {