diff options
author | John Spurlock <jspurlock@google.com> | 2014-08-03 22:58:28 -0400 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2014-08-04 11:32:18 -0400 |
commit | cb566aab57cafb69c628809fc0a0ffa2151c7d6e (patch) | |
tree | 619b8dee42537cc2a71f7a198fbaf3e9757e05f5 /packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java | |
parent | 3e137eb2b1c638c271d6dc5b53da30550bee1fe0 (diff) | |
download | frameworks_base-cb566aab57cafb69c628809fc0a0ffa2151c7d6e.zip frameworks_base-cb566aab57cafb69c628809fc0a0ffa2151c7d6e.tar.gz frameworks_base-cb566aab57cafb69c628809fc0a0ffa2151c7d6e.tar.bz2 |
Doze: Follow the notification light.
- Send the notification light info up to SystemUI from NoMan.
- Doze mode will now periodically pulse the display (once)
if the notification light is active.
- Change "tease" terminology to "pulse", which is the singular.
Maintain the multi-pulse on buzz-beep-blink for now as extra
emphasis.
- Scrim controller now always takes number of pulses as an arg,
to support a single pulse (used for notification light, and
eventually pickup once available).
- Dial down the display brightness when pulsing.
Bug:15863249
Change-Id: Ifb208a27e82b66cff1d0c04e5b7f758098ea29cf
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java index a82c907..9107790 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java @@ -55,6 +55,8 @@ public class CommandQueue extends IStatusBar.Stub { 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; + private static final int MSG_NOTIFICATION_LIGHT_OFF = 17 << MSG_SHIFT; + private static final int MSG_NOTIFICATION_LIGHT_PULSE = 18 << MSG_SHIFT; public static final int FLAG_EXCLUDE_NONE = 0; public static final int FLAG_EXCLUDE_SEARCH_PANEL = 1 << 0; @@ -95,6 +97,8 @@ public class CommandQueue extends IStatusBar.Stub { public void hideSearchPanel(); public void setWindowState(int window, int state); public void buzzBeepBlinked(); + public void notificationLightOff(); + public void notificationLightPulse(int argb, int onMillis, int offMillis); } public CommandQueue(Callbacks callbacks, StatusBarIconList list) { @@ -230,6 +234,19 @@ public class CommandQueue extends IStatusBar.Stub { } } + public void notificationLightOff() { + synchronized (mList) { + mHandler.sendEmptyMessage(MSG_NOTIFICATION_LIGHT_OFF); + } + } + + public void notificationLightPulse(int argb, int onMillis, int offMillis) { + synchronized (mList) { + mHandler.obtainMessage(MSG_NOTIFICATION_LIGHT_PULSE, onMillis, offMillis, argb) + .sendToTarget(); + } + } + private final class H extends Handler { public void handleMessage(Message msg) { final int what = msg.what & MSG_MASK; @@ -306,7 +323,12 @@ public class CommandQueue extends IStatusBar.Stub { case MSG_BUZZ_BEEP_BLINKED: mCallbacks.buzzBeepBlinked(); break; - + case MSG_NOTIFICATION_LIGHT_OFF: + mCallbacks.notificationLightOff(); + break; + case MSG_NOTIFICATION_LIGHT_PULSE: + mCallbacks.notificationLightPulse((Integer) msg.obj, msg.arg1, msg.arg2); + break; } } } |