summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Daniel Sandler <dsandler@google.com> 2011-01-30 16:07:28 -0500
committer Daniel Sandler <dsandler@google.com> 2011-01-30 16:07:28 -0500
commit2ed08d2e70250517e5578dd650c96b14aacf9ba5 (patch)
tree5bdb8be1e61237538e6bb545499b785acc3573d4
parent8c9891840aa26e788750e8b2f12bbbb0bae0f9f3 (diff)
Dismiss the ticker early if the status bar is tapped.
Tapping the ticker will still launch the notification's contentIntent, but tapping anywhere else in the bar will immediately hide the ticker. Bug: 3365129 Change-Id: Ic1abd38fd4c5bdf32f3586b4e4aa5b833b11a9bd
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarView.java2
2 files changed, 6 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index 6c8a20d57329..1ac16de8f400 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -94,6 +94,7 @@ public class TabletStatusBar extends StatusBar implements
public static final int MSG_HIDE_CHROME = 1031;
public static final int MSG_OPEN_INPUT_METHODS_PANEL = 1040;
public static final int MSG_CLOSE_INPUT_METHODS_PANEL = 1041;
+ public static final int MSG_STOP_TICKER = 2000;
// Fitts' Law assistance for LatinIME; TODO: replace with a more general approach
private static final boolean FAKE_SPACE_BAR = true;
@@ -581,6 +582,9 @@ public class TabletStatusBar extends StatusBar implements
mShadow.setVisibility(View.VISIBLE);
notifyLightsChanged(false);
break;
+ case MSG_STOP_TICKER:
+ mTicker.halt();
+ break;
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarView.java
index 98f718baccee..4e2faf792771 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarView.java
@@ -51,6 +51,8 @@ public class TabletStatusBarView extends FrameLayout {
mHandler.sendEmptyMessage(TabletStatusBar.MSG_CLOSE_RECENTS_PANEL);
mHandler.removeMessages(TabletStatusBar.MSG_CLOSE_INPUT_METHODS_PANEL);
mHandler.sendEmptyMessage(TabletStatusBar.MSG_CLOSE_INPUT_METHODS_PANEL);
+ mHandler.removeMessages(TabletStatusBar.MSG_STOP_TICKER);
+ mHandler.sendEmptyMessage(TabletStatusBar.MSG_STOP_TICKER);
for (int i=0; i < mPanels.length; i++) {
if (mPanels[i] != null && mPanels[i].getVisibility() == View.VISIBLE) {