• Home
  • History
  • Annotate
  • only in /frameworks/base/services/tests/notification/src/com/android/
History log of /frameworks/base/services/tests/notification/src/com/android/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
de00b62099ee500ad010aab3d35022e2fc96d02a 26-Oct-2017 Julia Reynolds <juliacr@google.com> Allow dnd access for secondary users

Test: runtest systemui-notification
Change-Id: Ie63b767bcd25b7b3e7cac08afcf3351adc97263f
Merged-In: Ie63b767bcd25b7b3e7cac08afcf3351adc97263f
Fixes: 68060759
(cherry picked from commit ee611537e935ca419b4333cc82c9dee5d2e7a92d)
erver/notification/NotificationManagerServiceTest.java
294ba065c1180ec4721841452b40b49730c4c84e 10-Oct-2017 Julia Reynolds <juliacr@google.com> Send a11y updates for updated notifications

Unless the updated notification is quiet.

Test: runtest systemui-notification
Change-Id: I0d0b27cedf085c00648d00ed63f252f94d8e5e35
Fixes: 67626983
(cherry picked from commit 9418756a11162efd78cb0a6fc87873ee15252bff)
erver/notification/BuzzBeepBlinkTest.java
b0e33eda2a7d5bbcc6488ddf8c6176ab7374fb66 03-Oct-2017 Bernardo Rufino <brufino@google.com> Canonicalize notification channel sounds for backup

Canonicalize for backup and canonicalize and uncanonicalize for restore
(see comment).

Test: Set custom notification sound, make backup, remove notification
sound from device (from Ringtones and make sure to update media content
provider), restore => Observe default instead of random number. Do the
same without removing the sound and observe restores successfully.
Test: runtest systemui-notification
Bug: 66444697

(cherry picked from commit c27bb6ad34fd59161f6460b692ba72c7ede789b6)

Change-Id: I32c186d0d7479b01f6cc67cce9bc5cb66264a064
(cherry picked from commit 2d7a4a3f674d62adfb2825b738f2e87ec246194d)
erver/notification/RankingHelperTest.java
169f36712521e3f92513762df821aa9b84cc52a1 27-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't convert all sounds to vibrations in vibrate mode" into oc-mr1-dev
8617e4ec9efa2c34bbebda750f29e43d0fdf4044 18-Sep-2017 Julia Reynolds <juliacr@google.com> Bump the importance of foreground service notis

Unless the user has chosen an importance.

Change-Id: Ibe82c91c6a98a75fc623784300f3f906879e8a80
Fixes: 65640487
Test: runtest systemui-notification
erver/notification/NotificationManagerServiceTest.java
erver/notification/RankingHelperTest.java
85896573a8916331e8b204fc98a6ed13860175b1 20-Sep-2017 Julia Reynolds <juliacr@google.com> Don't convert all sounds to vibrations in vibrate mode

Only those that are on the notification/ringer stream.

Change-Id: Id99c613a6de42ac8ed1d674b4c6e05067d9cf52c
Fixes: 65815310
Test: runtest systemui-notification
erver/notification/BuzzBeepBlinkTest.java
4552300ef2ee59c8f03f2bcdc087d48cb7a58bd3 12-Sep-2017 Julia Reynolds <juliacr@google.com> Trim invalid users

Change-Id: Ie7eab5c38ed7c6a58dcf2fa8c568fb576306852a
Fixes: 64725440
Test: runtest systemui-notification
erver/notification/ManagedServicesTest.java
5aa13a4dfb007d4acfb9d7838c0493718f487796 24-Aug-2017 Julia Reynolds <juliacr@google.com> Don't autogrant permissions on managed profiles

These services run on the parent profile and act on
both. Also cean up approval lists on user removal.

Test: manual, runtest systemui-notification
Bug: 64073967
Change-Id: If3d2b36d57e98358bcaf80e7a8885ee7d25c2a4b
erver/notification/ManagedServicesTest.java
816797abb9646b0916781aa1742212a24a6d31a0 11-Aug-2017 Julia Reynolds <juliacr@google.com> Translate default channel on locale change

Change-Id: I4c45f7879d0c68e866b5d55a4fbb2402f62159a2
Fixes: 64025105
Test: runtest systemui-notification
erver/notification/RankingHelperTest.java
fa206a4d12041947462336cd48ffd7b4847605fb 14-Aug-2017 Julia Reynolds <juliacr@google.com> Optionally append managed service approvals

If the backup comes from a pre O device, don't wipe
preexisting managed service grants (which were introduced
in O).

Test: runtest systemui-notification
Change-Id: Ie569972dc0d076718a3a9c59e1ebd942c5bfa987
Fixes: 64232609
erver/notification/ManagedServicesTest.java
2593d707f78e72afa3fdbe98557497af0545ded3 11-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Pleasant sound implemented for in-call notif." into oc-mr1-dev
5d463b6c885965fa47daf6e7897e818ec44edaec 26-Jul-2017 Beverly <beverlyt@google.com> Pleasant sound implemented for in-call notif.

Replacing tone generator with an audio file for in-call notifications from text messages.

Fixes: 38194285
Test: runtest -x frameworks/base/services/tests/notification/src/com/android/server/notification/BuzzBeepBlinkTest.java
Change-Id: I9ec28ff54ae259ae906b3db08ece7059707c7edb
erver/notification/BuzzBeepBlinkTest.java
a13b3e257418b722282b1c4b5aaef316503bc127 10-Aug-2017 Julia Reynolds <juliacr@google.com> Group new free notis if autogroup summary exists

In the case where an app posted enough notifications to
get an autogrpup summary, but then canceled most of them,
add all new group-less notifications to the autogroup summary
even if the total number of notifications currently posted
by the app is < the autogroup trigger number

Test: runtest systemui-notification, cts
Change-Id: I6f7a8a0140abcff2b0f78eacfbf23cfab12897fa
Fixes: 64158706
erver/notification/GroupHelperTest.java
erver/notification/NotificationManagerServiceTest.java
d4f964922c093b840228144cd81c792519135f35 02-Aug-2017 Beverly <beverlyt@google.com> Localization of zen mode default rules.

Test: runtest -x frameworks/base/services/tests/notification/src/com/android/server/notification/NotificationManagerServiceTest.java
Test: runtest -x frameworks/base/services/tests/notification/src/com/android/server/notification/ZenModeHelperTest.java
Change-Id: If7c38e5da56dd171e296182ef2c36e7286666ec5
Fixes: 38128497
erver/notification/NotificationManagerServiceTest.java
76a3aa06dce6033a4c2055b43614d972328399b3 26-Jul-2017 Geoffrey Pitsch <gpitsch@google.com> Revert "Merge "Remove ability to downgrade importance of existing channel." into oc-dr1-dev"

This reverts commit d691f1a200b4c1362219fceece7400dd38ef117e, reversing
changes made to d6a2ed194c474d1894a53636353760120c8a11d7.

Test: runtest systemui-notification
Fixes: 63920384
erver/notification/NotificationManagerServiceTest.java
d691f1a200b4c1362219fceece7400dd38ef117e 26-Jul-2017 Geoffrey Pitsch <gpitsch@google.com> Merge "Remove ability to downgrade importance of existing channel." into oc-dr1-dev
am: 0d5c1490ce

Change-Id: I130816097bc68d1978b035cb2cfb0a3c678f9291
1556495e28fbd335ffcf1c74101e42f3f97716de 24-Jul-2017 Geoffrey Pitsch <gpitsch@google.com> Remove ability to downgrade importance of existing channel.

Test: runtest systemui-notification
Bug: 63920384
Change-Id: Ic9f5c50c3d2a36ccd4ba9686dad1eb415b559215
erver/notification/NotificationManagerServiceTest.java
03eb6c99340f23d4a6d1b7fafb86eb01bc2587d4 21-Jul-2017 Julia Reynolds <juliacr@google.com> Merge "Fix notification ordering for groups" into oc-mr1-dev
d1bf5f0108acc4bffdc3a611fabcc23a66f3fb84 11-Jul-2017 Julia Reynolds <juliacr@google.com> Fix xml loading for managed services

Noticed while adding a shell cmd to toggle notification assistants,
which is also included

Bug: 62263757
Test: runtest systemui-notification
Change-Id: I9bc0ee857abb8b9f60ab18ad740ca0a3b7d754ff
(cherry picked from commit 88facd4d9ac18630e4cc44db22b88b4ba26e775a)
erver/notification/ManagedServicesTest.java
erver/notification/NotificationManagerServiceTest.java
2d3356375a712878c6645ca9eb8b796080ca178b 21-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allow apps to downgrade importance in createNotificationChannel" into oc-mr1-dev
5171071f0503fdfc34854fdf59688e63d736eb94 19-Jul-2017 Julia Reynolds <juliacr@google.com> Fix notification ordering for groups

- Only request a re-sort on behalf of notifications whose autogroup is
actually changing
- Don't allow notifications that were posted more than HANG_TIME_MS
ago be reconsidered to be intrusive
- Sort notification groups at the position of the group member
with the best authoritative rank, regardless of importance

Bug: 62895856
Bug: 63291402
Test: set AUTOGROUP_AT_COUNT to 2 in GroupHelper, and
run the AttentionManagement cts verifier test;
runtest systemui-notification

Change-Id: Ic433ca827cd01cf166b3cc11d43be639fd7a13b7
(cherry picked from commit bbc469cecac9c50c342902d724bfa68acd140770)
erver/notification/NotificationIntrusivenessExtractorTest.java
erver/notification/NotificationManagerServiceTest.java
3f0eb37e668eaeab747ca6e2ac4d02321767a107 20-Jul-2017 Julia Reynolds <juliacr@google.com> Merge "Fix sound rate limiting issue" into oc-dr1-dev
am: 61913f178e

Change-Id: I0d3f100a55f3c8a9e2c0d2961e90065d453708ae
61913f178ed35e5f9f8b91f4c1e9f986ab39c83e 20-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix sound rate limiting issue" into oc-dr1-dev
07532c3f79334390fd5d9b5a0a183a25e6ac08bd 18-Jul-2017 Geoffrey Pitsch <gpitsch@google.com> Allow apps to downgrade importance in createNotificationChannel

Only takes effect if the user has not changed any fields.
Some tangential cleanup of the test file:
- Rename member variable "uid" to "mUid"
- Use correct PKG instead of "test_pkg"
- Some character limit fixes

Test: runtest systemui-notification
Fixes: 63755460
Change-Id: I3c2df0c03ec333f320ac7a0fe90792f1b0ef02ce
erver/notification/NotificationManagerServiceTest.java
65b85cf3a2f83729d7657e81bb001b0656a3c532 20-Jul-2017 Julia Reynolds <juliacr@google.com> Fix sound rate limiting issue

Don't count notifications that were muted by some other criteria
(like dnd or group alerting) against an app

Test: runtest systemui-notification
Change-Id: I9c94d342400306c2618c458e2ad530cd9373b3b8
Fixes: 63819441
erver/notification/BuzzBeepBlinkTest.java
68c9741cb2bb2e72ed238370db4d275f3204fc03 18-Jul-2017 Geoffrey Pitsch <gpitsch@google.com> Allow apps to downgrade importance in createNotificationChannel

Only takes effect if the user has not changed any fields.
Some tangential cleanup of the test file:
- Rename member variable "uid" to "mUid"
- Use correct PKG instead of "test_pkg"
- Some character limit fixes

Test: runtest systemui-notification
Fixes: 63755460
Change-Id: I3c2df0c03ec333f320ac7a0fe90792f1b0ef02ce
erver/notification/NotificationManagerServiceTest.java
45ea6c85b639e6f423408f1e7a5604e05dd223f5 17-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Send less ranking reconsiderations and updates"
eb3dca71b5df7fdf6299a3e65eb5d6fe8cb7bcbc 11-Jul-2017 Julia Reynolds <juliacr@google.com> Send less ranking reconsiderations and updates

- NotificationIntrusivenessExtractor does not need to reconsider
ranking for non intrusive notifications
- All adjustments (by group helper and the assistant) have been moved to
extractors so we can selectively send ranking updates instead of always
sending them.

Fixes: 62827235
Test: runtest systemui-notification
Change-Id: I2ea746c3883049abac0752788a3f4c2fa50c8064
erver/notification/BuzzBeepBlinkTest.java
erver/notification/NotificationAdjustmentExtractorTest.java
erver/notification/NotificationChannelExtractorTest.java
erver/notification/NotificationIntrusivenessExtractorTest.java
erver/notification/NotificationManagerServiceTest.java
erver/notification/RankingHelperTest.java
1cd8e1e3bf116c48a9db5c9e15de09919c3ee0e6 14-Jul-2017 Julia Reynolds <juliacr@google.com> Merge "Fix system crash" into oc-dr1-dev am: 5a0958ed0b
am: e58e833819

Change-Id: I601238f6ced41633f5674d68a741fbdaeb3bb4a0
8166d8b2c357aa7a610f0e7ba5cb88bf2c7f2c1d 13-Jul-2017 Julia Reynolds <juliacr@google.com> Merge "Fix nomanservice notificationrecord leak" into oc-dr1-dev am: bcc35f5ae6
am: 886d8b1c00

Change-Id: I232b0239d0af7d211cb91496a1b35646864a4032
0f17000fb3b417fbc6129b47385c5f3c3dfd2de5 10-Jul-2017 Julia Reynolds <juliacr@google.com> Fix system crash

Change-Id: I47d6d79682bfe907544f9282c26e350576618ce2
Fixes: 63474899
Test: runtest systemui-notification
erver/notification/NotificationChannelTest.java
080361ee313c4eae07ca1d17edafb371672fc76e 13-Jul-2017 Julia Reynolds <juliacr@google.com> Fix nomanservice notificationrecord leak

Test: runtest systemui-notification
Change-Id: Ic5761b917edd000bf73b3291b0ca95bbb0b9bedb
Fixes: 63585648
erver/notification/NotificationManagerServiceTest.java
e9b68966079bec8858bbe4da5644c2e1788413f2 10-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Rate limit notification sounds/vibrations"
ed7b5c64e0c2eabd044f363c75ba4ae139fc8a70 10-Jul-2017 Julia Reynolds <juliacr@google.com> Merge "Limit the number of notis an app can enqueue" into oc-dr1-dev am: c65071d625
am: 8d4cd22ffb

Change-Id: I60ddda50a6d5a6a3028361435a340d6191f6c729
3ff26d2739261a320c308d30cf4719979f49b314 19-Jun-2017 Julia Reynolds <juliacr@google.com> Rate limit notification sounds/vibrations

1 alert per second.

Bug: 36662487
Test: runtest systemui-notification
Change-Id: I42c2342c7ccb86f5912d729c7c2a0074f3000ad2
erver/notification/AlertRateLimiterTest.java
erver/notification/NotificationManagerServiceTest.java
6ad0aecf99d4dc823935987dc2daff07ef465ac1 05-Jul-2017 Julia Reynolds <juliacr@google.com> Limit the number of notis an app can enqueue

In addition to the number they can post. Also decrease
the number of posts per second to 5, but allow finished
progress notifications through.

Fixes: 63173849
Fixes: 63167456
Test: runtests systemui-notification & simultaneously
downloading 5 files.
Change-Id: I0c8ea35b3d9d38b000ea5fe383515e1d5a26bac7
erver/notification/NotificationManagerServiceTest.java
5f8e0b881e9a878ad0cfb4b216fbdf892badd219 19-Jun-2017 Julia Reynolds <juliacr@google.com> Rate limit notification sounds/vibrations

1 alert per second.

Bug: 36662487
Test: runtest systemui-notification
Change-Id: I2046ae17b9e89ac0a83e182b91422fd242bc7557
erver/notification/AlertRateLimiterTest.java
erver/notification/BuzzBeepBlinkTest.java
erver/notification/NotificationManagerServiceTest.java
4db5955557154e40838ad2e6bdf140069b0776f8 30-Jun-2017 Julia Reynolds <juliacr@google.com> Allow setup apps to colorize notifications.

Fixes: 63147379
Test: runtest systemui-notification, core tests
Change-Id: I2077a9fd563826d978d0dc01be89dd0bbc09eebf
erver/notification/NotificationManagerServiceTest.java
40239d9eccc0c91e4d477f06366b4bbae71b0bb5 07-Jul-2017 Beverly <beverlyt@google.com> Clear all won't clear group notifs with no clear flag

Change-Id: I9df0d3a147c787fb7bad99a5f0bce4b67bbd2813
Fixes: 63367265
Test: runtest systemui-notification
erver/notification/NotificationManagerServiceTest.java
d71c5a94264ba764a139de41c753b9d6e6521d27 30-Jun-2017 Julia Reynolds <juliacr@google.com> Allow setup apps to colorize notifications.

Fixes: 63147379
Test: runtest systemui-notification, core tests
Change-Id: I2077a9fd563826d978d0dc01be89dd0bbc09eebf
erver/notification/NotificationManagerServiceTest.java
8a3b45976542d8a52f8135875186f7bc9e8534cb 26-Jun-2017 Julia Reynolds <juliacr@google.com> Strip extenders on android go devices.

Test: runtest notification-systemui
Bug: 35219985
Change-Id: I5a2d25c4ea33510c397b351d3604bd3f23f81521
erver/notification/NotificationTest.java
8aebf3585824f5acb3eaa04926474cba11f78c96 26-Jun-2017 Julia Reynolds <juliacr@google.com> Only try to autogroup if group info changes

Test: runtest systemui-notification
Change-Id: I7ddf622530ee4c452353bea6751b613354917a1b
Fixes: 62788068
erver/notification/NotificationManagerServiceTest.java
68263d1dc790e572a37a5906d8b05e7c2388a93e 21-Jun-2017 Julia Reynolds <juliacr@google.com> Disable non-system managed services on low ram devices

Bug: 35219985
Test: runtest systemui-notification
Change-Id: If25a387a77f2755326f9c59eee41bb43f7019e7b
erver/notification/NotificationManagerServiceTest.java
76c096d89a1fa28cac5d10300ba60df583aa3321 19-Jun-2017 Julia Reynolds <juliacr@google.com> Rate limit notification sounds/vibrations

1 alert per second.

Bug: 36662487
Test: runtest systemui-notification
Change-Id: I2046ae17b9e89ac0a83e182b91422fd242bc7557
erver/notification/AlertRateLimiterTest.java
erver/notification/BuzzBeepBlinkTest.java
erver/notification/NotificationManagerServiceTest.java
b852e56668d02c00853bc0a3651001044c11be71 06-Jun-2017 Julia Reynolds <juliacr@google.com> Migrate managed services from setting to policy xml

Change-Id: Ie20f91dbdd0ba6b57b5909cbf0152a32754fe02d
Fixes: 62263757
Test: runtest systemui-notification, cts AudioManagerTest,
cts-verifier DND tests, verify bug reports after toggling
access for various types of managed services, verified
default approved services aren't renabled on boot; verified that
they are reenabled after a device reset, verified that
settings are migrated after a restore from OC backup.
erver/notification/ManagedServicesTest.java
erver/notification/NotificationManagerServiceTest.java
erver/notification/NotificationTestCase.java
38ce905a3fadcba1a184fda280ecb9bf30680960 17-Jun-2017 Tony Mantler <nicoya@google.com> Merge "Disable notification sounds on TV" into oc-dev am: b5979092b8
am: d537d3778b

Change-Id: Iebc6356304bb7a4cd9ff9a3af28bb24343938cd7
5ddad3b748137aefc63a7f8e7702f5b4ef929db2 17-Jun-2017 Tony Mantler <nicoya@google.com> Merge "Disable notification sounds on TV" into oc-dev
am: b5979092b8

Change-Id: I37ec878ac1629e0f145481863b82ad59572c7e73
ab55f0f2b04c69d8a05f5685e2ed399fab33ab35 16-Jun-2017 Tony Mantler <nicoya@google.com> Disable notification sounds on TV

Bug: 38495875
Test: BuzzBeepBlinkTest
Change-Id: Iffebe2063de3d73c1538a3bbbe9edd2233005ba3
erver/notification/BuzzBeepBlinkTest.java
5caa4197308a0ebb804fd28202d7767d2dc632e3 16-Jun-2017 Julia Reynolds <juliacr@google.com> Merge "Fix two IndexOutOfBoundsException crashes." into oc-dev
am: ded5608f18

Change-Id: I925c6875249e15d2a497b619aba3d05d3644580e
0839c02bcb48d41442e772899c56d6e6e2c04031 15-Jun-2017 Julia Reynolds <juliacr@google.com> Fix two IndexOutOfBoundsException crashes.

Do not remove (sometimes multiple) items from lists
you are iterating over.

Test: runtest systemui-notification
Change-Id: I130cc63ae2f5721e7b434006f4306e0b1eaef77d
Fixes: 62622503
erver/notification/NotificationManagerServiceTest.java
de9c540fe53a7d71fb3309005416a028a4120b41 05-Jun-2017 Julia Reynolds <juliacr@google.com> Merge "Don't allow blocked apps to post notifications" into oc-dev am: 2f77da6e10
am: c9df14bad9

Change-Id: I5ae26a30d35ee4015a27b8cbf127a43a1f7495cd
2f77da6e10d4e5c6fedd16814f98944d82b888c3 05-Jun-2017 Julia Reynolds <juliacr@google.com> Merge "Don't allow blocked apps to post notifications" into oc-dev
5a406e996ca3750f961531d414450c39b6b41f2d 03-Jun-2017 Chris Wren <cwren@google.com> Merge "add channel and group tags to the notificaiton logs" into oc-dev am: 76e76a5c26
am: 6b88afda65

Change-Id: I840c89e34b00cf505e50897bc7ba433f37a67dff
b39217972e665c6c508639c7765134bac8391076 01-Jun-2017 Chris Wren <cwren@google.com> add channel and group tags to the notificaiton logs

Change-Id: Icf029e42fca46262c9d9f8ff63f26de098f888bf
Fixes: 37714086
Test: runtest systemui-notification
erver/notification/NotificationRecordTest.java
4da7970dab22d7ba4d0fc15ddda513b9dccb5066 01-Jun-2017 Julia Reynolds <juliacr@google.com> Don't allow blocked apps to post notifications

Change-Id: I82ed7d954746e65c086ba43c3f4733f9edeae081
Fixes: 62217679
Test: runtest sysmui-notification
erver/notification/NotificationManagerServiceTest.java
4447098b8cbf363b7b7a13b42969dbd2485d559e 02-Jun-2017 Geoffrey Pitsch <gpitsch@google.com> Merge "Mock out usageStats in NotificationManagerServiceTests" into oc-dev am: fd0b15c196
am: cd020cc63e

Change-Id: Ifb212ff7f554a7c851db2df8c98ff3fbc45209b0
fd0b15c196fe2718e2cc8d9d076ecd99333519ce 02-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Mock out usageStats in NotificationManagerServiceTests" into oc-dev
380a6c25bbc9f309c381f42ec9a3af282adc1acd 01-Jun-2017 Jean-Michel Trivi <jmtrivi@google.com> Merge "Delay notification vibration to synchronize with notif sound" into oc-dev am: 29db4b3556
am: 0563a82fc0

Change-Id: I7a46cc32e030f74ae734c9e6e75ee72593e1947e
d5bcf218cb1e033574e8a93434555e83b239e64b 01-Jun-2017 Geoffrey Pitsch <gpitsch@google.com> Mock out usageStats in NotificationManagerServiceTests

Shouldn't be doing this db work in tests

Change-Id: Idadadd83bfe984bd0e1c991534f1fba93ca34b53
Fixes: 62251669
Test: runtest systemui-notification
erver/notification/NotificationManagerServiceTest.java
ea0eb5f5813d63283d9b069510418e495d4cc137 26-May-2017 Jean-Michel Trivi <jmtrivi@google.com> Delay notification vibration to synchronize with notif sound

Delay the vibration associated with a notification by the length
of the ramp time preceding a notification sound. Do this only
for notifications that play a sound.
Tests: verify that calls to Vibrator.vibrate() method are within the
max delay that could be applied to a notification sound/vibration.

Test: play notification with vibration, verify vibration syncs with sound
Test: runtest systemui-notification
Bug: 35152866
Change-Id: I571eb5620d654265d19f45aca2073e8ccc4799df
erver/notification/BuzzBeepBlinkTest.java
8a94dae6edac105dd5450e000f5da24ea4815701 30-May-2017 Julia Reynolds <juliacr@google.com> Merge "Properly read vibration setting on boot." into oc-dev am: 2c324042df
am: f9d4e9428b

Change-Id: Ia55bfa05ebcf97262d9725028d67d3de5a4f33e5
745c15477b22f88af303065e18025af386582736 26-May-2017 Julia Reynolds <juliacr@google.com> Properly read vibration setting on boot.

Test: runtest systemui-notification
Change-Id: I400bc3df441524abe4973d4d6bccc7ef30a2e1c7
Fixes: 37865035
erver/notification/RankingHelperTest.java
17a136f69c8ad8cbd6a8e2364150cabe68df8651 26-May-2017 Julia Reynolds <juliacr@google.com> Merge "Allow some system notifications to be blocked." into oc-dev am: 3a2ac3e11b
am: a98bdea2c5

Change-Id: Iec706994f0c7af34ba38b01fffaccdf6ee1bbe84
3a2ac3e11b336deb272e733dbdfc08317ce78b31 26-May-2017 Julia Reynolds <juliacr@google.com> Merge "Allow some system notifications to be blocked." into oc-dev
bc17c514858cfea6440dcb1d1303785aecbe3e3c 26-May-2017 Julia Reynolds <juliacr@google.com> Merge "Allow the creation of IMPORTANCE_NONE channels" into oc-dev am: e6bf4f808d
am: e90447d155

Change-Id: Icfd11d69ae943e6a96c229fbb3d7ebcf47dd2f92
e6bf4f808d9eebebfb9faffc78abb81a4f4038d9 26-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allow the creation of IMPORTANCE_NONE channels" into oc-dev
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
erver/notification/NotificationChannelTest.java
7d005eaadb191f5a0e2843e8faf1ef0eb1a12dab 25-May-2017 Julia Reynolds <juliacr@google.com> Merge "Fix backup and restore of package blocks" into oc-dev am: 2686322e71
am: a878ee86ad

Change-Id: I902c07dd5ef4fff5bdab273b2ed81d15f4680d9a
5fe2eae6b9a2da7791b4686958425b6f0d89dc49 22-May-2017 Julia Reynolds <juliacr@google.com> Fix backup and restore of package blocks

-Restore block status for apps that already exist
E.g. apps on the system image
- Stop depending on appops, it's duplicative and
not backuped/restored

Fixes: 38340377
Test: runtest systemui-notification, toast and notification
cts tests, backup android, clear data on packages, restore android,
verify that blocked apps stay blocked.
Change-Id: I29a33d7db2701bd64a7b30411dcf77c0a2f321d1
erver/notification/RankingHelperTest.java
3e50bf6f97eb3b6ce45c5f5746687f76253ac38d 24-May-2017 Julia Reynolds <juliacr@google.com> Allow the creation of IMPORTANCE_NONE channels

- Users will still be notified of foreground services
by the system even if the app posts their fg service
notification to a blocked channel so this restriction isn't needed
- This allows apps to cleanly port over their pre-channels notification
settings

Fixes: 62028083
Test: runtest systemui-notification

(cherry picked from commit 3f25f4d6fe24f3782d6e156f9969d98ab3c8b4bf)

Change-Id: I1cd8cfaf31f00088e267bd3fb1bd7912f4397c69
erver/notification/RankingHelperTest.java
a395fd13220eb6efe1f8dd3e63a3f3b52967cc76 23-May-2017 Julia Reynolds <juliacr@google.com> Merge "Re-add default channel on app targetsdk downgrade." into oc-dev am: 4c11bde01d
am: c17f1d9c9b

Change-Id: Ie26680bf227427c05167af7a32313f199ed7ae7d
f26eb916987f7c0e5d32af2fc10ef09f62e83f16 22-May-2017 Julia Reynolds <juliacr@google.com> Re-add default channel on app targetsdk downgrade.

Test: runtest systemui-notification, and manual: adb install the
apk pulled off dogfood device, verify that sending an email
results in a toast pre change and no toast + notification
post change.
Change-Id: Ia3db55959906f38a5dc34cb38a33072c1f2dd64f
Fixes: 38437227
erver/notification/RankingHelperTest.java
8185d389a3d30ded099913ec3943e8b915f75c1d 20-May-2017 Geoffrey Pitsch <gpitsch@google.com> Add SmallTest for presubmit

Test: N/A
Change-Id: I93ca5c7f794b2e5bbc8632cf3688d3eff541c669
erver/notification/NotificationManagerServiceTest.java
91f674eeda97e15d156bb87c2399fa334844c00b 18-May-2017 Jeff Sharkey <jsharkey@google.com> Merge "Unbreak APK 26 apps running on "O" preview/beta builds." into oc-dev
e103b7808b29d3b7c6fdef092d607d511457ecfd 18-May-2017 Dan Sandler <dsandler@android.com> Unbreak APK 26 apps running on "O" preview/beta builds.

Bug: 38391358
Test: runtest systemui-notification
Change-Id: Ib78dd3e2a3dcb16faae33a0d5a07475187fb3463
erver/notification/NotificationRecordTest.java
erver/notification/RankingHelperTest.java
13f157feeddbac0d0303759214c6db3c5c477007 12-May-2017 Chris Wren <cwren@google.com> catch USER_ALL in badging check

Bug: 38264652
Test: runtest systemui-notification
Change-Id: Id482ed4984eef83ad0e9876acda5addb65aca5f9
erver/notification/RankingHelperTest.java
34bc4af8109b1221305036a528324b8d754b501f 12-May-2017 Julia Reynolds <juliacr@google.com> Merge "Show misc channel with pre-upgrade fields" into oc-dev
89aa2261903fd09b08a2210a7a1b35d329f8330a 06-May-2017 Chris Wren <cwren@google.com> add a global control for badging

Content observer callbacks don't specify the user,
so scan all the users we know about. User switches
will also trigger an update which will explicitly
check the setting for the (now) current user.

Migrate tests to TestableContext to allow the test
to safely override secure settings.

Bug: 36021111
Test: runtest systemui-notification
Change-Id: I588068382912955da114cc351df7a1e7b4f0733f
erver/notification/BadgeExtractorTest.java
erver/notification/BuzzBeepBlinkTest.java
erver/notification/GlobalSortKeyComparatorTest.java
erver/notification/GroupHelperTest.java
erver/notification/ImportanceExtractorTest.java
erver/notification/NotificationComparatorTest.java
erver/notification/NotificationListenerServiceTest.java
erver/notification/NotificationManagerServiceTest.java
erver/notification/NotificationRecordTest.java
erver/notification/NotificationTestCase.java
erver/notification/RankingHelperTest.java
erver/notification/RateEstimatorTest.java
erver/notification/SnoozeHelperTest.java
erver/notification/ValidateNotificationPeopleTest.java
17717f5a6d46632cb75df78fd2a7038a4ac764ea 09-May-2017 Julia Reynolds <juliacr@google.com> Show misc channel with pre-upgrade fields

- for apps that don't target O but use channges

- Rename misc channel if it already exists
- Add method so settings can tell if it needs to show legacy config

Bug: 38120923
Test: runtest systemui-notification
Change-Id: I5c7c077321f1792851b003b9d9e42505dddd50f0
erver/notification/RankingHelperTest.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
erver/notification/RankingHelperTest.java
37079af46dcf050ed65d7fffe918054d05cb62b7 09-May-2017 Selim Cinek <cinek@google.com> Merge "Fixed the ordering of colorized media notifications" into oc-dev
c6c639cb0641248f245538d4164bea6d4e0c2fc3 06-May-2017 Selim Cinek <cinek@google.com> Fixed the ordering of colorized media notifications

Previously colorized media notifications were downranked if they
were not foreground services. This could lead to bugs where
colorized notifications were ranked below non-colorized ones.

Test: runtest systemui-notification
Bug: 38049452
Change-Id: I8652de55acff0b03fa337478ad7ad463ecc4e82d
erver/notification/NotificationComparatorTest.java
e2361d978be6b0d5be134885285bff122395f8f8 05-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Treat apps that use channels as O apps"" into oc-dev
a22f644c79213138c232f3067b5f780a9c43b04c 05-May-2017 Geoffrey Pitsch <gpitsch@google.com> Revert "Treat apps that use channels as O apps"

This reverts commit 07a08b2ae92cc26b5e7ec00064e6ecea79d3d9c3.
Bug: 38016678
Change-Id: I0bf2f6da9e145bfe1f79449cac38ad34f5956969
erver/notification/BadgeExtractorTest.java
erver/notification/BuzzBeepBlinkTest.java
erver/notification/GlobalSortKeyComparatorTest.java
erver/notification/ImportanceExtractorTest.java
erver/notification/NotificationComparatorTest.java
erver/notification/NotificationManagerServiceTest.java
erver/notification/NotificationRecordTest.java
erver/notification/RankingHelperTest.java
erver/notification/SnoozeHelperTest.java
2e9bf5fa7a2a27a16f0c2ef09030a0d5a7a13a8e 03-May-2017 Julia Reynolds <juliacr@google.com> Remove notification settings for deleted users

Test: runtest systemui-notification, manual
Change-Id: I221554479cf6bedb36b17d5e9bbc05307af9b89b
Fixes: 37941356
erver/notification/RankingHelperTest.java
07a08b2ae92cc26b5e7ec00064e6ecea79d3d9c3 01-May-2017 Julia Reynolds <juliacr@google.com> Treat apps that use channels as O apps

... even if they don't target O

- Delete misc channel
- Read settings from channel instead of notification

Test: runtest systemui-notification
Change-Id: I00814959eddd10998806dd67cc30421091ae9aab
Fixes: 37540996
Fixes: 35378789
erver/notification/BadgeExtractorTest.java
erver/notification/BuzzBeepBlinkTest.java
erver/notification/GlobalSortKeyComparatorTest.java
erver/notification/ImportanceExtractorTest.java
erver/notification/NotificationComparatorTest.java
erver/notification/NotificationManagerServiceTest.java
erver/notification/NotificationRecordTest.java
erver/notification/RankingHelperTest.java
erver/notification/SnoozeHelperTest.java
b9ee2d4677aa48045a770a899661f96053e66926 03-May-2017 Geoffrey Pitsch <gpitsch@google.com> Merge "Delete default channel for all apps targeting O." into oc-dev
5644ccd1855e0ee14f1f5a5f1ac2490fa414af71 17-Apr-2017 Geoffrey Pitsch <gpitsch@google.com> Delete default channel for all apps targeting O.

Change toast to be for debuggable builds only.

Bug: 35378789
Test: runtest systemui-notification
Change-Id: I36247b003ead00bf1f9f3bed9c1a38a53db18c71
erver/notification/RankingHelperTest.java
67ced6c08f0d9bb7a6c5b90c83d3b4753dcc508d 02-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix cancel when the same notification is enqueued twice." into oc-dev
27684159c6529937a3e2764a672f550ae9dbf5d7 02-May-2017 Geoffrey Pitsch <gpitsch@google.com> Fix cancel when the same notification is enqueued twice.

Change-Id: I6563c70ac441ff1c1951d5220c2e6a7c5f210d49
Fixes: 37706685
Test: runtest systemui-notification
erver/notification/NotificationManagerServiceTest.java
a8b766fb73641ab67194a54391305bdc9cfc1cdd 07-Mar-2017 Julia Reynolds <juliacr@google.com> Do not unsnooze canceled notifications.

Test: runtest systemui-notification
Change-Id: I3edef5822aa74359bf3a34f54f59d4021696365d
erver/notification/SnoozeHelperTest.java
a78cdffd802ee7a30747ab369e6edd2358a86f20 26-Apr-2017 Julia Reynolds <juliacr@google.com> Change snoozing behavior for notifications in groups

- Snoozing a summary notification will snooze its current
children in addition to itself
- Posting a non-snoozed notification to a summary will
unsnooze the summary
- snoozing the only child of a group will also snooze the group
summary

Test: runtest systemui-notification
Change-Id: I5edba1461a59131c6c202f02e6f89404d22bb404
Fixes: 35934956
erver/notification/NotificationManagerServiceTest.java
erver/notification/SnoozeHelperTest.java
f84467e19f16a63f47f13bfc9263c70b46816c24 27-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Api updates" into oc-dev
567947d75d9a80c9aa4933679b818a061139e3e8 26-Apr-2017 Julia Reynolds <juliacr@google.com> Merge "Update app level fields when misc channel is updated" into oc-dev
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
erver/notification/NotificationManagerServiceTest.java
erver/notification/NotificationRecordTest.java
21fb35048f10280f64c4587ef85e084e999a4f5a 25-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Revert "Integrate new looper apis into testables""" into oc-dev
fa04e143d833ab28b50752ec7c91c2458b7ad5a4 23-Apr-2017 Julia Reynolds <juliacr@google.com> Update app level fields when misc channel is updated

So user settings aren't lost when the app migrates
to using channels

Test: runtest systemui-notification
Change-Id: I5774997ea33a892fa45f614bb3dd8de7e681f58c
Fixes: 37603697
erver/notification/RankingHelperTest.java
745d0a8b77ad3c7c8a220b6e05dbceff54154d57 17-Apr-2017 Jason Monk <jmonk@google.com> Revert "Revert "Integrate new looper apis into testables""

This reverts commit fd8f615953631863c94d7080441f8dd4a0a74f56.
+ some minor adjustments.

Test: runtest systemui
Change-Id: Ie4349fcfb2aadbbd8826506faa8a6fb1ecd5b589
erver/notification/NotificationManagerServiceTest.java
a79c37170e818f57e1bac843998fd0ae30eba71a 21-Apr-2017 Julia Reynolds <juliacr@google.com> Allow some notifications in a group to be muted

Test: cts, runtest systemui-notification
Change-Id: I98b971c496c52f69e039a3a3101f71ac567b538a
erver/notification/BuzzBeepBlinkTest.java
10e72759651182c5b3462f0c99afa8f2a2345477 24-Apr-2017 Julia Reynolds <juliacr@google.com> Merge "Don't allow devs to create blocked channels" into oc-dev
d8c0ac42dee86997a7a06d15f9e7ccbc0da862e0 23-Apr-2017 Julia Reynolds <juliacr@google.com> Don't allow devs to create blocked channels

Test: runtest systemui-notification
Change-Id: I11942e4268acc70ffcbcda08eed4e13e64f4b12f
Fixes: 37559814
erver/notification/RankingHelperTest.java
ca80d1632e205ac93e234203947efad4f8c7a164 23-Apr-2017 Julia Reynolds <juliacr@google.com> Don't consider uri empty a valid sound

Test: runtest systemui-notification
Change-Id: Ia838237e04eb11bd79e3ad5990bbb52c7ab853ee
Fixes: 36848349
erver/notification/BuzzBeepBlinkTest.java
fea6f7b799225f6f0211d7114c779183adbf7b6b 19-Apr-2017 Julia Reynolds <juliacr@google.com> Remove long standing debug code

Because it stops real errors from bubbling up to the calling app.

Test: make, post notifications
Change-Id: I0e59c61b0a60302a5fd023b7ad909e84b97e5df5
Fixes: 37494547
erver/notification/NotificationManagerServiceTest.java
feb7341b2f49059812c53bf53ae23698f719d1e1 18-Apr-2017 Julia Reynolds <juliacr@google.com> Lock all the things

Fix some instances of .*Locked() methods being called without
holding mNotificationLock.

Also, if this happens again, don't crash system server

Change-Id: I0a51310a6f6c8b07266092176e189e7cd08778cc
Fixes: 37444864
Test: runtest systemui-notification
erver/notification/GlobalSortKeyComparatorTest.java
1ed27714509853831e2d4e5b3098b643ccc164c4 17-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add user to channel/group modification callbacks." into oc-dev
b9e712ebde010c4b94536db0fa6edcf2b9580be2 17-Apr-2017 Julia Reynolds <juliacr@google.com> Also use the notification's sound for the misc channel

Even if it's nonexistent.

Test: runtest systemui-notification
Change-Id: I1167fdf10b776460de696657dd49ab6f2be85753
Fixes: 37414045
erver/notification/NotificationRecordTest.java
f27d6b2b821bf818810a0e303d536906b889588d 13-Apr-2017 Julia Reynolds <juliacr@google.com> Add user to channel/group modification callbacks.

Because listeners can see notifications on managed profiles.

Test: runtest systemui-notification and testing with a sample app
(reading and updating channels and getting change
callbacks on a managed profile)
Change-Id: I5d7af3c417e3a3d18f992cc9ad01fbd7959de398
Fixes: 36783632
erver/notification/NotificationManagerServiceTest.java
d178ec489ffadff8b0a1e210f3351c00f71a10ab 13-Apr-2017 Julia Reynolds <juliacr@google.com> Merge "Allow notification channels to be silent." into oc-dev
3d6225b4e27190d92bf1afebca5538865a514491 13-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Companion device mgr doesn't always exist" into oc-dev
727a728836d459e8b3547608034fe85e1fd54b79 13-Apr-2017 Julia Reynolds <juliacr@google.com> Companion device mgr doesn't always exist

E.g. on tvs.

Test: runtest systemui-notification
Change-Id: I1f1fd3cc5d361d3854eef5e5726816b50f5d7eb6
Fixes: 37276184
erver/notification/NotificationManagerServiceTest.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
erver/notification/BuzzBeepBlinkTest.java
erver/notification/RankingHelperTest.java
889280c4c3dde8b9454bf67faf2eab4ff99821b1 12-Apr-2017 Julia Reynolds <juliacr@google.com> Only foreground notis should be sorted higher

Having the ongoing flag is not enough.

Test: runtest systemui-notification
Change-Id: I8a6c15af819f2bb4ad3937ae45d33361663fbe13
erver/notification/NotificationComparatorTest.java
da78147f290cbafe0c36aef28ab15fcefce74e39 12-Apr-2017 Julia Reynolds <juliacr@google.com> Clear calling identity before verifying listeners

Also don't throw when can't verify listener.

And update mocking in tests to clean state between tests.

Bug: 36783632
Fixes: 37263567
Test: runtest-systemui-notification, create a secondary user
Change-Id: I5ec95539c9859b67b8fbc7e6a85334e08e6b5a98
erver/notification/NotificationManagerServiceTest.java
73ed76bc6f92ecee9ae2e3172ec54c081443953b 04-Apr-2017 Julia Reynolds <juliacr@google.com> Allow companion device mgrs channel access

- Callbacks when channels and groups are modified
- Allow them to read and update channels and groups

Test: runtest systemui-notification
Change-Id: Ie4d02bd4583f71f9faf27603bcc59a1ec0eeaf46
erver/notification/NotificationManagerServiceTest.java
415e454f5579befff3168d80c9fdc48c1d1617a2 10-Apr-2017 Geoffrey Pitsch <gpitsch@google.com> Fix race condition in removeForegroundServiceFlag

Also fix flake in our tests.

Test: runtest systemui-notification
Fixes: 36550043
Fixes: 36551790
Change-Id: I910e9233a17ef325bcb173c50c00d9982dc72224
erver/notification/NotificationManagerServiceTest.java
9394a8fc62817a34b85d91c0004c924166952936 07-Apr-2017 Geoffrey Pitsch <gpitsch@google.com> Merge "Don't delete new notification channels not present in backup" into oc-dev
6eccf0016b230971cafd8ae0c2fdf0d2a54e3719 05-Apr-2017 Geoffrey Pitsch <gpitsch@google.com> Don't delete new notification channels not present in backup

Test: runtest systemui-notification
Change-Id: Ib25a680487b20700b9936926c1769a4d8f81b62a
Fixes: 36785228
erver/notification/RankingHelperTest.java
60315337024c9ab7dc81f269c676bb8fc17e0700 04-Apr-2017 Julia Reynolds <juliacr@google.com> Remove unneeded methods

Test: make, make cts, make cts-verifier, runtest systemui-notification
Change-Id: I25b559cfcc30f2d85f468adf840f9124e80f00b0
erver/notification/RankingHelperTest.java
ed767118f4ddc79295352b237a85d7f321f901c8 23-Mar-2017 Geoffrey Pitsch <gpitsch@google.com> Ignore flaky notification test

Bug: 36551790
Test: runtest systemui-notification
Change-Id: I92f72a90afb2323a847149351bf1c6a911027e0b
erver/notification/NotificationManagerServiceTest.java
2c98e18ce5f82ee8a93fcaa30c038fe0ab52f253 22-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Null check! Now with a test"
26a547d5e4748a00ef1440f9d057bba31de49bd8 22-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allow channels to have a user visible description."
8e0eb372c9c5c941609daca554c92a44ee61c063 21-Mar-2017 Julia Reynolds <juliacr@google.com> Null check! Now with a test

Test: runtest systemui-notification
Change-Id: I0b98b3dd6aeaa7e300bba98b7d7f7f5afae16596
Fixes: 36245468
erver/notification/RankingHelperTest.java
48926cc1e6146722a12ce741a3e8ebaf2890135f 21-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Channel updates should trigger ranking updates"
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
erver/notification/RankingHelperTest.java
a917a1149c8f66636bc579a63c418bbe83bd29ff 21-Mar-2017 Julia Reynolds <juliacr@google.com> Channel updates should trigger ranking updates

- Uid, not user id
- unspecified importance really does mean 'don't override'

Change-Id: Ia60aade179f70cd5d5278eed41c707b9ab6590e0
Fixes: 36007628
Fixes: 36355913
Test: manual, runtest systemui-notification
erver/notification/ImportanceExtractorTest.java
erver/notification/NotificationRecordTest.java
d9263306d56bf4c5c9c2e3a62bd44f82dacc0863 21-Mar-2017 Geoffrey Pitsch <gpitsch@google.com> Merge "Delete the Default Channel when an app starts using channels."
2bcca1d6242381725614a86cea3e2487347d3a2d 21-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "BZZZZZZT! BZZZZZT! New Vibrator APIs"
1f17e024a1152eda828a0e9924daa30cfac1193d 03-Jan-2017 Geoffrey Pitsch <gpitsch@google.com> Delete the Default Channel when an app starts using channels.

New apps should create their own channels.
Not using channels will silently fail.

STOPSHIPS:
Throw to provide better feedback for developers.
Delete the default channel for all apps that target O.

Test: runtest systemui-notification
Change-Id: Ic93f103efe397f563eaaf1c2e7d8bf9093b2b2e1
erver/notification/NotificationManagerServiceTest.java
erver/notification/RankingHelperTest.java
7121697a5e2d4458f6f63e9eb3b5deec62ee6202 31-Jan-2017 Michael Wright <michaelwr@google.com> BZZZZZZT! BZZZZZT! New Vibrator APIs

Replace the existing Vibrator APIs with a new class to encapsulate the
haptic effect information, and add the ability to control the vibration
strength.

Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibratorTest
cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibrationEffectTest
runtest systemui-notification
Manual testing with $T/google_experimental/users/michaelwr/Vibrator

Bug: 30961353

Change-Id: Idbb9864a7b084c85e7b7de3257a0e6b40d9d91d6
erver/notification/BuzzBeepBlinkTest.java
d0a5b1684a6dcfead423d9f7a67e7386bda33805 18-Mar-2017 Julia Reynolds <juliacr@google.com> Don't backup deleted channels.

Change-Id: I58a23700c9f6ccf5d3d6b7fa9f80be78ef9421f0
Fixes: 36381209
Test: runtest systemui-notification
erver/notification/RankingHelperTest.java
9bfba59417fd0789023005064565d744ed7483d2 15-Mar-2017 Julia Reynolds <juliacr@google.com> Better deletions

- Allow apps to delete notification groups (which cascade to delete all
channels therein)
- Allow apps to get their groups, so they know what they might want to
delete
- Don't throw if someone tries to delete something that already doesn't
exist.

Change-Id: I5f6e25497c5da1e57b52737586e86097332f88f9
Fixes: 36245468
Fixes: 36127382
Test: runtest systemui-notification, cts
erver/notification/RankingHelperTest.java
41103f42126acbd602de81ac87a2e605492ff528 15-Mar-2017 Julia Reynolds <juliacr@google.com> Support for showing deleted channel count in settings.

Bug: 36119790
Test: runtest systemui-notification
Change-Id: Ie30243314d64ded66267d0dc85cc0ad940d917f8
erver/notification/RankingHelperTest.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
erver/notification/RankingHelperTest.java
e866533f11a137a0b179c11856c6334d8b1b195e 13-Mar-2017 Julia Reynolds <juliacr@google.com> Allow blocked apps to create channels

Change-Id: I64b90332095f949af003db3db98da75b22a09c64
Fixes: 36040396
Test: runtest systemui-notification
erver/notification/RankingHelperTest.java
d373d78d15e1ede87ac47d7b9698717b2d1c4fc4 03-Mar-2017 Julia Reynolds <juliacr@google.com> Log notification channels and groups.

Test: manual, runtest systemui-notification
Change-Id: I326a35ae87e7a3dc4b2587271056b7dd5cd11f8d
erver/notification/RankingHelperTest.java
03fa85ddccb30a6f1dcfeaec9dcbba062e5f8573 06-Mar-2017 Julia Reynolds <juliacr@google.com> Prevent creation of default channel.

Test: runtest systemui-notification
Change-Id: Id56debdca2a11bdac5ae11832eaaa04842f0a9be
erver/notification/RankingHelperTest.java
d5286843737e1117d5c6e90567fd7099a32c3a64 02-Mar-2017 Julia Reynolds <juliacr@google.com> Allow resid notification channel group labels.

Test: cts, runtest systemui, runtest systemui-notification, manual
Change-Id: I9e7b43c97fd04057e1a2614876af958cc2f40a99
erver/notification/RankingHelperTest.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
erver/notification/RankingHelperTest.java
2cda00e29a9a081087a7f16333fd492b88da988a 01-Mar-2017 Geoffrey Pitsch <gpitsch@google.com> Merge "Channels for Frameworks notifications"
4024b6696ce1be3b29194b8dc21e3d1f97776e69 01-Mar-2017 Julia Reynolds <juliacr@google.com> Reduce flakes.

Test: runtest systemui-notifications
Change-Id: I48dc8be786246e6c639a14b16784a394eac49a6b
erver/notification/SnoozeHelperTest.java
af759c52ce01fe6b5144957e38da956af01a217b 15-Feb-2017 Geoffrey Pitsch <gpitsch@google.com> Channels for Frameworks notifications

Adapts all notifications used by system services to use channels.
Channels are initialized by SystemServer after the NotificationService
has started.

Test: runtest systemui-notification
Change-Id: I25c45293b786adb57787aeab4c2613c9d7c89dab
erver/notification/GroupHelperTest.java
erver/notification/NotificationComparatorTest.java
erver/notification/NotificationManagerServiceTest.java
erver/notification/RankingHelperTest.java
erver/notification/SnoozeHelperTest.java
a5d2f235add2b8c1e4199918b5fc18040e8af434 24-Feb-2017 Julia Reynolds <juliacr@google.com> Send ranking update on channel update.

Change-Id: I26aca0f27df0fca549d863ed6a5fac2c5b025907
Fixes: 35623384
Test: manual, runtest systemui-notification
erver/notification/BadgeExtractorTest.java
5098977b20699c2ed32a621524abd5a1b2ab7de4 23-Feb-2017 Julia Reynolds <juliacr@google.com> Change time methods to durations.

Test: cts, cts verifier, runtest systemui-notification
Change-Id: Ia612f59e91f3a3e1de14cd7217fe18ecaf61033c
erver/notification/SnoozeHelperTest.java
31b2baac8d121bfd2bc9785b17fc385a8d282438 22-Feb-2017 Julia Reynolds <juliacr@google.com> Add missing sound to important channels.

Test: runtest systemui-notification
Change-Id: I7b091d312220e3830f2cd613b7ac08f75c5f0a8c
erver/notification/RankingHelperTest.java
ccc0b97a5fa1c9c50baf25d9c0c89fcc36848e09 15-Feb-2017 Geoffrey Pitsch <gpitsch@google.com> Fix for cancel to remove both posted and enqueued notifications

Bug:34287447
Test: runtest systemui-notification
Change-Id: I7deb3a06416a6eb1b8421273f7dd5115d9b7a05c
erver/notification/NotificationManagerServiceTest.java
74856c4a611b337ded6d3eee14c710cf5f7aae77 08-Feb-2017 Julia Reynolds <juliacr@google.com> Retrieving groups shouldn't have side effects

Test: runtest systemui-notification, viewing settings
Change-Id: Ib43fe6ad2af4763b633ad1690f69d17533915dbb
erver/notification/RankingHelperTest.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
erver/notification/BuzzBeepBlinkTest.java
erver/notification/NotificationRecordTest.java
erver/notification/RankingHelperTest.java
d755dd0e72878fc77e746280f6233ab525d537be 07-Feb-2017 Selim Cinek <cinek@google.com> Merge "Fixed test failures for notification comparator"
3f146d0de2cda30cc85bed797b289512bb8dfcef 06-Feb-2017 Selim Cinek <cinek@google.com> Fixed test failures for notification comparator

Test: runtest systemui-notification
Change-Id: I16e6142c99553d541d09390142cd16bbdfa724d2
erver/notification/NotificationComparatorTest.java
d94054f956a8e0484b49f42b592e69e6ad8216c2 01-Feb-2017 Julia Reynolds <juliacr@google.com> Check disqualifying notifications synchronously.

Don't wait to check on the handler.

Test: runtest systemui-notification and
platform_testing/tests/functional/notificationtests

Change-Id: Ife1ad8bc5c40420cd6682329b8135744cfe38e4a
erver/notification/NotificationManagerServiceTest.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
erver/notification/BuzzBeepBlinkTest.java
erver/notification/NotificationRecordTest.java
033a4120a8ed78c2b97a5ff9ce2f52de7a1a662d 31-Jan-2017 Julia Reynolds <juliacr@google.com> Remove unneeded callbacks to systemui.

Test: runtest systemui-notification
Change-Id: I80155df446be0153bbda4c28b06d3a578339237d
erver/notification/BuzzBeepBlinkTest.java
e73724c4f96bbcaf4085de137a8ab23eecca6717 31-Jan-2017 Julia Reynolds <juliacr@google.com> Merge "Use TVExtender channel on tv platforms."
5f20e9fedfe46252a58df9f0707e7dc8aaf2464f 30-Jan-2017 Julia Reynolds <juliacr@google.com> Use TVExtender channel on tv platforms.

Test: runtest sytemui-notification
Change-Id: I107bba298034778f1d7c0ba31896c4cbbc3fabe9
erver/notification/NotificationManagerServiceTest.java
619a69f722b75241b372cf7b01b45b2dd1c862fa 27-Jan-2017 Julia Reynolds <juliacr@google.com> Add audio attributes to notificationchannel

Test: runtest systemui-notification, cts, manual
Change-Id: I33b5a67190409fe2fc2bc7e2cbbd67ea38bc0655
erver/notification/BuzzBeepBlinkTest.java
erver/notification/NotificationRecordTest.java
erver/notification/RankingHelperTest.java
f02562aeee90e2972849214b715dcfc86aa3084e 26-Jan-2017 Julia Reynolds <juliacr@google.com> Show channel groups in settings

Empty groups shouldn't be visible to client code.

Test: runtest systemui-notification
Change-Id: I319b035886ce1bd4b6839ebf46a2c3be7b2387cf
erver/notification/RankingHelperTest.java
16594465a30beff28dfad8a88c8343f518d23bf8 26-Jan-2017 Geoffrey Pitsch <gpitsch@google.com> Fix NotificationManagerServiceTest hangs.

Bug caused by message queue going idle before the handler is added.

Bug: 34719217
Test: runtest systemui-notification
Change-Id: I03ba31e5263a43f3e3faa4a19167dbc998092dfa
erver/notification/NotificationManagerServiceTest.java
59e152e92e6ebb71bab974973ce29b4f8d11f7cf 25-Jan-2017 Julia Reynolds <juliacr@google.com> Add notification channel groups.

Test: runtest systemui-notification, cts
Change-Id: I3ed82f2b20d3f791b7cae379a49373cb41231739
erver/notification/NotificationManagerServiceTest.java
erver/notification/RankingHelperTest.java
cf63ff1532e793560f62e1c75f3402b48b0f09ba 24-Jan-2017 Julia Reynolds <juliacr@google.com> Snoozing API changes

- No one can snooze for an undetermined amount of time
- Only the assistant can unsnooze
- Listeners can retrieve a list of snoozed notifications

Test: runtest systemui-notification, cts verifier
Change-Id: Idfaee6d8bc15a5d41630f86f7e852468b07dc7d0
erver/notification/NotificationManagerServiceTest.java
erver/notification/SnoozeHelperTest.java
924eed1ca6d3fec5dae7eb0f9c11b8f23f628697 19-Jan-2017 Julia Reynolds <juliacr@google.com> Add updatable fields to Ranking

- NotificationChannel
- Badging

Test: runtest systemuinotification & cts

Change-Id: I7fd1f2dc06148927e9a4bd5b760d436e2c5e8a98
erver/notification/BadgeExtractorTest.java
erver/notification/BuzzBeepBlinkTest.java
erver/notification/GroupHelperTest.java
erver/notification/ImportanceExtractorTest.java
erver/notification/NotificationComparatorTest.java
erver/notification/NotificationListenerServiceTest.java
erver/notification/NotificationManagerServiceTest.java
erver/notification/NotificationRecordTest.java
erver/notification/RankingHelperTest.java
erver/notification/SnoozeHelperTest.java
331a64d091d68ad59baad55e7c5f86d391a4fc54 17-Jan-2017 Geoffrey Pitsch <gpitsch@google.com> Fix cancel notification race condition bug.

Cancel should always remove notifications, regardless of whether
they've been posted internally. Primarily accomplished by ensuring
all cancels happen on the same handler, and that they check the
enqueued list as well the main notifications list.

Also fixes snoozing for enqueued notifications, since it is
implemented via cancelling.

Test: runtest systemui-notification
Change-Id: If8295a38102f245013d29831a060fabd80716e4b
erver/notification/NotificationManagerServiceTest.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
erver/notification/RankingHelperTest.java
7967230de20aeb6993d8332347752c8e508769e4 12-Jan-2017 Julia Reynolds <juliacr@google.com> Send Snooze callback for Assistant

On selection of a snooze context SnoozeCriterion.

Test: runtest systemui-notification & make cts-verifier
Change-Id: Iaca567100c29295fbbf1d327195a114106909652
erver/notification/SnoozeHelperTest.java
9f7fd6c734527b33e40a9f0d8199c961d52694bb 10-Jan-2017 Geoffrey Pitsch <gpitsch@google.com> Merge "API improvements for creating NotificationChannels"
03533715295154f0bb66f84b7c25832d21156805 05-Jan-2017 Geoffrey Pitsch <gpitsch@google.com> API improvements for creating NotificationChannels

Remove listener for aysnchronous operation.
Allow multiple channel creation from a single call.
Silently no-op for creating existing channels.

Test: runtest systemui-notification
Change-Id: Ibc1340d21efa0c12d126bee437adcbb99141e86a
erver/notification/NotificationManagerServiceTest.java
aebfc4e7a3e3b66382e9004d5ed141b50e26a71b 06-Jan-2017 Julia Reynolds <juliacr@google.com> Cannot have badge only channels

Test: runtest systemui-notification & cts
Change-Id: I256e35a79400c1d25b3d2f1c7c5f8c513242a2aa
erver/notification/NotificationManagerServiceTest.java
erver/notification/RankingHelperTest.java
f35e3976e3c01077f8d8d0938d2ba0b3e5b80613 05-Jan-2017 Julia Reynolds <juliacr@google.com> Allow apps to enable notification badging.

Test: runtest systemui-notification
Change-Id: Ia16d671d864d1eee902652e31f023e30dc6b7387
erver/notification/RankingHelperTest.java
7f41c150c32ac3199a81b3a63116e8dd6f69fa18 21-Dec-2016 Julia Reynolds <juliacr@google.com> Merge "Add badging support for channels."
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
erver/notification/ImportanceExtractorTest.java
erver/notification/NotificationManagerServiceTest.java
erver/notification/RankingHelperTest.java
f4af65bbd6ccd9cf6951e26da12c2789ab14c42a 20-Dec-2016 Julia Reynolds <juliacr@google.com> Don't automatically remove autogroup summaries

Unless there are no notifications left that need to be autogrouped.

Change-Id: I76f90cd083273d1babf1209e3c509d213deffa9c
Fixes: 28612382
Test: runtest systemui-notification
erver/notification/GroupHelperTest.java
4a02afbf04ccf7068cd9279d3e828834850c387d 13-Dec-2016 Julia Reynolds <juliacr@google.com> Change notification shade ordering.

Certain ongoing and people centric notifications can now
(mostly) trump importance-based ordering.

Bug: 30374279
Test: runtest systemui-notification
Change-Id: Ieab6015174f9595c08057dc408233202035aae3e
erver/notification/NotificationComparatorTest.java
e38cdde5af7fc42e51846147812a1dfe62b963c7 13-Dec-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Cleanup log spam on system notification post."
52e64d0162bd71164c6e23e3975e98091f70588a 09-Dec-2016 Julia Reynolds <juliacr@google.com> Give assistant ability to modify channels.

Test: cts on same topic
Change-Id: Ia0db73d4d81a89e0821ba6a06f12823605dbea73
erver/notification/NotificationManagerServiceTest.java
erver/notification/RankingHelperTest.java
19ad7477ce6818bbaf1fe8e143d7d157dd11bddc 12-Dec-2016 Julia Reynolds <juliacr@google.com> Cleanup log spam on system notification post.

Bug: 33209911
Test: unplug/replug adb cable, monitor log. runtest systemui-notifications
Change-Id: I294ccdcb0a353463fe0c6b52f1dbbd97f4c75079
erver/notification/NotificationRecordTest.java
22f02b3e4acd7c6983f4d4d58b85069d5ec920ab 01-Dec-2016 Julia Reynolds <juliacr@google.com> Accept adjustments from notification assistant.

Test: runtest systemui-notification & cts in same topic.
Change-Id: Icff1f89eac32b82d583eca24b0a15f67795912a1
erver/notification/NotificationListenerServiceTest.java
aac3cba5311622061d648e92bf385da2087ce18e 01-Dec-2016 Geoffrey Pitsch <gpitsch@google.com> Merge "Listener in createNotificationChannel"
e75a66e87a4c4cf59f0ea6f4bd509fd707c2383f 22-Nov-2016 Geoffrey Pitsch <gpitsch@google.com> Listener in createNotificationChannel

Necessary for when this will eventually trigger an Activity.
New unit test file for NotificationServiceManager.

Test: runtest systemui-notification (cts tests in separate CL)
Change-Id: I8f3e8e34ddcebb1acb9ddd84bffc68affb4b6e89
erver/notification/NotificationManagerServiceTest.java
32c97ef3c8efae999f68664320fa1200ff435f12 28-Nov-2016 Julia Reynolds <juliacr@google.com> Blocked packages can't create channels.

Test: runtest systemui-notification
Change-Id: I3f0560a71adc33d9881021f920ce2824b96ddc14
erver/notification/RankingHelperTest.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
erver/notification/BuzzBeepBlinkTest.java
erver/notification/NotificationRecordTest.java
erver/notification/RankingHelperTest.java
b6c1f99bd96d2f38980f4473baf3aa908d059db2 22-Nov-2016 Julia Reynolds <juliacr@google.com> Allow listeners more snoozing options.

(snooze indeterminately and unsnooze)

Test: runtest systemui-notification and cts tests in same topic.
Change-Id: I5ce74638f55ed796bc6b26af167b32b0040f4222
erver/notification/SnoozeHelperTest.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
erver/notification/BuzzBeepBlinkTest.java
erver/notification/NotificationRecordTest.java
erver/notification/RankingHelperTest.java
423b9fc83d736326b8ddadbfcd6fd5f181bf9fec 09-Nov-2016 Julia Reynolds <juliacr@google.com> Move notification channel from record to sbn.

So notificationlisteners know about it.

Test: runtest systemui-notification
Change-Id: I28fc86730d3f7ad246a0164f44157594f57430c0
erver/notification/BuzzBeepBlinkTest.java
erver/notification/GroupHelperTest.java
erver/notification/ImportanceExtractorTest.java
erver/notification/RankingHelperTest.java
erver/notification/SnoozeHelperTest.java
b3a04f0816a1c8e16468c9906e0fc9e1a4cd99d4 04-Nov-2016 Julia Reynolds <juliacr@google.com> Never use getApplicationInfo.

Always use getApplicationInfoAsUser.

Test: runtest, and install a work profile app and post a notification.

Bug: 32615127
Change-Id: I92cdf42d791d27eaff64b945be96b216e5866f6d
erver/notification/RankingHelperTest.java
1864ff5dae054e86f527426ef9887440d3277bcd 02-Nov-2016 Julia Reynolds <juliacr@google.com> Replace test TODOs with ACTION.

Also call packagemanager less.

Test: runtest
Change-Id: Icff2a5b9e7fff49ef8cf7b643c198707a6089007
erver/notification/RankingHelperTest.java
b879cc614f58cf0237bdc50393db129afe2b9403 01-Nov-2016 Geoffrey Pitsch <gpitsch@google.com> Move notification tests into separate APK.

This will allow us to hook into a presubmit step without
bringing in the other tests.

Compile notification source directly into test APK, for
faster development.

Test: runtest --path
frameworks/base/services/tests/notification/
Change-Id: I04dbcec892cbd375ba1334f59e6b58bcafe80151
erver/notification/BuzzBeepBlinkTest.java
erver/notification/GroupHelperTest.java
erver/notification/ImportanceExtractorTest.java
erver/notification/RankingHelperTest.java
erver/notification/RateEstimatorTest.java
erver/notification/SnoozeHelperTest.java
erver/notification/ValidateNotificationPeopleTest.java