History log of /frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
57627794b682235afd60adfb235fee46d32f54e2 11-Dec-2014 John Spurlock <jspurlock@google.com> Audio policy: Fix deprecated shouldVibrate api.

And apply zen mode immediately to avoid race conditions
in tests.

Bug: 18702149
Change-Id: Iad156a29b9e6a5998e7c2dafa8b79a71447066f9
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
29b7872bf454d61f849d32d4a7a50485aa9c282d 11-Dec-2014 John Spurlock <jspurlock@google.com> Zen: Leave zen=none on manual ringer mode stream volume changes.

If the stream volume is changed from the api, leave zen=none
so as not to leave the system in an unexpected state.

Bug: 18084981
Change-Id: I857b3ff87ad4e2aa9aab479529caf13b819f854c
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
8403b7535b7b13e5aed732963fc49cf477b9a92e 10-Dec-2014 John Spurlock <jspurlock@google.com> NoMan: Apply audio restrictions when effects are disabled by listeners.

Bug: 17990185
Change-Id: Id946fab4dd27e2354919de6a98c009bc2e711240
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
530052a2fe3b6a6a4246ce28ab0ced647fe7f470 30-Nov-2014 John Spurlock <jspurlock@google.com> Zen: New behavior for built-in downtime + nextalarm conditions.

- Downtime: Allow user to enter downtime early, offer as an end
condition four hours before downtime starts. Available in
either none or priority, regardless of settings configuration.
- Downtime: Always exit before next alarm if zen=none.
- Downtime: Make more like any other condition provider, remove
special status (mostly).
- Downtime: New auto-triggering rules, allow triggering after a
manual condition ends, once.
- Decouple NextAlarm + Downtime providers, allow them to offer
their conditions at the same time.
- Downtime/NextAlarm: Update conditions if they change while being
requested, even if unsubscribed.
- Make all three built-in condition providers optional, via config.
- New internal helper for runtime config.
- Don't follow changes to next alarm, consider the condition false.
- Isolate downtime calendar logic into separate class (for testing).
- Allow a:bb -> a:bb as a valid downtime range (all day).
- Volume dialog: configuration establishes maximum number of visible
conditions, including built-ins.
- Zen mode panel: avoid widget updates during layout transition.
- Zen mode panel: move controller callers to background thread.
- Zen mode panel: hide/show/rebind rows instead of adding/removing.
- ZenLog: Add downtime autotrigger results.
- Volume panel: Smarter refresh on ringer/zen changes.

Bug: 16373455

Change-Id: I4f801018ddb0beb6eb9fa03a81c79f7949888a3f
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
661f2cf45860d2e10924e6b69966a9afe255f28b 17-Nov-2014 John Spurlock <jspurlock@google.com> VolumeZen: Introduce internal vs external ringer mode.

Stabilize mapping between ringer-mode=silent and zen=priority
by keeping track of two ringer modes:
- Internal ringer mode: Used for underlying stream muting
- External ringer mode: Reported to clients

The mapping between external ringer mode + zen is:
- normal = all
- vibrate = all
- silent = priority (read-write) or none (read)

Changes include:
- Remove "zen check" from audio service, back to audio
service having no knowledge of zen.
- Maintain a new external ringer mode in audio service,
this is the ringer mode reported through AudioManager
to callers, also mapped to the change intent.
- Introduce a "ringer mode delegate" to the local
audio manager interface, responsible for observing
external / internal mode changes, and making changes
if necessary.
- Internal ringer mode changes are still interesting
to the volume dialog, wire up a callback through
the existing IVolumeController interface.
- On devices without vibration, the mapping is the same
but since no ringer mode change is possible, disable
the icon toggle and remove the mute icon when volume=0.
- On devices with vibration, volume down presses should
pulse the vibrate icon (and vibrate) as a hint that this
is as low as the device can go using the keys. Since
the mechanics are similar to the existing zen=none hint,
pull into shared helper.
- Log ringer mode changes to the zen log, include calling
package information for issue diagnosis.
- Include whether vibration is supported in the audio service
dump.
- Update the status bar icon policy to use the internal ringer
mode, not the external mode (for vibrate icon).
- Update the "Muted by <x>" logic, include current suppressor
in dumpsys, ensure suppression icon is enabled & !clickable,
regardless of zen mode.

Bug: 17884168
Bug: 15471679
Bug: 16824970
Change-Id: Ia7d3bb23ce6d1e37b24fb6521d1c1ab9bb8f60c0
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
e5b42d97f6fd3eb0220ea84f21e60d530d93fc46 15-Oct-2014 John Spurlock <jspurlock@google.com> Leave zen when apps set ringer-mode = non-silent (normal/vibrate).

Apps can end up in priority mode by setting ringer-mode = silent.

Now they can leave priority mode by setting ringer-mode = non-silent.
(normal or vibrate)

Bug: 17884168
Change-Id: I54c853885f4ae9ee618041dd7ac6ab0663fc7b37
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
32fe4c6e642ae8a2b36136e33040e12f88aa5e07 02-Oct-2014 John Spurlock <jspurlock@google.com> Disable notification effects during phone calls.

Listen for phone call state changes in NoMan, and disable
incoming non-call notification effects when non-idle.

Bug:17658454
Change-Id: I6f7d66413970fbff6822ab29a12f91cbed068261
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
c909e1b2dfa2e47b786d96818f70f6308c5a78be 01-Oct-2014 John Spurlock <jspurlock@google.com> Zen: Fix new event category check.

Allow events through if configured, and use a switch
for separating mode-specific logic.

Bug:17580878
Change-Id: Id7b5d8b50173015d6a78568ed0a90e0bccf98549
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
12aeda802ed91a49977a22166319ce74a3352e30 23-Sep-2014 Christoph Studer <chstuder@google.com> NoMan: Add 3s timeout in matchesCallFilter()

In Priority mode, NoMan can block the telecom Ringer
indefinitely when looking up the caller contact details via
ContactsProvider.

Fix this by introducing a 3s timeout and assume the call
matches the call filter when the timeout is hit.

Bug: 17598245
Change-Id: Ia0893cf203e6ffd943c749719ebb9e0f0958eb01
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
2dac62c2e985ce1848b0fff751d4ed2cc3885c0c 19-Sep-2014 John Spurlock <jspurlock@google.com> Zen: Add events as a new config attribute.

Decouple events from alarms in the zen interception function,
and default the new allowEvents to true.

Bug:17580878
Change-Id: Iff10df385206ad73c3423ff118c79e94a10918d9
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
ef9f6f957d897ea0ed82114185b8fa3fefd4917b 13-Sep-2014 Tyler Gunn <tgunn@google.com> Renaming Telecomm to Telecom.

- Changing package from android.telecomm to android.telecom
- Changing package from com.android.telecomm to
com.android.server.telecomm.
- Renaming TelecommManager to TelecomManager.

Bug: 17364651
Change-Id: I192cb5d189f55db012ea72ee82ccc5aedbc21638
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
806dbae9e12f3875cf0def3da2f3c3c2b768a844 09-Sep-2014 John Spurlock <jspurlock@google.com> Zen: Map transition to ringer-mode silent to "priority".

Instead of "none".

Bug:16875664
Change-Id: I2a425663f08f35854e7e857330afc20eef01ef2e
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
1564b6d8d729eda405975828847841ba35a95735 08-Sep-2014 John Spurlock <jspurlock@google.com> Zen: Remove suppression of untagged vibrations in zen mode.

Bug:17313184
Change-Id: I07d24a7d9ce15160a4990391c53d7d6309a13c3e
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
da4bd209cffad7e47a4bc6e9f02c4bfc333d3d8d 04-Sep-2014 Chris Wren <cwren@android.com> Keep contact affinities separate across users.

Also ignore people extras on USER_ALL notifications.

Bug: 16213960
Change-Id: Ic0341c88d42d4a4f12cac35c0f41c2746aec02ac
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
2b122f4c2e691f0319e4f9ea5873989792bb56a6 27-Aug-2014 John Spurlock <jspurlock@google.com> Add a hidden system method to check call filter.

As a stopgap for dialer, add a NoMan method to check
whether or not contact extras meet the current notification
interruption filter, if phone calls are allowed at all.

Bug:17299986
Change-Id: I4d7e04b974d878504ef4e3a73cb6b602cdd2f73e
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
85a384b4256121eb85b7e72bcd50f3348f365d41 27-Aug-2014 Christoph Studer <chstuder@google.com> NoListener: Factor out ZEN mode API

Bug: 17255109
Bug: 17295014
Change-Id: I7e1f6e29b8a23b8e59a8615a8012a86bd5dd22d7
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
dd753c00d5c25600f0c297b9d1e89e2c4b064bc2 19-Aug-2014 John Spurlock <jspurlock@google.com> Zen: Remove "allow disable" filter from noman.

No longer used by dialer.

Bug:15344099
Change-Id: Ib2d00804f671fae520303531e8ccde9e44f817ec
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
528dcd2fbe6556ca542a432b7aa26731663e3148 15-Aug-2014 John Spurlock <jspurlock@google.com> Zen: tweak audience interruption logic.

Only check audience for calls & messages.

Bug:17061146
Change-Id: I7f0176a7184c725fef393784fe8ccb0eb7f49ff7
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
4db0d98b42a723f2e16c6595e85e866fd26c6d98 13-Aug-2014 John Spurlock <jspurlock@google.com> Zen: Downtime now a condition provider, persist conditions.

- Persist the entire exit condition instead of only the id.
- Make downtime a proper condition provider (similar to the
existing countdown provider for time-based conditions)
- Move all downtime-related items out of ZenModeHelper and
into the new condition provider.
- Reevaluate downtime more often, when any of its inputs change.
- Make sure downtime appears as an available condition in the
condition panel when applicable.

Bug:16296125
Bug:16211189
Bug:17031767
Change-Id: I1d8269a4e6fe170ce776bf932dbbdfb29dd25dd7
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
5c8ea2c369deab75719fe7c7301846a8ef955702 08-Aug-2014 John Spurlock <jspurlock@google.com> Merge "New api to sync zen mode state from listeners." into lmp-dev
6ac5f8df62a4b6d87cf32797d2886efab8e28226 18-Jul-2014 John Spurlock <jspurlock@google.com> Allow user-prioritized packages through in priority mode.

Bug:16396715
Change-Id: I115d717e5c25500407d4f7876f070a1497fb2887
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
d8afe3c41e65a8f6ff4283c124ba250c92cf50c6 01-Aug-2014 John Spurlock <jspurlock@google.com> New api to sync zen mode state from listeners.

- Allow connected listeners to request changes
to the primary device's interruption level.
- Rename alerts -> effects in the other constant,
which does not affect interruption level.
- Rename "flags" -> "hints"
- Basic NoMan wiring for level hint.

Bug:15888672
Change-Id: I2b07fb2c9d32a143fff7c260b7d2cd4d0cd3a592
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
bfa5dc4c6c486bdabadb5ea2e356a7d348e3b975 29-Jul-2014 John Spurlock <jspurlock@google.com> Zen: Classify notifications using the alarm stream.

Also:
- include audio attributes in dump
- workaround for recent AudioAttributes change.

Bug:16455021
Change-Id: Ib9b047a74cff3e0cc354a5aaa96bc92a400b3845
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
8c01d88208e17af01268ea01a08c46c2d2f96721 28-Jul-2014 John Spurlock <jspurlock@google.com> Zen: follow independent ringer mode changes.

Bug:16624498
Change-Id: Ib623118970a82c8406c714687b1b516378fe7824
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
b5e767b50918f70ba5f3420a58cc2631eacab903 27-Jul-2014 John Spurlock <jspurlock@google.com> Handle special users in default app check.

Change-Id: I3d1828f143a677bf48cc3caeff125196b6d315e3
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
c54459fb9469b60d85bff716c5f53c55ba0fc784 27-Jul-2014 John Spurlock <jspurlock@google.com> Zen: Remove hardcoded package name filters.

Bug:15474885
Change-Id: I282cc3d597b2a8855bcb4e987a11cea04f956bad
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
333f8dd78f8926dfb8851dbb23333c9f5553e69f 23-Jul-2014 John Spurlock <jspurlock@google.com> Wire up CATEGORY_ALARM and CATEGORY_EVENT.

And remove the alarm package whitelist now that deskclock
uses a category.

Bug:16406214
Change-Id: I6ca400376a9df7646889e394e53e4d491c56a46c
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
89c3b29a9bfa0ae9858b913bc1ab6604c4613a15 20-Jul-2014 Jean-Michel Trivi <jmtrivi@google.com> Rename USAGE_NOTIFICATION_TELEPHONY_RINGTONE

AudioAttributes: rename USAGE_NOTIFICATION_TELEPHONY_RINGTONE to
USAGE_NOTIFICATION_RINGTONE in the list of usage values.
Temporarily keep the old definition to prevent transient build
breakages, will be removed after telephony packages have been
updated.

Bug 16401631

Change-Id: I9398443fd7ba3c30e9d371c5c5a2934b9ea6f30a
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
7b41467704f941b11af6aace3e40993afc7f6c6f 18-Jul-2014 John Spurlock <jspurlock@google.com> Zen mode filtering should use new usage constants.

Refactor stream-based calls to usage-based calls.

Bug:15279516
Change-Id: I3f7757d8123c14670e2ad5f8e6aa4e9803efe7ec
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
6ae82a747c77fbdba45d2deaf127ef068c294aa1 16-Jul-2014 John Spurlock <jspurlock@google.com> Add a zen-specific event sink, include in dumpstate.

Useful for tracking zen events (since boot) that are
too old to be included in the standard log.

Change-Id: I91633d35b26091bb18523a76ebdba9d286d0cd41
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
312d1d01def474e39e4dabbf4aef0b8adaa7caed 08-Jul-2014 John Spurlock <jspurlock@google.com> Zen: Use default phone app api in call filter.

Remove hardcoded list of packages (for calls).

Use the TelecommManager version until the PhoneManager version
is ready.

Change-Id: I4488f4ea3f0c03f009c84f519eb533e0ea1e07d5
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
ae641c9ccd3f81214cee54a5f13804f1765187ad 01-Jul-2014 John Spurlock <jspurlock@google.com> Implement new volume UI design.

- Add segmented zen-mode picker to the rocker UI.
- Add a new "no interruptions" value to the zen setting.
- Implement expandable condition subpanel on the rocker UI.
- Remove the old circle&slash icons.
- Suppress alarm sounds if in "no interruptions" mode.
- Add warning re: alarms to the condition UI.
- Allow rocker UI to display over the keyguard.
- Remove Notifications QS tile.
- Realign volume rocker to the top of the screen.
- Add support for new "days" sleepMode.
- New icon policy rules for "volume" slot.
- New important icon (star).

Associated Settings change:
I6ed56791784968adfbd684f490dbbebed285a2dd

Bug:15831713
Change-Id: I35afe38646f04d2ba0dbac11c2c6356120a33694
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
d5092bcb11c28f656eb470bd9b74585287fd75b4 03-Jul-2014 Christoph Studer <chstuder@google.com> NoMan: Allow notifications to transition !ZEN -> ZEN

Bug: 15979100
Change-Id: Ifd620caf2e00f8cd3d9f1458b93585a454af4b74
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
3332ba54ae85df14d761447d86d2aa19d448ce11 10-Mar-2014 John Spurlock <jspurlock@google.com> Heads-up notifications for low battery warnings.

Falls back to dialogs when heads-up are N/A.

Add new ongoing notification if battery saver mode
is active. Offer to start battery saver on warnings,
if not already started.

True up BatteryMeterView's levels to the latest threshold
levels. 15% for first warning.

Bug:13329308
Change-Id: Id8ad11a1997079ee7165ae003a8fa1c744462ab3
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
99f963ea04d7a86219ece00c356f3f6bce33b6d6 28-May-2014 Chris Wren <cwren@android.com> Add people signals to Zen mode.

Depends-On: I51fcf689ddbee7715e3387b865f18a715887c943
Change-Id: I7c91dec1afeb54505426c4da59ec4d072a60c240
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
333a61c3a5a83fe9c50ebeb5c947317f61385b7b 28-May-2014 Chris Wren <cwren@android.com> Track Zen Mode status in the NotificationRecord

This requires the record to be present in makeRankingUpdateForListener,
however, if the ranking object is created before the post to the handler,
then no cloning is necessary.

Depends-On: I907a1ff28123219db1c08889d723ad1b70b191ab
Change-Id: I51fcf689ddbee7715e3387b865f18a715887c943
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
e86de4c0670550a29edae77ebb9f5c8ba5631231 30-Apr-2014 John Spurlock <jspurlock@google.com> Zen mode tweaks.

- Fix regression with alarms.
- Run all condition provider callbacks on the main thread.
- Exit zen mode if the current condition is disabled / uninstalled.

Bug:14402762
Change-Id: I0746670c1910047a9dc9b7e29aa1a6c3899fd9fe
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
1c923a386ee4d8c31cc289f8628b8fc46bf08e86 27-Apr-2014 John Spurlock <jspurlock@google.com> Force condition provider unsubscribe when exiting zen mode.

Bug:13743109
Change-Id: I3c205067498a86e2862a0c545bc38e41682693d5
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
e77bb36d48b6b8b5c3bb6a1195aca469bb237919 26-Apr-2014 John Spurlock <jspurlock@google.com> Wire up condition providers to zen mode exit triggers.

Bug:13743109
Change-Id: I4e45d7050d1f9aaa379f46379a3203e61e216a3d
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
7340fc8665ae3f9f1978f42aa0e5e1da85036158 25-Apr-2014 John Spurlock <jspurlock@google.com> Introduce condition provider services.

Add the condition provider interface, base class, and associated
system metadata.

Pull out common service management code into a reusable helper,
used by notification listeners and condition providers. The
helper, ManagedServices, is now completely self-contained - it
has no dependencies on NoMan or NoMan abstractions.

Bug:13743109
Change-Id: I6856d40f0a2ead78ac9b5707568559a57e7eb009
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java
056c519df1dfb8fdc57daddfdf09bc0e1ffddac4 21-Apr-2014 John Spurlock <jspurlock@google.com> Do not disturb: persist user config.

Load and store user configuration for do not disturb. Separate
out service-related aspects into new helper. Make config availble
over NoMan for settings.

Implement phone + message based filtering (package whitelist for now).

Implement automatic enter/exit zen mode overnight scheduler.

Bug:14211946
Change-Id: Ib28aab0e4c5c9a5fd0b950b2884b1ab618fdfeca
/frameworks/base/services/core/java/com/android/server/notification/ZenModeHelper.java