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

Commit 5a24e050 authored by Johannes Gallmann's avatar Johannes Gallmann Committed by Android (Google) Code Review
Browse files

Merge "Fix notification shade not expanding from right side after unfold" into main

parents 065b3403 e96e39cf
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -246,6 +246,14 @@ public class QuickSettingsController implements Dumpable {
     */
    private Insets mCachedGestureInsets;

    /**
     * The window width currently in effect -- used together with
     * {@link QuickSettingsController#mCachedGestureInsets} to decide whether a back gesture should
     * receive a horizontal swipe inwards from the left/right vertical edge of the screen.
     * We cache this on ACTION_DOWN, and query it during both ACTION_DOWN and ACTION_MOVE events.
     */
    private int mCachedWindowWidth;

    /**
     * The amount of progress we are currently in if we're transitioning to the full shade.
     * 0.0f means we're not transitioning yet, while 1 means we're all the way in the full
@@ -528,6 +536,7 @@ public class QuickSettingsController implements Dumpable {
        WindowMetrics windowMetrics = wm.getCurrentWindowMetrics();
        mCachedGestureInsets = windowMetrics.getWindowInsets().getInsets(
                WindowInsets.Type.systemGestures());
        mCachedWindowWidth = windowMetrics.getBounds().width();
    }

    /**
@@ -536,7 +545,7 @@ public class QuickSettingsController implements Dumpable {
     */
    public boolean shouldBackBypassQuickSettings(float touchX) {
        return (touchX < mCachedGestureInsets.left)
                || (touchX > mKeyguardStatusBar.getWidth() - mCachedGestureInsets.right);
                || (touchX > mCachedWindowWidth - mCachedGestureInsets.right);
    }

    /** Returns whether touch is within QS area */
@@ -2105,6 +2114,8 @@ public class QuickSettingsController implements Dumpable {
        ipw.println(mAnimatorExpand);
        ipw.print("mCachedGestureInsets=");
        ipw.println(mCachedGestureInsets);
        ipw.print("mCachedWindowWidth=");
        ipw.println(mCachedWindowWidth);
        ipw.print("mTransitioningToFullShadeProgress=");
        ipw.println(mTransitioningToFullShadeProgress);
        ipw.print("mDistanceForFullShadeTransition=");