Loading core/java/android/os/vibrator/flags.aconfig +0 −11 Original line number Original line Diff line number Diff line Loading @@ -34,17 +34,6 @@ flag { } } } } flag { namespace: "haptics" name: "load_haptic_feedback_vibration_customization_from_resources" description: "Load haptic feedback vibrations customization from resources." is_fixed_read_only: true bug: "295142743" metadata { purpose: PURPOSE_FEATURE } } flag { flag { namespace: "haptics" namespace: "haptics" name: "haptic_feedback_input_source_customization_enabled" name: "haptic_feedback_input_source_customization_enabled" Loading services/core/java/com/android/server/vibrator/HapticFeedbackCustomization.java +0 −4 Original line number Original line Diff line number Diff line Loading @@ -25,7 +25,6 @@ import android.content.res.XmlResourceParser; import android.os.VibrationAttributes; import android.os.VibrationAttributes; import android.os.VibrationEffect; import android.os.VibrationEffect; import android.os.VibratorInfo; import android.os.VibratorInfo; import android.os.vibrator.Flags; import android.os.vibrator.persistence.ParsedVibration; import android.os.vibrator.persistence.ParsedVibration; import android.os.vibrator.persistence.VibrationXmlParser; import android.os.vibrator.persistence.VibrationXmlParser; import android.text.TextUtils; import android.text.TextUtils; Loading Loading @@ -275,9 +274,6 @@ final class HapticFeedbackCustomization { @Nullable @Nullable private static TypedXmlPullParser readCustomizationResources(Resources res, int xmlResId) { private static TypedXmlPullParser readCustomizationResources(Resources res, int xmlResId) { if (!Flags.loadHapticFeedbackVibrationCustomizationFromResources()) { return null; } final XmlResourceParser resParser; final XmlResourceParser resParser; try { try { resParser = res.getXml(xmlResId); resParser = res.getXml(xmlResId); Loading services/tests/vibrator/src/com/android/server/vibrator/HapticFeedbackCustomizationTest.java +1 −3 Original line number Original line Diff line number Diff line Loading @@ -25,12 +25,11 @@ import static android.os.VibrationEffect.EFFECT_HEAVY_CLICK; import static android.os.VibrationEffect.EFFECT_TICK; import static android.os.VibrationEffect.EFFECT_TICK; import static android.os.vibrator.Flags.FLAG_HAPTIC_FEEDBACK_INPUT_SOURCE_CUSTOMIZATION_ENABLED; import static android.os.vibrator.Flags.FLAG_HAPTIC_FEEDBACK_INPUT_SOURCE_CUSTOMIZATION_ENABLED; import static android.os.vibrator.Flags.FLAG_HAPTIC_FEEDBACK_WITH_CUSTOM_USAGE; import static android.os.vibrator.Flags.FLAG_HAPTIC_FEEDBACK_WITH_CUSTOM_USAGE; import static android.os.vibrator.Flags.FLAG_LOAD_HAPTIC_FEEDBACK_VIBRATION_CUSTOMIZATION_FROM_RESOURCES; import static com.android.internal.R.xml.haptic_feedback_customization; import static com.android.internal.R.xml.haptic_feedback_customization; import static com.android.internal.R.xml.haptic_feedback_customization_usage_gesture_input; import static com.android.internal.R.xml.haptic_feedback_customization_source_rotary_encoder; import static com.android.internal.R.xml.haptic_feedback_customization_source_rotary_encoder; import static com.android.internal.R.xml.haptic_feedback_customization_source_touchscreen; import static com.android.internal.R.xml.haptic_feedback_customization_source_touchscreen; import static com.android.internal.R.xml.haptic_feedback_customization_usage_gesture_input; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat; Loading Loading @@ -592,7 +591,6 @@ public class HapticFeedbackCustomizationTest { private void setupCustomizationResource(String xml, int xmlResId) throws Exception { private void setupCustomizationResource(String xml, int xmlResId) throws Exception { mSetFlagsRule.enableFlags(FLAG_HAPTIC_FEEDBACK_INPUT_SOURCE_CUSTOMIZATION_ENABLED); mSetFlagsRule.enableFlags(FLAG_HAPTIC_FEEDBACK_INPUT_SOURCE_CUSTOMIZATION_ENABLED); mSetFlagsRule.enableFlags(FLAG_LOAD_HAPTIC_FEEDBACK_VIBRATION_CUSTOMIZATION_FROM_RESOURCES); mSetFlagsRule.enableFlags(FLAG_HAPTIC_FEEDBACK_WITH_CUSTOM_USAGE); mSetFlagsRule.enableFlags(FLAG_HAPTIC_FEEDBACK_WITH_CUSTOM_USAGE); doReturn(FakeXmlResourceParser.fromXml(xml)).when(mResourcesMock).getXml(xmlResId); doReturn(FakeXmlResourceParser.fromXml(xml)).when(mResourcesMock).getXml(xmlResId); } } Loading Loading
core/java/android/os/vibrator/flags.aconfig +0 −11 Original line number Original line Diff line number Diff line Loading @@ -34,17 +34,6 @@ flag { } } } } flag { namespace: "haptics" name: "load_haptic_feedback_vibration_customization_from_resources" description: "Load haptic feedback vibrations customization from resources." is_fixed_read_only: true bug: "295142743" metadata { purpose: PURPOSE_FEATURE } } flag { flag { namespace: "haptics" namespace: "haptics" name: "haptic_feedback_input_source_customization_enabled" name: "haptic_feedback_input_source_customization_enabled" Loading
services/core/java/com/android/server/vibrator/HapticFeedbackCustomization.java +0 −4 Original line number Original line Diff line number Diff line Loading @@ -25,7 +25,6 @@ import android.content.res.XmlResourceParser; import android.os.VibrationAttributes; import android.os.VibrationAttributes; import android.os.VibrationEffect; import android.os.VibrationEffect; import android.os.VibratorInfo; import android.os.VibratorInfo; import android.os.vibrator.Flags; import android.os.vibrator.persistence.ParsedVibration; import android.os.vibrator.persistence.ParsedVibration; import android.os.vibrator.persistence.VibrationXmlParser; import android.os.vibrator.persistence.VibrationXmlParser; import android.text.TextUtils; import android.text.TextUtils; Loading Loading @@ -275,9 +274,6 @@ final class HapticFeedbackCustomization { @Nullable @Nullable private static TypedXmlPullParser readCustomizationResources(Resources res, int xmlResId) { private static TypedXmlPullParser readCustomizationResources(Resources res, int xmlResId) { if (!Flags.loadHapticFeedbackVibrationCustomizationFromResources()) { return null; } final XmlResourceParser resParser; final XmlResourceParser resParser; try { try { resParser = res.getXml(xmlResId); resParser = res.getXml(xmlResId); Loading
services/tests/vibrator/src/com/android/server/vibrator/HapticFeedbackCustomizationTest.java +1 −3 Original line number Original line Diff line number Diff line Loading @@ -25,12 +25,11 @@ import static android.os.VibrationEffect.EFFECT_HEAVY_CLICK; import static android.os.VibrationEffect.EFFECT_TICK; import static android.os.VibrationEffect.EFFECT_TICK; import static android.os.vibrator.Flags.FLAG_HAPTIC_FEEDBACK_INPUT_SOURCE_CUSTOMIZATION_ENABLED; import static android.os.vibrator.Flags.FLAG_HAPTIC_FEEDBACK_INPUT_SOURCE_CUSTOMIZATION_ENABLED; import static android.os.vibrator.Flags.FLAG_HAPTIC_FEEDBACK_WITH_CUSTOM_USAGE; import static android.os.vibrator.Flags.FLAG_HAPTIC_FEEDBACK_WITH_CUSTOM_USAGE; import static android.os.vibrator.Flags.FLAG_LOAD_HAPTIC_FEEDBACK_VIBRATION_CUSTOMIZATION_FROM_RESOURCES; import static com.android.internal.R.xml.haptic_feedback_customization; import static com.android.internal.R.xml.haptic_feedback_customization; import static com.android.internal.R.xml.haptic_feedback_customization_usage_gesture_input; import static com.android.internal.R.xml.haptic_feedback_customization_source_rotary_encoder; import static com.android.internal.R.xml.haptic_feedback_customization_source_rotary_encoder; import static com.android.internal.R.xml.haptic_feedback_customization_source_touchscreen; import static com.android.internal.R.xml.haptic_feedback_customization_source_touchscreen; import static com.android.internal.R.xml.haptic_feedback_customization_usage_gesture_input; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat; Loading Loading @@ -592,7 +591,6 @@ public class HapticFeedbackCustomizationTest { private void setupCustomizationResource(String xml, int xmlResId) throws Exception { private void setupCustomizationResource(String xml, int xmlResId) throws Exception { mSetFlagsRule.enableFlags(FLAG_HAPTIC_FEEDBACK_INPUT_SOURCE_CUSTOMIZATION_ENABLED); mSetFlagsRule.enableFlags(FLAG_HAPTIC_FEEDBACK_INPUT_SOURCE_CUSTOMIZATION_ENABLED); mSetFlagsRule.enableFlags(FLAG_LOAD_HAPTIC_FEEDBACK_VIBRATION_CUSTOMIZATION_FROM_RESOURCES); mSetFlagsRule.enableFlags(FLAG_HAPTIC_FEEDBACK_WITH_CUSTOM_USAGE); mSetFlagsRule.enableFlags(FLAG_HAPTIC_FEEDBACK_WITH_CUSTOM_USAGE); doReturn(FakeXmlResourceParser.fromXml(xml)).when(mResourcesMock).getXml(xmlResId); doReturn(FakeXmlResourceParser.fromXml(xml)).when(mResourcesMock).getXml(xmlResId); } } Loading