summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2014-09-02 13:46:00 +0200
committerSelim Cinek <cinek@google.com>2014-09-02 14:42:10 +0200
commitabdc5a078242e6842a4b3fa62db3e385fcacfa56 (patch)
tree06ed55c473af99bf123ec850f85beb3b023e935e /packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
parentedb893bae660b4120e564939cc347c15cbe3defa (diff)
downloadframeworks_base-abdc5a078242e6842a4b3fa62db3e385fcacfa56.zip
frameworks_base-abdc5a078242e6842a4b3fa62db3e385fcacfa56.tar.gz
frameworks_base-abdc5a078242e6842a4b3fa62db3e385fcacfa56.tar.bz2
Fixed a bug in the notification touch selection.
This lead to the wrong notification being selected and therefore the longpress listener would not be triggered. Also added some logging for cases where the longpress listener would not fire. Bug: 17332879 Change-Id: I9a5cd9bfe3108ca3e366711d34d1e218f1d520cf
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 399742a..c3eb94c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -736,15 +736,20 @@ public abstract class BaseStatusBar extends SystemUI implements
public boolean onLongPress(View v, int x, int y) {
dismissPopups();
- if (v.getWindowToken() == null) return false;
+ if (v.getWindowToken() == null) {
+ Log.e(TAG, "Trying to show notification guts, but not attached to window");
+ return false;
+ }
// Assume we are a status_bar_notification_row
final NotificationGuts guts = (NotificationGuts) v.findViewById(
R.id.notification_guts);
- if (guts == null) return false;
// Already showing?
- if (guts.getVisibility() == View.VISIBLE) return false;
+ if (guts.getVisibility() == View.VISIBLE) {
+ Log.e(TAG, "Trying to show notification guts, but already visible");
+ return false;
+ }
guts.setVisibility(View.VISIBLE);
final double horz = Math.max(guts.getWidth() - x, x);