OSDN Git Service

Introduce zen mode.
authorJohn Spurlock <jspurlock@google.com>
Thu, 13 Feb 2014 17:52:19 +0000 (12:52 -0500)
committerJohn Spurlock <jspurlock@google.com>
Thu, 27 Feb 2014 16:53:30 +0000 (11:53 -0500)
commite677d7113f6627161653f686b6381d2eef4d502f
treeb00c08df78f346475cba74e15d60d818dacfcf5f
parent94b5ca811e5716bddb4a4d86df35c29bb9165e5f
Introduce zen mode.

 - New global zen mode setting with three values:
   ZEN_MODE_OFF, ZEN_MODE_LIMITED, ZEN_MODE_FULL
 - Status bar icon (on lhs)  when in _LIMITED / _FULL
 - Rules are hardcoded for now:
   _LIMITED = intercept all notifications except calls/alarms
   _FULL = intercept everything
 - UI affordance in shade to set mode
 - Only one exit condition: "Until you delete this"
 - Intercepted notifications:
   - appear darker in the shade
   - do not cause sound/vibration
   - do not fire fullScreenIntents
   - do not contribute an icon to the status bar

Change-Id: Ic36c95982b483432006bf9dab102a31370382aa9
25 files changed:
core/java/android/provider/Settings.java
packages/SystemUI/res/drawable-hdpi/spinner_default_holo_dark_am_no_underline.9.png [new file with mode: 0644]
packages/SystemUI/res/drawable-hdpi/stat_sys_zen_full.png [new file with mode: 0644]
packages/SystemUI/res/drawable-hdpi/stat_sys_zen_limited.png [new file with mode: 0644]
packages/SystemUI/res/drawable-mdpi/spinner_default_holo_dark_am_no_underline.9.png [new file with mode: 0644]
packages/SystemUI/res/drawable-mdpi/stat_sys_zen_full.png [new file with mode: 0644]
packages/SystemUI/res/drawable-mdpi/stat_sys_zen_limited.png [new file with mode: 0644]
packages/SystemUI/res/drawable-xhdpi/spinner_default_holo_dark_am_no_underline.9.png [new file with mode: 0644]
packages/SystemUI/res/drawable-xhdpi/stat_sys_zen_full.png [new file with mode: 0644]
packages/SystemUI/res/drawable-xhdpi/stat_sys_zen_limited.png [new file with mode: 0644]
packages/SystemUI/res/drawable-xxhdpi/spinner_default_holo_dark_am_no_underline.9.png [new file with mode: 0644]
packages/SystemUI/res/drawable-xxhdpi/stat_sys_zen_full.png [new file with mode: 0644]
packages/SystemUI/res/drawable-xxhdpi/stat_sys_zen_limited.png [new file with mode: 0644]
packages/SystemUI/res/layout/status_bar.xml
packages/SystemUI/res/layout/status_bar_expanded.xml
packages/SystemUI/res/layout/status_bar_expanded_header.xml
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelHeaderView.java [new file with mode: 0644]
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/ZenModeView.java [new file with mode: 0644]
packages/SystemUI/src/com/android/systemui/statusbar/phone/ZenModeViewAdapter.java [new file with mode: 0644]
services/core/java/com/android/server/notification/NotificationDelegate.java
services/core/java/com/android/server/notification/NotificationManagerService.java
services/core/java/com/android/server/statusbar/StatusBarManagerService.java