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

Commit eac23d50 authored by Lais Andrade's avatar Lais Andrade
Browse files

Remove android.os.vibrator.vibration_pipeline_fix_enabled

Clean up flag after release.

Fix: 438358618
Test: VibratorManagerServiceTest
Flag: EXEMPT FLAG_REMOVAL
Change-Id: Ib96acbf2a299f263b6e99ddf8ee4ccab365764ff
parent 405a71b2
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -88,16 +88,6 @@ flag {
    }
}

flag {
    namespace: "haptics"
    name: "vibration_pipeline_fix_enabled"
    description: "Enables functionality to pipeline vibration effects to avoid cancelling short vibrations"
    bug: "344494220"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    namespace: "haptics"
    name: "remove_hidl_support"
+2 −4
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import android.os.CombinedVibration;
import android.os.VibrationAttributes;
import android.os.VibrationEffect;
import android.os.VibratorInfo;
import android.os.vibrator.Flags;
import android.os.vibrator.PrebakedSegment;
import android.os.vibrator.VibrationEffectSegment;
import android.util.SparseArray;
@@ -163,7 +162,7 @@ final class HalVibration extends Vibration {
    /** Returns true if this vibration can pipeline with the specified one. */
    public boolean canPipelineWith(HalVibration vib,
            @Nullable SparseArray<VibratorInfo> vibratorInfos, int durationThresholdMs) {
        long effectDuration = Flags.vibrationPipelineFixEnabled() && (vibratorInfos != null)
        long effectDuration = vibratorInfos != null
                ? mEffectToPlay.getDuration(vibratorInfos)
                : mEffectToPlay.getDuration();
        if (effectDuration == Long.MAX_VALUE) {
@@ -172,8 +171,7 @@ final class HalVibration extends Vibration {
            // if we have a use-case, requiring changes to how pipelined vibrations are cancelled.
            return false;
        }
        if (Flags.vibrationPipelineFixEnabled()
                && (effectDuration > 0) && (effectDuration < durationThresholdMs)) {
        if (effectDuration > 0 && effectDuration < durationThresholdMs) {
            // Duration is known and it's less than the pipeline threshold, so allow it.
            // No need to check UID, as we want to avoid cancelling any short effect and let the
            // vibrator hardware gracefully finish the vibration.
+1 −2
Original line number Diff line number Diff line
@@ -1465,8 +1465,7 @@ public class VibratorManagerServiceTest {
    }

    @Test
    @EnableFlags(Flags.FLAG_VIBRATION_PIPELINE_FIX_ENABLED)
    public void vibrate_withPipelineFlagEnabledAndShortEffect_continuesOngoingEffect()
    public void vibrate_withPipelineMaxDurationConfigAndShortEffect_continuesOngoingEffect()
            throws Exception {
        assumeTrue(mVibrationConfig.getVibrationPipelineMaxDurationMs() > 0);