History log of /frameworks/base/core/java/android/app/NotificationChannel.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
745c15477b22f88af303065e18025af386582736 26-May-2017 Julia Reynolds <juliacr@google.com> Properly read vibration setting on boot.

Test: runtest systemui-notification
Change-Id: I400bc3df441524abe4973d4d6bccc7ef30a2e1c7
Fixes: 37865035
/frameworks/base/core/java/android/app/NotificationChannel.java
f732159cf8d6a4e1cd17542a3a2cf020ad6919a3 24-May-2017 Julia Reynolds <juliacr@google.com> Allow some system notifications to be blocked.

- Happens at a channel level, and system services have to opt in

Bug: 38428796
Test: runtest systemui-notification, manual
Change-Id: I5592b4e32c177844583aee25379390199eef0a58
/frameworks/base/core/java/android/app/NotificationChannel.java
e0b25746267972b370a1c773ad18d146ee8163c3 08-May-2017 Julia Reynolds <juliacr@google.com> Lock relevant fields on channel update

This is safe for O as all updates come from a trusted
source.

Change-Id: Iab8ec1e68f8f9f9e345ebf4d5e44718191cc49e6
Fixes: 37986254
Test: runtest systemui-notification
/frameworks/base/core/java/android/app/NotificationChannel.java
bad42976009ffb61010136ed8055f9e0f6d2e416 25-Apr-2017 Julia Reynolds <juliacr@google.com> Api updates

- Better documentation on DEFAULT_CHANNEL_ID
- Renaming getChannel/setChannel/getTimeout/setTimeout
- Add documentation to getShortcutId
- @hide parcel constructors

Test: make, make cts
Bug: 37672218

Change-Id: I695b2620c51638a84930e9d1c5fbfd6d85699b55
/frameworks/base/core/java/android/app/NotificationChannel.java
30e06bb668f2e4b024c4ebc2a131de91c96de5eb 24-Apr-2017 Jeff Sharkey <jsharkey@android.com> Even more auto-doc work.

Update docs based on what new lint detector found. Add new @IntDef
to parameters or methods returning constants or flags, and add
@RequiresPermission to methods mentioning permissions.

Test: make -j32 offline-sdk-docs
Bug: 37526420
Change-Id: I7f640f7883fcb66b911a52ae93b83f77306571ec
/frameworks/base/core/java/android/app/NotificationChannel.java
6503bd8e33dbf6e8357256d43c6e1158e32a0268 20-Apr-2017 Jeff Sharkey <jsharkey@android.com> Auto-generate docs based on annotations.

We have a handful of annotations that we've been sprinkling across
the platform APIs, such as @Nullable, @NonNull, @IntDef, etc. It
would be really helpful to surface these contracts to developers
through the SDK docs.

This change allows annotations like those mentioned above to declare
the following new javadoc fields:

@memberDoc: docs to append to a field or method definition.
@paramDoc: docs to append to a @param definition.
@returnDoc: docs to append to a @return definition.

This change also builds a docstring to describe the list of all
constants listed in an @IntDef annotation. Sadly AnnotationDesc
only passes along raw constant values, so we need the help of the
new "prefix" annotation argument to help find the field names.

Test: builds
Bug: 37526420
Change-Id: I4cfc00dd904e5dfa945b406d546e36846b7c0c28
/frameworks/base/core/java/android/app/NotificationChannel.java
184b86da382b8e24cdd0e5629e70d7057d418883 12-Apr-2017 Julia Reynolds <juliacr@google.com> Allow notification channels to be silent.

This better accomodates those apps that play their own sounds.
Since most apps don't play their own sounds, update the documentation
on notificationchannel to add guidance about when they should add a
sound.

Fixes: 37237013
Test: runtest systemui-notification
Change-Id: If00b15b1b44da66d24dacb2895e9a6c0a06d1890
/frameworks/base/core/java/android/app/NotificationChannel.java
2c891c92fabb0ef8fdb77870b0272c156c71c7f0 17-Mar-2017 Julia Reynolds <juliacr@google.com> Allow channels to have a user visible description.

Test: runtest systemui-notification, cts
Change-Id: I0d04b82c99deecad663d8cb0565563f00e8a1f56
/frameworks/base/core/java/android/app/NotificationChannel.java
1d97e6a0c1341e3a6d8547fa843cb60ce6677a11 13-Mar-2017 Julia Reynolds <juliacr@google.com> Remove resource id channel/group name fields

Apps can listen for the LOCALE_CHANGED broadcast to
change names if needed.

Fixes: 35336590
Test: runtest systemui-notification, cts, manual
Change-Id: I62d2778f61e99200692755a6f268828a374837e6
/frameworks/base/core/java/android/app/NotificationChannel.java
3d91f1109b3921b6e67d28463a9fb1bc6f537791 03-Mar-2017 Julia Reynolds <juliacr@google.com> Allow channels to be renamed.

Because string resource ids aren't stable.

Test: runtest systemui-notification
Change-Id: Iaaa07b8c8cc1c8c321c7fedbfe1e252b4c1153dd
/frameworks/base/core/java/android/app/NotificationChannel.java
5a31193497fa923e24bc5c9796b40fdfae604d31 01-Mar-2017 Julia Reynolds <juliacr@google.com> Allow translatable channel names.

Bug: 35336590
Test: runtest sytemui runtest systemui-notification, manual
Change-Id: I1e6ebbcc36cab22ab9b2dfde505a68513544ef52
/frameworks/base/core/java/android/app/NotificationChannel.java
529e3329e68963eff0dd1cf40d938a9953cd5060 06-Feb-2017 Julia Reynolds <juliacr@google.com> Let developers choose a light color for channels

Test: runtest systemui-notification & cts
Change-Id: Ibfab57924d0a9093af23191ebdd68ce1c0da6eca
/frameworks/base/core/java/android/app/NotificationChannel.java
a33f5c4312ce708933454dfd1b154ccc46be099c 31-Jan-2017 Julia Reynolds <juliacr@google.com> Deprecate notification fields

And move references to the deprecated fields to
NotificationRecord for testability.

Test: runtest systemui-notification
Change-Id: If3910dc78297ad66679b1efa380315127261a018
/frameworks/base/core/java/android/app/NotificationChannel.java
619a69f722b75241b372cf7b01b45b2dd1c862fa 27-Jan-2017 Julia Reynolds <juliacr@google.com> Add audio attributes to notificationchannel

Test: runtest systemui-notification, cts, manual
Change-Id: I33b5a67190409fe2fc2bc7e2cbbd67ea38bc0655
/frameworks/base/core/java/android/app/NotificationChannel.java
59e152e92e6ebb71bab974973ce29b4f8d11f7cf 25-Jan-2017 Julia Reynolds <juliacr@google.com> Add notification channel groups.

Test: runtest systemui-notification, cts
Change-Id: I3ed82f2b20d3f791b7cae379a49373cb41231739
/frameworks/base/core/java/android/app/NotificationChannel.java
924eed1ca6d3fec5dae7eb0f9c11b8f23f628697 19-Jan-2017 Julia Reynolds <juliacr@google.com> Add updatable fields to Ranking

- NotificationChannel
- Badging

Test: runtest systemuinotification & cts

Change-Id: I7fd1f2dc06148927e9a4bd5b760d436e2c5e8a98
/frameworks/base/core/java/android/app/NotificationChannel.java
4036e8d4c636ae36f28585d283b522a7a97eaf72 13-Jan-2017 Julia Reynolds <juliacr@google.com> Save deleted channels.

To discourage the pattern of deleting channels and
recreating them to get around user settings.

Behavior:
- Creating a deleted channel brings back the old channel
(with it's old settings)
- Updating a deleted channel fails
- public getChannel apis should not return deleted channels

Also align data clean up done when clearing data & uninstalling
a package

Test: runtest systemui-notification, cts, cts-verifier

Change-Id: If19c20311c978fd8d3b1cb8b234dc1e68c7356be
/frameworks/base/core/java/android/app/NotificationChannel.java
aebfc4e7a3e3b66382e9004d5ed141b50e26a71b 06-Jan-2017 Julia Reynolds <juliacr@google.com> Cannot have badge only channels

Test: runtest systemui-notification & cts
Change-Id: I256e35a79400c1d25b3d2f1c7c5f8c513242a2aa
/frameworks/base/core/java/android/app/NotificationChannel.java
f35e3976e3c01077f8d8d0938d2ba0b3e5b80613 05-Jan-2017 Julia Reynolds <juliacr@google.com> Allow apps to enable notification badging.

Test: runtest systemui-notification
Change-Id: Ia16d671d864d1eee902652e31f023e30dc6b7387
/frameworks/base/core/java/android/app/NotificationChannel.java
baff400fa5a93d157934818982fcf534327f9830 15-Dec-2016 Julia Reynolds <juliacr@google.com> Add badging support for channels.

In this iteration badges are a user opt in feature.
Known issue: all listeners will receive 'badge only' notifications.

Test: runtest systemui-notification

Change-Id: Ic7450bf4de5351cfdc72bd96ec946fe6e035035c
/frameworks/base/core/java/android/app/NotificationChannel.java
f57de46d0b16fea790dc29062bf5e47cf63bae3e 23-Nov-2016 Julia Reynolds <juliacr@google.com> Allow apps to set vibrations pattern for channels

Test: runtest systemui-notification, cts
Change-Id: I9125e9c437e3888ba7e7582bb3557635a2aea893
/frameworks/base/core/java/android/app/NotificationChannel.java
0c299d4d6316d14e43d386b4562782083fe3c886 15-Nov-2016 Julia Reynolds <juliacr@google.com> Prioritize channel sound & vibration settings.

Unless the app is not targeting O and the user hasn't set
a preference in Settings.

Also apps no longer need the vibration permission to vibrate with
a notification.

Test: runtest systemui-notification
Change-Id: Ia84b1c97d13cb479db07035ca622b1fe52261329
/frameworks/base/core/java/android/app/NotificationChannel.java
85769915e7ef10bef2b5338ed8f04d9b787924fb 25-Oct-2016 Julia Reynolds <juliacr@google.com> Some channel model updates

- Apps cannot update their channel settings after creation.
- Importance is required when creating a channel.
- Some method name changes.
- Ranker can't modify fields a user has changed.
- High and Max importance mean the same thing.
- The default channel adopts app wide settings on creation.
- The default channel is limited to importance low once target api is post n mr1
unless the user changed it.

Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/notification

Change-Id: I73c449a6abe6d709046de79c5c54339cb2edf0b8
/frameworks/base/core/java/android/app/NotificationChannel.java
8f488d3f2f754bc6e8f4e87f40031a3f6a0b00db 14-Oct-2016 Julia Reynolds <juliacr@google.com> Move autogrouping into framework.

Test: runtest systemui, and post and dismiss notifications, checking that they
are grouped (or not) appropriately.

Change-Id: I8f3ec497cebcb14a7853fac98b844a3fd4503141
/frameworks/base/core/java/android/app/NotificationChannel.java
b5e44b796618c376cf535e43aaa86ea4522e7770 16-Aug-2016 Julia Reynolds <juliacr@google.com> Add Notification channels

In this iteration:
-Every app gets a default channel that notifications will be posted
to if they don't specify a channel themselves. The default channel
inherits app-wide settings on upgrade.
-Apps can create new channels without user approval, but apps
cannot change the name of a channel once created, nor can they ever
set the importance.
- When a notification is posted:
- If the channel is marked as 'vibrates', vibration will be
applied to notifications that lack a vibration. unlike the default
notification flag, notifications will retain their custom vibration
if given
- Same with sound and lights
- A notification's importance is the min of the app and channel
importance
- A notification can bypass dnd if: either the app or channel settings
say it can
- A notification's show on lockscreen setting comes from the app first,
and the channel second if the app has no preference

Tests: in cl. also there's a cl for cts and a test app.

Change-Id: I630f99df655800b00586dcfab538d320d04fe0f0
/frameworks/base/core/java/android/app/NotificationChannel.java