diff options
| author | 2011-01-25 17:03:27 -0800 | |
|---|---|---|
| committer | 2011-01-25 17:03:27 -0800 | |
| commit | 6f5bd3c3b3b10c60f51b1fe2a2d5da6002930618 (patch) | |
| tree | 7735fd0cd7bf73954f7005e4434e81e8bc0d56d9 | |
| parent | b8942108826893657ca0b8b6d5d6d153739a76f6 (diff) | |
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
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java index 7544f4621ebd..a5e2fda01913 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java @@ -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; } |