73 Commits

Author SHA1 Message Date
Geoffrey Pitsch
ed767118f4 Ignore flaky notification test
Bug: 36551790
Test: runtest systemui-notification
Change-Id: I92f72a90afb2323a847149351bf1c6a911027e0b
2017-03-23 15:13:06 -04:00
Dan Shi
874a0916fc Merge "Add test configs to apct tests under frameworks/base" 2017-03-22 17:55:58 +00:00
TreeHugger Robot
2c98e18ce5 Merge "Null check! Now with a test" 2017-03-22 15:20:36 +00:00
TreeHugger Robot
26a547d5e4 Merge "Allow channels to have a user visible description." 2017-03-22 14:04:05 +00:00
Julia Reynolds
8e0eb372c9 Null check! Now with a test
Test: runtest systemui-notification
Change-Id: I0b98b3dd6aeaa7e300bba98b7d7f7f5afae16596
Fixes: 36245468
2017-03-21 21:50:32 +00:00
TreeHugger Robot
48926cc1e6 Merge "Channel updates should trigger ranking updates" 2017-03-21 21:46:36 +00:00
Julia Reynolds
2c891c92fa Allow channels to have a user visible description.
Test: runtest systemui-notification, cts
Change-Id: I0d04b82c99deecad663d8cb0565563f00e8a1f56
2017-03-21 17:45:41 -04:00
Julia Reynolds
a917a1149c 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
2017-03-21 11:23:46 -04:00
Geoffrey Pitsch
d9263306d5 Merge "Delete the Default Channel when an app starts using channels." 2017-03-21 14:12:22 +00:00
TreeHugger Robot
2bcca1d624 Merge "BZZZZZZT! BZZZZZT! New Vibrator APIs" 2017-03-21 13:40:36 +00:00
Dan Shi
7f2afd2dff Add test configs to apct tests under frameworks/base
TouchLatency is needed by test TouchLatencyJankTestWear
UiBench is needed by test UiBenchJankTests

Details about test configs changes are tracked in doc
https://docs.google.com/document/d/1EWUjJ7fjy8ge_Nk0YQbFdRp8DSHo3z6GU0R8jLgrAcw/edit#

Bug: 35882476
Test: local test
make -j32 TouchLatency TouchLatencyJankTestWear  && \
tradefed.sh run template/local --template:map test=TouchLatencyJankTestWear \
      --test-tag testname --log-level-display VERBOSE
make -j32 UiBenchJankTests UiBench  && \
tradefed.sh run template/local --template:map test=UiBenchJankTests \
      --test-tag testname --log-level-display VERBOSE

Change-Id: I63f23e3a21ad1343607953958fb7bb0a5fb8c343
2017-03-21 00:05:14 -07:00
Geoffrey Pitsch
1f17e024a1 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
2017-03-20 16:49:59 -04:00
Michael Wright
7121697a5e 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
2017-03-20 16:09:51 +00:00
Julia Reynolds
d0a5b1684a Don't backup deleted channels.
Change-Id: I58a23700c9f6ccf5d3d6b7fa9f80be78ef9421f0
Fixes: 36381209
Test: runtest systemui-notification
2017-03-20 14:55:16 +00:00
TreeHugger Robot
587b60282e Merge "frameworks/base: Add APCT tests to the device-tests suite." 2017-03-16 17:35:12 +00:00
Julia Reynolds
9bfba59417 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
2017-03-16 14:32:50 +00:00
Julia Reynolds
41103f4212 Support for showing deleted channel count in settings.
Bug: 36119790
Test: runtest systemui-notification
Change-Id: Ie30243314d64ded66267d0dc85cc0ad940d917f8
2017-03-16 14:24:17 +00:00
Julia Reynolds
1d97e6a0c1 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
2017-03-16 14:20:28 +00:00
Simran Basi
473a16e492 frameworks/base: Add APCT tests to the device-tests suite.
This CL adds the APCT tests within this project to
a similar suite as CTS known as device-tests.

The current method of running APCT tests in the infrastructure
is unaffected.

Bug: 35882476
Test: `make dist device-tests -j` and local builds of
      continuous_instrumentation_tests & continuous_native_tests

Change-Id: Ifa382fe691842c1cd76897775b9e2a1653449eb5
2017-03-15 14:46:27 -07:00
Julia Reynolds
e866533f11 Allow blocked apps to create channels
Change-Id: I64b90332095f949af003db3db98da75b22a09c64
Fixes: 36040396
Test: runtest systemui-notification
2017-03-13 17:09:18 +00:00
Paul Duffin
2abe1be543 Use --multi-dex native to avoid dex limit
Bug: 32912773
Test: make checkbuild
Change-Id: If23b6a746494d862059ce76ef20b225a6c27c379
2017-03-11 12:26:13 +00:00
Julia Reynolds
d373d78d15 Log notification channels and groups.
Test: manual, runtest systemui-notification
Change-Id: I326a35ae87e7a3dc4b2587271056b7dd5cd11f8d
2017-03-07 15:25:27 +00:00
Julia Reynolds
03fa85ddcc Prevent creation of default channel.
Test: runtest systemui-notification
Change-Id: Id56debdca2a11bdac5ae11832eaaa04842f0a9be
2017-03-07 00:17:19 +00:00
Julia Reynolds
d528684373 Allow resid notification channel group labels.
Test: cts, runtest systemui, runtest systemui-notification, manual
Change-Id: I9e7b43c97fd04057e1a2614876af958cc2f40a99
2017-03-02 21:08:31 +00:00
Julia Reynolds
5a31193497 Allow translatable channel names.
Bug: 35336590
Test: runtest sytemui runtest systemui-notification, manual
Change-Id: I1e6ebbcc36cab22ab9b2dfde505a68513544ef52
2017-03-02 15:48:12 +00:00
Geoffrey Pitsch
2cda00e29a Merge "Channels for Frameworks notifications" 2017-03-01 17:51:23 +00:00
Julia Reynolds
4024b6696c Reduce flakes.
Test: runtest systemui-notifications
Change-Id: I48dc8be786246e6c639a14b16784a394eac49a6b
2017-03-01 15:54:52 +00:00
Geoffrey Pitsch
af759c52ce 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
2017-03-01 10:17:15 -05:00
Julia Reynolds
a5d2f235ad Send ranking update on channel update.
Change-Id: I26aca0f27df0fca549d863ed6a5fac2c5b025907
Fixes: 35623384
Test: manual, runtest systemui-notification
2017-02-24 14:54:41 -05:00
Julia Reynolds
5098977b20 Change time methods to durations.
Test: cts, cts verifier, runtest systemui-notification
Change-Id: Ia612f59e91f3a3e1de14cd7217fe18ecaf61033c
2017-02-23 14:52:49 -05:00
Julia Reynolds
31b2baac8d Add missing sound to important channels.
Test: runtest systemui-notification
Change-Id: I7b091d312220e3830f2cd613b7ac08f75c5f0a8c
2017-02-22 14:49:23 -05:00
Geoffrey Pitsch
ccc0b97a5f Fix for cancel to remove both posted and enqueued notifications
Bug:34287447
Test: runtest systemui-notification
Change-Id: I7deb3a06416a6eb1b8421273f7dd5115d9b7a05c
2017-02-15 11:02:26 -05:00
Julia Reynolds
74856c4a61 Retrieving groups shouldn't have side effects
Test: runtest systemui-notification, viewing settings
Change-Id: Ib43fe6ad2af4763b633ad1690f69d17533915dbb
2017-02-08 20:35:14 +00:00
Julia Reynolds
529e3329e6 Let developers choose a light color for channels
Test: runtest systemui-notification & cts
Change-Id: Ibfab57924d0a9093af23191ebdd68ce1c0da6eca
2017-02-07 15:46:09 -05:00
Selim Cinek
d755dd0e72 Merge "Fixed test failures for notification comparator" 2017-02-07 00:43:46 +00:00
Selim Cinek
3f146d0de2 Fixed test failures for notification comparator
Test: runtest systemui-notification
Change-Id: I16e6142c99553d541d09390142cd16bbdfa724d2
2017-02-06 13:38:02 -08:00
Julia Reynolds
d94054f956 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
2017-02-01 11:47:21 -05:00
Julia Reynolds
a33f5c4312 Deprecate notification fields
And move references to the deprecated fields to
NotificationRecord for testability.

Test: runtest systemui-notification
Change-Id: If3910dc78297ad66679b1efa380315127261a018
2017-02-01 09:56:00 -05:00
Julia Reynolds
033a4120a8 Remove unneeded callbacks to systemui.
Test: runtest systemui-notification
Change-Id: I80155df446be0153bbda4c28b06d3a578339237d
2017-01-31 16:50:38 -05:00
Julia Reynolds
e73724c4f9 Merge "Use TVExtender channel on tv platforms." 2017-01-31 14:06:06 +00:00
Julia Reynolds
5f20e9fedf Use TVExtender channel on tv platforms.
Test: runtest sytemui-notification
Change-Id: I107bba298034778f1d7c0ba31896c4cbbc3fabe9
2017-01-30 19:35:48 +00:00
Julia Reynolds
619a69f722 Add audio attributes to notificationchannel
Test: runtest systemui-notification, cts, manual
Change-Id: I33b5a67190409fe2fc2bc7e2cbbd67ea38bc0655
2017-01-30 08:55:31 -05:00
Julia Reynolds
f02562aeee Show channel groups in settings
Empty groups shouldn't be visible to client code.

Test: runtest systemui-notification
Change-Id: I319b035886ce1bd4b6839ebf46a2c3be7b2387cf
2017-01-27 08:51:45 -05:00
Geoffrey Pitsch
16594465a3 Fix NotificationManagerServiceTest hangs.
Bug caused by message queue going idle before the handler is added.

Bug: 34719217
Test: runtest systemui-notification
Change-Id: I03ba31e5263a43f3e3faa4a19167dbc998092dfa
2017-01-26 15:08:33 -05:00
Julia Reynolds
59e152e92e Add notification channel groups.
Test: runtest systemui-notification, cts
Change-Id: I3ed82f2b20d3f791b7cae379a49373cb41231739
2017-01-26 00:01:06 +00:00
Julia Reynolds
cf63ff1532 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
2017-01-24 16:18:52 -05:00
Julia Reynolds
924eed1ca6 Add updatable fields to Ranking
- NotificationChannel
- Badging

Test: runtest systemuinotification & cts

Change-Id: I7fd1f2dc06148927e9a4bd5b760d436e2c5e8a98
2017-01-24 08:43:38 -05:00
Geoffrey Pitsch
331a64d091 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
2017-01-23 12:37:03 -05:00
Julia Reynolds
4036e8d4c6 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
2017-01-17 21:31:44 +00:00
Julia Reynolds
7967230de2 Send Snooze callback for Assistant
On selection of a snooze context SnoozeCriterion.

Test: runtest systemui-notification & make cts-verifier
Change-Id: Iaca567100c29295fbbf1d327195a114106909652
2017-01-12 10:40:11 -05:00