diff options
author | John Spurlock <jspurlock@google.com> | 2014-07-26 17:09:56 -0400 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2014-07-26 17:09:56 -0400 |
commit | cad5768e22e5132efb2e5179f4988a763c7a8d9e (patch) | |
tree | f8d91ee27d2d2af74899c98305d90246b63ddd99 /packages/SystemUI | |
parent | f0f0f7ca66e15c5cebfbcf38a8d1e576b3e6e335 (diff) | |
download | frameworks_base-cad5768e22e5132efb2e5179f4988a763c7a8d9e.zip frameworks_base-cad5768e22e5132efb2e5179f4988a763c7a8d9e.tar.gz frameworks_base-cad5768e22e5132efb2e5179f4988a763c7a8d9e.tar.bz2 |
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
Diffstat (limited to 'packages/SystemUI')
4 files changed, 34 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java index 333b8b4..01b30ca 100644 --- a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java +++ b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java @@ -292,6 +292,11 @@ public class DozeService extends DreamService { @Override public void onNewNotifications() { if (DEBUG) Log.d(mTag, "onNewNotifications"); + // noop for now + } + @Override + public void onBuzzBeepBlinked() { + if (DEBUG) Log.d(mTag, "onBuzzBeepBlinked"); requestTease(); } }; @@ -305,6 +310,7 @@ public class DozeService extends DreamService { public interface Callback { void onNewNotifications(); + void onBuzzBeepBlinked(); } } } 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 @@ public class CommandQueue extends IStatusBar.Stub { 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 class CommandQueue extends IStatusBar.Stub { 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 class CommandQueue extends IStatusBar.Stub { } } + 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 @@ public class CommandQueue extends IStatusBar.Stub { case MSG_SET_WINDOW_STATE: mCallbacks.setWindowState(msg.arg1, msg.arg2); break; + case MSG_BUZZ_BEEP_BLINKED: + mCallbacks.buzzBeepBlinked(); + break; } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index 13fad7b..d089ae6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -2346,6 +2346,13 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, } @Override // CommandQueue + public void buzzBeepBlinked() { + if (mDozeServiceHost != null) { + mDozeServiceHost.fireBuzzBeepBlinked(); + } + } + + @Override // CommandQueue public void setSystemUiVisibility(int vis, int mask) { final int oldVal = mSystemUiVisibility; final int newVal = (oldVal&~mask) | (vis&mask); @@ -3757,6 +3764,12 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, private DozeService mCurrentDozeService; + public void fireBuzzBeepBlinked() { + for (Callback callback : mCallbacks) { + callback.onBuzzBeepBlinked(); + } + } + public void fireNewNotifications() { for (Callback callback : mCallbacks) { callback.onNewNotifications(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java index d0f61f0..a123bf7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java @@ -95,6 +95,10 @@ public class TvStatusBar extends BaseStatusBar { public void setWindowState(int window, int state) { } + @Override // CommandQueue + public void buzzBeepBlinked() { + } + @Override protected WindowManager.LayoutParams getSearchLayoutParams( LayoutParams layoutParams) { |