Doze: Update tease signal to buzz-beep-blink from NoMan.
Inform SystemUI when NoMan buzzes, beeps or blinks. Use that
as the notification signal when dozing instead of trying to figure
out interesting panel content updates.
At some point, we should move the entire calculation up into SystemUI
itself, but that's too large of a refactoring to perform now.
Bug:15863249
Change-Id: I40e92334977e0676a1363774c2cbbf91d72ec8e5
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
index eb44002..a82c907 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
@@ -54,6 +54,7 @@
private static final int MSG_SET_WINDOW_STATE = 13 << MSG_SHIFT;
private static final int MSG_SHOW_RECENT_APPS = 14 << MSG_SHIFT;
private static final int MSG_HIDE_RECENT_APPS = 15 << MSG_SHIFT;
+ private static final int MSG_BUZZ_BEEP_BLINKED = 16 << MSG_SHIFT;
public static final int FLAG_EXCLUDE_NONE = 0;
public static final int FLAG_EXCLUDE_SEARCH_PANEL = 1 << 0;
@@ -93,6 +94,7 @@
public void showSearchPanel();
public void hideSearchPanel();
public void setWindowState(int window, int state);
+ public void buzzBeepBlinked();
}
public CommandQueue(Callbacks callbacks, StatusBarIconList list) {
@@ -221,6 +223,12 @@
}
}
+ public void buzzBeepBlinked() {
+ synchronized (mList) {
+ mHandler.removeMessages(MSG_BUZZ_BEEP_BLINKED);
+ mHandler.sendEmptyMessage(MSG_BUZZ_BEEP_BLINKED);
+ }
+ }
private final class H extends Handler {
public void handleMessage(Message msg) {
@@ -295,6 +303,9 @@
case MSG_SET_WINDOW_STATE:
mCallbacks.setWindowState(msg.arg1, msg.arg2);
break;
+ case MSG_BUZZ_BEEP_BLINKED:
+ mCallbacks.buzzBeepBlinked();
+ break;
}
}