summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@google.com>2011-01-27 20:39:12 -0500
committerDaniel Sandler <dsandler@google.com>2011-01-27 20:51:03 -0500
commite2c251b564a46a8f7352094ba8a61d46dc6b676f (patch)
treef766aebac1c5da6ec8854e2a0c38f201afcfab2f
parenta85b789a4a6c58c33dda9e5b00a10faee6bbf561 (diff)
downloadframeworks_base-e2c251b564a46a8f7352094ba8a61d46dc6b676f.zip
frameworks_base-e2c251b564a46a8f7352094ba8a61d46dc6b676f.tar.gz
frameworks_base-e2c251b564a46a8f7352094ba8a61d46dc6b676f.tar.bz2
Tapping the ticker again activates the notification.
(Previous behavior: the tap would pass through to the clock, which would open the shade. Only sometimes it wouldn't, because you'd have hit the left-hand-side of the ticker where there's no clock underneath. So this fixes that too.) Additionally, tapping the ticker will now immediately dismiss the ticker. Bug: 3365129 Change-Id: Ic641184c518b18d799a560c8da6b4c5844c912de
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java
index 5184462..a072aed 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java
@@ -53,7 +53,7 @@ public class TabletTicker
private static final String TAG = "StatusBar.TabletTicker";
- private static final boolean CLICKABLE_TICKER = false;
+ private static final boolean CLICKABLE_TICKER = true;
// 3 is enough to let us see most cases, but not get so far behind that it's too annoying.
private static final int QUEUE_LENGTH = 3;
@@ -300,8 +300,16 @@ public class TabletTicker
if (CLICKABLE_TICKER) {
PendingIntent contentIntent = notification.notification.contentIntent;
if (contentIntent != null) {
- group.setOnClickListener(mBar.makeClicker(contentIntent,
- notification.pkg, notification.tag, notification.id));
+ // create the usual notification clicker, but chain it together with a halt() call
+ // to abort the ticker too
+ final View.OnClickListener clicker = mBar.makeClicker(contentIntent,
+ notification.pkg, notification.tag, notification.id);
+ group.setOnClickListener(new View.OnClickListener() {
+ public void onClick(View v) {
+ halt();
+ clicker.onClick(v);
+ }
+ });
} else {
group.setOnClickListener(null);
}