134 Commits

Author SHA1 Message Date
Colin Cross
6b13ebc7f1 Enable multi-dex for dx
Add LOCAL_DX_FLAGS := --multi-dex where it is enabled for jack.
Also stop enabling multi-dex when coverge is enabled, since
multi-dex is now enalbed unconditionally.

Test: builds
Change-Id: I67fedcdd5bb5d7091468bddcb0c22bab720a51d2
Merged-In: I67fedcdd5bb5d7091468bddcb0c22bab720a51d2
(cherry picked from commit 17ffa24277380c69bf365fa595e7d4e6e51825eb)
2017-07-27 17:48:44 +00:00
Tony Mantler
ab55f0f2b0 Disable notification sounds on TV
Bug: 38495875
Test: BuzzBeepBlinkTest
Change-Id: Iffebe2063de3d73c1538a3bbbe9edd2233005ba3
2017-06-16 12:47:19 -07:00
Julia Reynolds
0839c02bcb 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
2017-06-15 21:31:42 +00:00
Julia Reynolds
2f77da6e10 Merge "Don't allow blocked apps to post notifications" into oc-dev 2017-06-05 13:12:57 +00:00
Chris Wren
b39217972e add channel and group tags to the notificaiton logs
Change-Id: Icf029e42fca46262c9d9f8ff63f26de098f888bf
Fixes: 37714086
Test: runtest systemui-notification
2017-06-02 16:19:13 -04:00
Julia Reynolds
4da7970dab Don't allow blocked apps to post notifications
Change-Id: I82ed7d954746e65c086ba43c3f4733f9edeae081
Fixes: 62217679
Test: runtest sysmui-notification
2017-06-02 11:29:35 -04:00
TreeHugger Robot
fd0b15c196 Merge "Mock out usageStats in NotificationManagerServiceTests" into oc-dev 2017-06-02 14:44:26 +00:00
Geoffrey Pitsch
d5bcf218cb Mock out usageStats in NotificationManagerServiceTests
Shouldn't be doing this db work in tests

Change-Id: Idadadd83bfe984bd0e1c991534f1fba93ca34b53
Fixes: 62251669
Test: runtest systemui-notification
2017-06-01 15:45:35 -04:00
Jean-Michel Trivi
ea0eb5f581 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
2017-06-01 11:32:49 -07:00
Julia Reynolds
745c15477b Properly read vibration setting on boot.
Test: runtest systemui-notification
Change-Id: I400bc3df441524abe4973d4d6bccc7ef30a2e1c7
Fixes: 37865035
2017-05-26 20:35:16 +00:00
Julia Reynolds
3a2ac3e11b Merge "Allow some system notifications to be blocked." into oc-dev 2017-05-26 14:39:30 +00:00
TreeHugger Robot
e6bf4f808d Merge "Allow the creation of IMPORTANCE_NONE channels" into oc-dev 2017-05-25 22:14:35 +00:00
Julia Reynolds
f732159cf8 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
2017-05-25 20:42:59 +00:00
Julia Reynolds
5fe2eae6b9 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
2017-05-25 10:49:06 -04:00
Julia Reynolds
3e50bf6f97 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
2017-05-24 16:39:27 -04:00
Julia Reynolds
f26eb91698 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
2017-05-22 16:01:38 -04:00
Jeff Sharkey
91f674eeda Merge "Unbreak APK 26 apps running on "O" preview/beta builds." into oc-dev 2017-05-18 15:59:40 +00:00
Dan Sandler
e103b7808b Unbreak APK 26 apps running on "O" preview/beta builds.
Bug: 38391358
Test: runtest systemui-notification
Change-Id: Ib78dd3e2a3dcb16faae33a0d5a07475187fb3463
2017-05-17 16:43:27 -07:00
Chris Wren
13f157feed catch USER_ALL in badging check
Bug: 38264652
Test: runtest systemui-notification
Change-Id: Id482ed4984eef83ad0e9876acda5addb65aca5f9
2017-05-16 12:55:25 -04:00
Julia Reynolds
34bc4af810 Merge "Show misc channel with pre-upgrade fields" into oc-dev 2017-05-12 12:14:11 +00:00
Chris Wren
89aa226190 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
2017-05-11 17:19:01 -04:00
Julia Reynolds
17717f5a6d 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
2017-05-11 13:43:03 -04:00
Julia Reynolds
e0b2574626 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
2017-05-11 13:37:46 -04:00
Selim Cinek
37079af46d Merge "Fixed the ordering of colorized media notifications" into oc-dev 2017-05-09 21:07:03 +00:00
Selim Cinek
c6c639cb06 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
2017-05-05 19:49:22 -07:00
TreeHugger Robot
e2361d978b Merge "Revert "Treat apps that use channels as O apps"" into oc-dev 2017-05-05 18:50:58 +00:00
Geoffrey Pitsch
a22f644c79 Revert "Treat apps that use channels as O apps"
This reverts commit 07a08b2ae92cc26b5e7ec00064e6ecea79d3d9c3.
Bug: 38016678
Change-Id: I0bf2f6da9e145bfe1f79449cac38ad34f5956969
2017-05-05 16:50:47 +00:00
Julia Reynolds
2e9bf5fa7a Remove notification settings for deleted users
Test: runtest systemui-notification, manual
Change-Id: I221554479cf6bedb36b17d5e9bbc05307af9b89b
Fixes: 37941356
2017-05-03 13:27:29 -04:00
Julia Reynolds
07a08b2ae9 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
2017-05-03 10:36:12 -04:00
Geoffrey Pitsch
b9ee2d4677 Merge "Delete default channel for all apps targeting O." into oc-dev 2017-05-03 13:15:21 +00:00
Geoffrey Pitsch
5644ccd185 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
2017-05-02 16:06:19 -04:00
TreeHugger Robot
67ced6c08f Merge "Fix cancel when the same notification is enqueued twice." into oc-dev 2017-05-02 20:02:19 +00:00
Geoffrey Pitsch
27684159c6 Fix cancel when the same notification is enqueued twice.
Change-Id: I6563c70ac441ff1c1951d5220c2e6a7c5f210d49
Fixes: 37706685
Test: runtest systemui-notification
2017-05-02 13:28:51 -04:00
Julia Reynolds
a8b766fb73 Do not unsnooze canceled notifications.
Test: runtest systemui-notification
Change-Id: I3edef5822aa74359bf3a34f54f59d4021696365d
2017-05-01 11:04:23 -04:00
Julia Reynolds
a78cdffd80 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
2017-04-27 16:47:36 -04:00
TreeHugger Robot
f84467e19f Merge "Api updates" into oc-dev 2017-04-27 04:51:46 +00:00
Julia Reynolds
567947d75d Merge "Update app level fields when misc channel is updated" into oc-dev 2017-04-26 17:43:32 +00:00
Julia Reynolds
bad4297600 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
2017-04-25 17:00:05 -04:00
TreeHugger Robot
21fb35048f Merge "Revert "Revert "Integrate new looper apis into testables""" into oc-dev 2017-04-25 20:27:23 +00:00
Julia Reynolds
fa04e143d8 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
2017-04-25 15:50:56 -04:00
Jason Monk
745d0a8b77 Revert "Revert "Integrate new looper apis into testables""
This reverts commit fd8f615953631863c94d7080441f8dd4a0a74f56.
+ some minor adjustments.

Test: runtest systemui
Change-Id: Ie4349fcfb2aadbbd8826506faa8a6fb1ecd5b589
2017-04-25 13:49:58 -04:00
Julia Reynolds
a79c37170e Allow some notifications in a group to be muted
Test: cts, runtest systemui-notification
Change-Id: I98b971c496c52f69e039a3a3101f71ac567b538a
2017-04-25 13:41:37 -04:00
Julia Reynolds
10e7275965 Merge "Don't allow devs to create blocked channels" into oc-dev 2017-04-24 21:17:16 +00:00
Julia Reynolds
d8c0ac42de Don't allow devs to create blocked channels
Test: runtest systemui-notification
Change-Id: I11942e4268acc70ffcbcda08eed4e13e64f4b12f
Fixes: 37559814
2017-04-23 13:18:15 -04:00
Julia Reynolds
ca80d1632e Don't consider uri empty a valid sound
Test: runtest systemui-notification
Change-Id: Ia838237e04eb11bd79e3ad5990bbb52c7ab853ee
Fixes: 36848349
2017-04-23 17:13:28 +00:00
Julia Reynolds
fea6f7b799 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
2017-04-21 09:38:39 -04:00
Julia Reynolds
feb7341b2f 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
2017-04-18 14:12:16 -04:00
TreeHugger Robot
1ed2771450 Merge "Add user to channel/group modification callbacks." into oc-dev 2017-04-17 21:26:54 +00:00
Julia Reynolds
b9e712ebde Also use the notification's sound for the misc channel
Even if it's nonexistent.

Test: runtest systemui-notification
Change-Id: I1167fdf10b776460de696657dd49ab6f2be85753
Fixes: 37414045
2017-04-17 14:33:30 +00:00
Julia Reynolds
f27d6b2b82 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
2017-04-17 08:44:35 -04:00