Commit Graph

1478 Commits

Author SHA1 Message Date
TreeHugger Robot
4dc4c3ae6f Merge "Improved logging on CharSequenceTransformation." 2018-09-11 22:58:08 +00:00
Julia Reynolds
a7ba45acb1 Allow apps to proxy notifications for other apps
This will allow apps to delegate posting to persistently
running apps, to decrease the numbers of times apps need to wake up
just to post a notification.

Bug: 111452544
Test: runtest systemui-notification
Change-Id: I1ead239747f2871f222d0ce6a971d1448a0766ad
2018-09-10 15:00:59 -04:00
Felipe Leme
e18f51f240 Improved logging on CharSequenceTransformation.
Test: m framework

Bug: 113593220

Change-Id: I6860b158decb34cfa0432122baac2a33c756b4f6
2018-09-07 12:41:43 -07:00
Julia Reynolds
fe992198c1 Add documentation about threading.
Change-Id: I8e0df7398f464cc829a83012f2ab6ee6441d0e4c
Fixes: 112249346
Test: make
2018-09-07 17:39:02 +00:00
Felipe Leme
5429ade944 Fixed findValueLocked() so it fetches values from previous sessions.
Test: atest MultiScreenLoginTest:testSaveBothFieldsCustomDescription_differentIds
Bug: 113593220

Change-Id: I662c526e1d885cc1cdbff113172a0b674dd0849c
2018-09-05 18:20:02 -07:00
Lucas Dupin
6155aa402a Only set FLAG_SCALED for fixed size wallpapers
Change-Id: I98a18a9c115f66d0024a069456f5aaf2c138bbde
Fixes: 113828967
Test: set live wallpaper, set image wallpaper
2018-09-05 11:15:52 -07:00
Valentin Iftime
6239e53794 Resize image wallpaper surface to match bitmap size in order to optimize memory
(on AndroidTV there is no need for wallpaper and RAM is wasted)

Bug: 74517029
Test: Push a low resolution wallpaper to the device (adb push new_wallpaper /data/system/users/0/wallpaper),
reboot and check the buffer size for com.android.systemui.ImageWallpaper (adb shell dumpsys SurfaceFlinger)

Change-Id: I992175997ed09360e8fc9c2cabf354fb4fabd1f9
2018-08-31 14:36:33 +02:00
TreeHugger Robot
3c0fd76725 Merge "Revert "Fixed FieldClassificationStrategy that gets data from the package info."" 2018-08-29 16:00:19 +00:00
Felipe Leme
c7ee7af4ac Fixed new multi-screens autofill API:
- Previous FillContexts should be shown on subsequent FillRequests.
- Client state should be properly propagated.

Test: atest MultiScreenLoginTest
Test: atest CtsAutoFillServiceTestCases # to make sure it didn't break anything

Fixes: 112051762
Bug: 113281366

Change-Id: I17de046385bd923279684d461afd24b49ad6f89a
2018-08-28 09:40:48 -07:00
Ryan Mitchell
2fe035b449 Revert "Fixed FieldClassificationStrategy that gets data from the package info."
This reverts commit cfa0d49be5.

Bug: 112776204
Test: atest FieldsClassificationTest#testGetAlgorithm
2018-08-28 16:28:30 +00:00
Michael Wright
3f4d546525 Revert the DISMISSAL_NOT_DISMISSED to previous value.
This is existing API and can't be changed.

Bug: 113071843
Test: make update-api
Change-Id: Ib6b1002f29ba35d7a2ca8c26cac61344dae9f43f
2018-08-22 23:41:02 +01:00
TreeHugger Robot
3c98e02d43 Merge changes Ied0d0a83,Id649a1ed
* changes:
  Add ability to pass user sentiment to assistant
  Add AndroidTest file for ExtServices
2018-08-21 22:00:50 +00:00
Felipe Leme
5d62f822d8 Fixed javadoc tags.
Bug: 112709898
Bug: 112901746

Test: mmm -j frameworks/base/:doc-comment-check-docs

Change-Id: Ice8eba0623c27ad0e1b84563ce44c1491ed6074a
2018-08-21 11:41:37 -07:00
Julia Reynolds
fd4099d74f Add ability to pass user sentiment to assistant
Test: runtest systemui-notification
Bug: 4798501
Change-Id: Ied0d0a83c4fbbdde59ee8f4e9394161792c42c03
2018-08-21 12:58:30 -04:00
TreeHugger Robot
07ae651adf Merge "New Autofill Save UI API to switch visibility of views." 2018-08-21 16:54:44 +00:00
TreeHugger Robot
40613508cc Merge "Allow multiple categories per value on FieldClassification's UserData." 2018-08-20 23:01:32 +00:00
Felipe Leme
37f837222e New Autofill Save UI API to switch visibility of views.
Test: atest \
      OnClickActionTest VisibilitySetterActionTest CustomDescriptionUnitTest

Fixes: 112709898

Change-Id: I05d59ecbdd21d68e9056adeb361e5a9bdd3d2a43
2018-08-20 14:22:33 -07:00
Julia Reynolds
6a63d1bfb5 The quietening round 3: aging
Move notifications into the min bucket after they've
been seen (plus a variable delay based on type).

Test: ExtServicesUnitTests
Bug: 111475013

Change-Id: Id577162d063dc1b0ad370f66af7a503e294c5b65
2018-08-20 18:59:31 +00:00
Laura Davis
ed3bc12e2a Merge "Docs: Inserted links to relevant guide pages." into pi-dev am: 283f55f7de
am: 6497c5bd21

Change-Id: Ida8426c0ca4f0fd755df2783fb16ea5d9e5e72ad
2018-08-17 16:13:46 -07:00
Laura Davis
6497c5bd21 Merge "Docs: Inserted links to relevant guide pages." into pi-dev
am: 283f55f7de

Change-Id: I1a42ff1b3485e35e152b354039aa5c072e0a1e70
2018-08-17 15:14:38 -07:00
Felipe Leme
725bc91c26 Allow multiple categories per value on FieldClassification's UserData.
This is useful in cases such as using an email address as either email or
username.

Test: atest UserDataTest FieldsClassificationTest

Fixes: 111437231

Change-Id: I04c84cc635497ab89464c2e5795f87b9f5ae1995
2018-08-17 13:00:30 -07:00
Laura Davis
43e75d98d8 Docs: Inserted links to relevant guide pages.
This is the proof of concept for adding relevant
links in API pages to narrative content.
The design doc is hosted at:
https://docs.google.com/document/d/1Y6bFua27Gs7ONZ27gz0nHz3Djv0WND_V_rX-XvbeB3U/edit?usp=sharing

Test: make ds-docs

Bug: 112478848
Change-Id: Ic3842629c802fe89582d4d7b4a153e54d4ba1713
2018-08-16 16:57:18 -07:00
Mathew Inwood
96c9a3cbc8 Merge "Add @UnsupportedAppUsage annotations" am: 9feefd2f5f
am: 3ef2a833ba

Change-Id: Iefd5883914482bdc45b38a77d8016b4552dfcaf0
2018-08-16 03:05:51 -07:00
Mathew Inwood
3ef2a833ba Merge "Add @UnsupportedAppUsage annotations"
am: 9feefd2f5f

Change-Id: Id93bdaf74cf2e9077f3af8367189ae98e8a2f95a
2018-08-15 06:52:39 -07:00
Aaron Heuckroth
485e8a3499 Merge "Refactor RankingMap building methods to reduce code duplication." 2018-08-15 13:40:16 +00:00
Mathew Inwood
217f30b3a4 Merge "Add @UnsupportedAppUsage annotations" 2018-08-15 10:03:53 +00:00
TreeHugger Robot
726ab98716 Merge "Override old alarms in zen schedule" 2018-08-14 21:22:49 +00:00
Julia Reynolds
901bf28b5f The quietening part 2: rules
Apply some rules about what notifications are automatically
silenced.

Test: make ExtServicesUnitTests &&
adb install -r $OUT/testcases/ExtServicesUnitTests/ExtServicesUnitTests.apk &&
adb shell am instrument -w android.ext.services.tests.unit/android.support.test.runner.AndroidJUnitRunner
Bug: 111475013

Change-Id: Idf0434c0688b3249a9fc2d5aa655665e71e53249
2018-08-14 20:45:25 +00:00
TreeHugger Robot
ffc6c357ba Merge "Don't use creationTime for ZenRule equality" 2018-08-14 19:29:54 +00:00
Beverly
4e76191a9f Override old alarms in zen schedule
Change-Id: I371a586d470e3e341a42fb5ae3b8f32929214c18
Fixes: 112493468
Test: ScheduleCalendarTest
2018-08-14 15:03:26 -04:00
Aaron Heuckroth
aa01ea47f6 Refactor RankingMap building methods to reduce code duplication.
Test: Full rebuild and run automated tests.

Change-Id: Icaea43e513e83f454ecc94ad07f546740f53cb8d
2018-08-14 13:47:27 -04:00
TreeHugger Robot
b4fff5c90c Merge "New Autofill API: FillRequest.FLAG_COMPATIBILITY_MODE_REQUEST." 2018-08-13 23:50:49 +00:00
Beverly
aa5ca96298 Don't use creationTime for ZenRule equality
- onRestore, the ZEN_MODE_CONFIG_ETAG shouldn't change
even though creationTime for zen automatic rules are updated

Test: ZenModeHelperTest.java
Change-Id: If241143f6759553b3297e5d7f12e3a3caddbd17d
Fixes: 111415419
2018-08-13 15:28:25 -04:00
Julia Reynolds
efcdff4528 The quietening round 2 part 1
Allow the notification assistant to block or silence
incoming notifications, or demote notifications after they
are posted

Also temporarily silence everything by default

Plus: bonus refactoring of the cancel notification runnable so I could
write just one of those tests :)

Bug: 111475013
Test: manual, runtest systemui-notification
Change-Id: Ifa04a21919f60d06080cd63e7d7747180b641308
2018-08-10 15:47:54 -04:00
Mathew Inwood
d237a74ff4 Add @UnsupportedAppUsage annotations
For packages:
  android.service.wallpaper
  android.service.vr
  android.service.voice
  android.service.trust
  android.service.textservice
  android.service.restrictions
  android.service.resolver
  android.service.quicksettings
  android.service.power
  android.service.pm
  android.service.persistentdata
  android.service.oemlock
  android.service.notification
  android.service.media
  android.service.gatekeeper
  android.service.fingerprint
  android.service.euicc
  android.service.dreams
  android.service.diskstats
  android.service.chooser
  android.service.carrier
  android.service.battery
  android.service.autofill
  android.service.appwidget
  android.service

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I50fb66b55bbc82cc505b483c98f8bd09ae0b5020
Merged-In: I51645d8a8cdce3015749fc27e34830e822ef41ae
2018-08-10 09:58:47 +01:00
Mathew Inwood
e3807372f7 Add @UnsupportedAppUsage annotations
For packages:
  android.service.wallpaper
  android.service.vr
  android.service.voice
  android.service.trust
  android.service.textservice
  android.service.restrictions
  android.service.resolver
  android.service.quicksettings
  android.service.power
  android.service.pm
  android.service.persistentdata
  android.service.oemlock
  android.service.notification
  android.service.media
  android.service.gatekeeper
  android.service.fingerprint
  android.service.euicc
  android.service.dreams
  android.service.diskstats
  android.service.chooser
  android.service.carrier
  android.service.battery
  android.service.autofill
  android.service.appwidget
  android.service

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I51645d8a8cdce3015749fc27e34830e822ef41ae
2018-08-10 09:51:03 +01:00
Felipe Leme
8d7f7f4f28 Added new API to support multi-activity autofill workflows.
For example, when an app uses one activity to enter username, another for
password.

Bug: 112051762

Test: atest MultiScreenLoginTest # new API
Test: atest CtsAutoFillServiceTestCases # to make sure it doesn't break anything
Test: m -j update-api

Change-Id: Ia95888901ab72f75938efb87103cd76f5ec8ce09
2018-08-07 11:36:20 -07:00
Felipe Leme
eacd74de50 New Autofill API: FillRequest.FLAG_COMPATIBILITY_MODE_REQUEST.
Test: atest VirtualContainerActivityTest VirtualContainerActivityCompatModeTest
Test: m -j doc-comment-check-docs # and checked HTML

Fixes: 112111649

Change-Id: I2390fd78e330c10b08394c50f14f88211e5f2d80
2018-08-02 11:22:10 -07:00
TreeHugger Robot
c4f2ec7b3a Merge "Allow NotificationAssistantService to suggest smart replies" 2018-08-02 13:03:48 +00:00
Tony Mak
c9acf67886 Allow NotificationAssistantService to suggest smart replies
If the apps has provided their own choices, they will be used, as opposed
to the "smart replies" from NAS.
Otherwise, smart replies will be applied to the notifications
with a freeform RemoteInput but without choices.

The smart reply model is not ready yet, so canned response is hardcoded
and it is disabled by default. To test it out, run
adb shell setprop persist.sys.smart_replies_experiment true
Also, to get rid of the target >= P SDK requirement, you may want to run:
adb shell settings put global smart_replies_in_notifications_flags enabled=true,max_squeeze_remeasure_attempts=3,requires_targeting_p=false

Test: atest SystemUITests
Test: atest frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/NotificationListenerServiceTest.java
Test:
1. adb shell setprop persist.sys.smart_replies_experiment true
2. adb shell settings put global smart_replies_in_notifications_flags enabled=true,max_squeeze_remeasure_attempts=3,requires_targeting_p=false
3. Send a message to myself, observe the hardcoded smart replies.

Bug: 111674540

Change-Id: Ia61a77faef7c4dcba0501abfec80e3e8cc7274e4
2018-08-02 11:39:35 +01:00
TreeHugger Robot
0c499ab71f Merge "Fixed FieldClassificationStrategy that gets data from the package info." 2018-08-01 20:28:06 +00:00
Julia Reynolds
70aaea7bb2 Limit cross user adjustments from assistants.
All NotificationListenerService callbacks and methods will
still work for managed profiles, but NotificationAssistantServices
must operate within their current user.

Fixes: 111429721
Test: runtest systemui-notification

Change-Id: I9747db80f986e172e309f8f17559c943ce265c76
2018-07-31 16:07:20 -04:00
Lucas Dupin
8f09a5057e Expose Ambient Wallpaper API
In P we introduced a private concept of AOD wallpapers, in Q
we're making it a public surface.

Bug: 111395593
Test: make
Change-Id: I4c406386f0ee15dc8734a24b040482b6cb807126
2018-07-30 10:42:06 +08:00
Felipe Leme
cfa0d49be5 Fixed FieldClassificationStrategy that gets data from the package info.
The metadata-based approach does not work with AAPT2.

Fixes: 80422287
Test: atest FieldsClassificationTest
Test: m -j update-api ExtServices

Change-Id: Ib7b626e77518e7eb4fcb88d85129cb67ed090c28
2018-07-25 17:11:56 -07:00
Julia Reynolds
4bcf9b8ac7 Improve isolation of DND providers
Specifically, a change in state from one DND provider
shouldn't result in another's state being cleared if they
aren't yet bound (or are intentionally unbound).

Fixes: 111251709
Test: cts, cts-verifier

Change-Id: I42a0ba935577e708d9df02e2a6d3620e42395a51
(cherry picked from commit 8f05600189)
2018-07-25 17:31:11 +00:00
Julia Reynolds
8f05600189 Improve isolation of DND providers
Specifically, a change in state from one DND provider
shouldn't result in another's state being cleared if they
aren't yet bound (or are intentionally unbound).

Fixes: 111251709
Test: cts, cts-verifier

Change-Id: I42a0ba935577e708d9df02e2a6d3620e42395a51
2018-07-24 09:31:01 -04:00
Julia Reynolds
4501387821 Fix migration of O DND visual effects settings
In O the settings were in the 'allow' section, not the 'disallow'
section, so the conditional needs to be reversed.

Test: runtest systemui-notification, manual
Change-Id: Icfcb328ac1d44b83b11d185be40c4ec696ebfb25
Fixes: 111313535
2018-07-18 12:38:13 -04:00
Tony Mak
dad5ef0d50 Merge "Allow NotificationAssistantService to suggest smart actions" 2018-07-11 17:32:39 +00:00
Tony Mak
628cb9368c Allow NotificationAssistantService to suggest smart actions
Here is the flow:
NAS generates Adjustment -> NMS convert this to RankingUpdate ->
SystemUI.NotificationListener receives the RankingUpdate in either
onNotificationPosted / onNotificationRankingUpdate (Depend on does NAS
provides the adjustment before the notification is en-queued) ->
NotificationEntryManager determines the need of reinflation ->
NotificationInflater inflates / reinflates the view with these
extra bits like smart actions.

Note: We do re-inflation here as simply adding a button to the existing
notification view seems problematic. For example, if the original
notification does not have any action, we will need to inflate the
template with the action container.

Screenshot:
https://hsv.googleplex.com/5731489463402496

Test: atest SystemUITests
Test: atest com.android.server.notification.NotificationAdjustmentExtractorTest
Test: Modify ExtServices to provide adjustment in
      createEnqueuedNotificationAdjustment, post a notification with
      a entity in a sample app, observed the notification is updated.
      (Testing the onNotificationPosted flow)
Test: Modify ExtServices to provide adjustment in onNotificationPosted
      by calling adjustNotification. Post a notification with
      a entity in a sample app, observed the notification is updated.
      (Testing the onRankingUpdated flow)
Test: Repeat the above test, but explicitly make the RowInflaterTask
      slow by inserting Thread.sleep. This can test the onRankingUpdated
      flow when the row is not yet inflated.

BUG: 110527159

Change-Id: I98aee3ac62f60b189ea92ac9fc000127325dfead
2018-07-11 11:12:29 +01:00
Beverly
800ca4ac0c Add boolean to check never occurring zen schedule rule validity
Bug: 111167252
Test: manual
Change-Id: If105898ae4299b1b24dfeb8476f8c35ff4b33ba4
2018-07-06 12:12:11 -04:00