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

Commit 6f5bd3c3 authored by Jim Miller's avatar Jim Miller
Browse files

Fix 3338368: Fix bounds calculation for recent apps view

The calculation for determine the content view's bounds
was mistakenly using the position of the view in the immediate
parent (glow view), which wrapped it exactly in the vertical
direction. The code now uses the glow view's vertical
position in its parent to determine the position.

Change-Id: I07768eb3446fde851699de1c1d4e958bc16d98bb
parent b8942108
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -98,10 +98,12 @@ public class RecentAppsPanel extends RelativeLayout implements StatusBarPanel, O
    };

    public boolean isInContentArea(int x, int y) {
        final int l = mRecentsContainer.getPaddingLeft();
        final int r = mRecentsContainer.getWidth() - mRecentsContainer.getPaddingRight();
        final int t = mRecentsContainer.getPaddingTop();
        final int b = mRecentsContainer.getHeight() - mRecentsContainer.getPaddingBottom();
        // use mRecentsContainer's exact bounds to determine horizontal position
        final int l = mRecentsContainer.getLeft();
        final int r = mRecentsContainer.getRight();
        // use surrounding mRecentsGlowView's position in parent determine vertical bounds
        final int t = mRecentsGlowView.getTop();
        final int b = mRecentsGlowView.getBottom();
        return x >= l && x < r && y >= t && y < b;
    }