Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67ac1d2a authored by Lais Andrade's avatar Lais Andrade
Browse files

Remove android.os.load_haptic_feedback_vibration_customization_from_resources

Clean up flag after release.

Fix: 423851763
Flag: EXEMPT FLAG_REMOVAL
Test: HapticFeedbackCustomizationTest
Change-Id: Ifd7caad39628853ecaa5b36f39852ba306ac621e
parent b9fd32e5
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -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 {
    namespace: "haptics"
    name: "haptic_feedback_input_source_customization_enabled"
+0 −4
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ import android.content.res.XmlResourceParser;
import android.os.VibrationAttributes;
import android.os.VibrationEffect;
import android.os.VibratorInfo;
import android.os.vibrator.Flags;
import android.os.vibrator.persistence.ParsedVibration;
import android.os.vibrator.persistence.VibrationXmlParser;
import android.text.TextUtils;
@@ -275,9 +274,6 @@ final class HapticFeedbackCustomization {

    @Nullable
    private static TypedXmlPullParser readCustomizationResources(Resources res, int xmlResId) {
        if (!Flags.loadHapticFeedbackVibrationCustomizationFromResources()) {
            return null;
        }
        final XmlResourceParser resParser;
        try {
            resParser = res.getXml(xmlResId);
+1 −3
Original line number Diff line number Diff line
@@ -25,12 +25,11 @@ import static android.os.VibrationEffect.EFFECT_HEAVY_CLICK;
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_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_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_touchscreen;
import static com.android.internal.R.xml.haptic_feedback_customization_usage_gesture_input;

import static com.google.common.truth.Truth.assertThat;

@@ -592,7 +591,6 @@ public class HapticFeedbackCustomizationTest {

    private void setupCustomizationResource(String xml, int xmlResId) throws Exception {
        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);
        doReturn(FakeXmlResourceParser.fromXml(xml)).when(mResourcesMock).getXml(xmlResId);
    }