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

Commit 9e85bf98 authored by Juan Sebastian Martinez's avatar Juan Sebastian Martinez
Browse files

Playing dismiss haptics even when a dismiss occurs from a brief fling.

Sometimes, a fling to dismiss does not touch the screen long-enough so
that the magnentic notification row manager enters the PULLING state.
This causes haptics to not play appropriately. If a fling occurs when
the targets are being set, we should also play the dismiss haptics.

Test: manual. Verified haptics play when dismissing while still finding
  the magnetic targets.
Flag: com.android.systemui.magnetic_notification_swipes
Bug: 417790774
Change-Id: Ia6a901a16e56317e9d600c7b433e59aa9e4445de
parent eab8e768
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -366,7 +366,12 @@ constructor(
        detachDirectionEstimator.reset()
        if (row.isSwipedTarget()) {
            when (currentState) {
                State.TARGETS_SET -> currentState = State.IDLE
                State.TARGETS_SET -> {
                    if (dismissing) {
                        playThresholdHaptics()
                    }
                    currentState = State.IDLE
                }
                State.PULLING -> {
                    if (dismissing) {
                        playThresholdHaptics()