diff options
author | Joe Onorato <joeo@google.com> | 2011-01-18 18:00:30 -0800 |
---|---|---|
committer | Joe Onorato <joeo@google.com> | 2011-01-19 15:29:31 -0800 |
commit | 6223fba87efabfca2342fd75594e39d913023aa2 (patch) | |
tree | 0753f8936a7bd812cd87dde8d41ba2872f0b9956 /packages | |
parent | cb109a0eeaca12cdd954c567da4fc5f45a23213b (diff) | |
download | frameworks_base-6223fba87efabfca2342fd75594e39d913023aa2.zip frameworks_base-6223fba87efabfca2342fd75594e39d913023aa2.tar.gz frameworks_base-6223fba87efabfca2342fd75594e39d913023aa2.tar.bz2 |
Remove optimization to isInContentArea that wasn't working.
This might fix the bug where tapping outside the notification panel doesn't close it.
I'm not 100% sure because I can't reproduce this on-demand, but I think it's possible for
onSizeChanged to race with the animations and we end up with a bad rectangle. The time
I did see it happen was tapping above the title area right after canceling a notification,
so that could explain it I think.
Bug: 3339023
Change-Id: Ic3a7f4c059e7bf6f30b864a371a0912a6414edb7
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java index 45a22b6..800f4b4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java @@ -52,7 +52,7 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, View mNotificationScroller; View mNotificationGlow; ViewGroup mContentFrame; - Rect mContentArea; + Rect mContentArea = new Rect(); View mSettingsView; View mScrim, mGlow; ViewGroup mContentParent; @@ -136,7 +136,6 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, @Override public void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); - mContentArea = null; } public void onClick(View v) { @@ -165,13 +164,11 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, } public boolean isInContentArea(int x, int y) { - if (mContentArea == null) { - mContentArea = new Rect(mContentFrame.getLeft(), - mTitleArea.getTop(), - mContentFrame.getRight(), - mContentFrame.getBottom()); - offsetDescendantRectToMyCoords(mContentParent, mContentArea); - } + mContentArea.left = mContentFrame.getLeft(); + mContentArea.top = mTitleArea.getTop(); + mContentArea.right = mContentFrame.getRight(); + mContentArea.bottom = mContentFrame.getBottom(); + offsetDescendantRectToMyCoords(mContentParent, mContentArea); return mContentArea.contains(x, y); } |