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

Commit c751902a authored by Selim Cinek's avatar Selim Cinek Committed by Automerger Merge Worker
Browse files

Merge "Fixed an issue where the phone would be stuck pulseExpanding" into...

Merge "Fixed an issue where the phone would be stuck pulseExpanding" into sc-dev am: 17a6678d am: 11bff3ac

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15110200

Change-Id: I1671e7afff85f195e3d720f181bfdb8a7784e9b8
parents 03b4106c 11bff3ac
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -179,7 +179,10 @@ constructor(
    }

    override fun onTouchEvent(event: MotionEvent): Boolean {
        if (!canHandleMotionEvent()) {
        val finishExpanding = (event.action == MotionEvent.ACTION_CANCEL ||
            event.action == MotionEvent.ACTION_UP) && isExpanding
        if (!canHandleMotionEvent() && !finishExpanding) {
            // We allow cancellations/finishing to still go through here to clean up the state
            return false
        }

+7 −2
Original line number Diff line number Diff line
@@ -3854,8 +3854,13 @@ public class NotificationPanelViewController extends PanelViewController {
                    expand(true /* animate */);
                }
                initDownStates(event);
                if (!mIsExpanding && !shouldQuickSettingsIntercept(mDownX, mDownY, 0)
                        && mPulseExpansionHandler.onTouchEvent(event)) {

                // If pulse is expanding already, let's give it the touch. There are situations
                // where the panel starts expanding even though we're also pulsing
                boolean pulseShouldGetTouch = (!mIsExpanding
                        && !shouldQuickSettingsIntercept(mDownX, mDownY, 0))
                        || mPulseExpansionHandler.isExpanding();
                if (pulseShouldGetTouch && mPulseExpansionHandler.onTouchEvent(event)) {
                    // We're expanding all the other ones shouldn't get this anymore
                    return true;
                }