Commit Graph

1520 Commits

Author SHA1 Message Date
Gus Prevas
9abc50646f Adds silence toggle to notification settings.
This change modifies the UI that appears when a notification is
long-pressed to include a third option when the notification could
potentially buzz or make sound, allowing the user to promote or demote
the notification's channel such that it will not alert (or will start
alerting) for future notifications.

Test: atest SystemUITests
Bug: 116622974
Change-Id: Ia070d0ef1b181b4de8b3d49ace9ff2a65fed8deb
2018-11-09 13:19:11 -05:00
Gus Prevas
a32264906d Adds an icon to noisy notifications.
Test: manually
Bug: 116622974
Change-Id: I657e81eed9c650f1613caffaea96e6445c2105ef
2018-11-09 10:35:27 -05:00
Marcin Oczeretko
38762429f9 Fix javadoc in InteractionSessionId
Test: n/a
Change-Id: I71aa33b38d834ce2933f861127de9ff6b9c2bb6d
2018-11-07 14:20:56 +00:00
Felipe Leme
a7bdb1486e Refactored InteractionSessionId.
Rather than use a local and global id, just use a local, unique id.

Such change not only simplifies the code, but makes it consistent with
TextClassificationSessionId.

Test: mmm -j packages/experimental/FillService && \
      adb install -r ${OUT}/data/app/FillService/FillService.apk && \
      adb shell settings put secure intel_service foo.bar.fill/.AiaiService
Bug: 111276913

Change-Id: I0e610f825aab1d2b32bbafa1bd3d3c7897d889d6
2018-11-06 13:09:03 -08:00
Felipe Leme
7a53408d19 Initial implementation of IntelligenceService.onContentCaptureEvents()
It's only implementing the activity lifecycle events, but at least they're fed
end-to-end in the pipeline (from app to service implementation).

Test: mmm -j packages/experimental/FillService && \
      adb install -r ${OUT}/data/app/FillService/FillService.apk && \
      adb shell settings put secure intel_service foo.bar.fill/.AiaiService
Bug: 111276913

Change-Id: I2f46be1e6a6a21ad909e5fffea01bedaa28fb300
2018-11-06 13:02:48 -08:00
Felipe Leme
e348dc3486 Initial implementation of the IntelligenceService pipeline.
It's still full of TODOs, but at leats it now provides an end-to-end
workflow from the activity creation / destruction to the service implementation.

Test: mmm -j packages/experimental/FillService && \
      adb install -r ${OUT}/data/app/FillService/FillService.apk && \
      adb shell settings put secure intel_service foo.bar.fill/.AiaiService
Bug: 111276913

Change-Id: Id5daf7b8b51e97c74d9b6ec00f953ddb02b48e46
2018-11-06 10:01:02 -08:00
Felipe Leme
1dfa9a0195 Initial APIs for Intelligence Service.
A.K.A: "The thing's hollow — it goes on forever — and — oh my God! —
        it's full of TODOs!"

Bug: 117944706
Test: m update-api && m

Change-Id: I0774a0df4f4ea0810a8c5f72a1fbcd4eef5cd09b
2018-11-05 09:22:18 -08:00
Beverly Tai
b9bfae6401 Merge "Use consolidated zen policy for dnd" 2018-11-02 13:21:06 +00:00
Beverly
ff2df9b81b Use consolidated zen policy for dnd
Instead of using the default notification policy,
use the consolidated zen policy when do not disturb
is in priority only dnd mode

Bug: 111474881
Test: atest ZenModeHelperTest ZenPolicyTest ZenModeFilteringTest AudioManagerTest
Test: atest SystemUITests ZenModeExtractorTest
Change-Id: I88934103a56f06d4a4f620a8f557347331a79627
2018-10-29 13:11:22 -04:00
Tony Mak
41eaf64657 Remove deprecated codes around TextClassifier
Test: atest cts/tests/tests/view/src/android/view/textclassifier/cts/TextClassificationManagerTest.java
Change-Id: I291a25b6f380fce6b036107c497b19c53893620d
2018-10-29 11:47:12 +00:00
Julia Reynolds
48a6ed99f8 Additional functionality for the noti asst
- Allow apps to learn if users chose the importance of a given
channel
- Allow the asst to query channels and channel groups of installed
apps

Change-Id: Ic65dfdc79d5135940c1debb101b849b5837d78b5
Fixes: 118140597
Test: runtest systemui-notification
2018-10-22 12:52:03 -04:00
TreeHugger Robot
81dd9c3a88 Merge "Improved logging and dump on TextClassification." 2018-10-13 01:50:24 +00:00
Felipe Leme
f819213c85 Improved logging and dump on TextClassification.
Bug: 117435676
Test: adb shell dumpsys textclassification

Change-Id: I09a7bbebb38117f1be8456a0c31b74a936b1e079
2018-10-12 13:47:57 -07:00
Beverly
cf0fbcec21 CalendarTracker tracks all calendars
Now CalendarTracker will track the events of all calendars
that the current user syncs events for and has ownership
contributor or higher.

Test: runtest -x /extra/master/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ZenModeConfigTest.java
Change-Id: I898fc603c3247e6e3c560837e9eefd0a1e0dac3c
Fixes: 113368047
2018-10-05 14:55:12 -04:00
Yuzhou Jia
5d41bd2973 Merge "Add SHOW_SOURCE_NOTIFICATION to indicate that the interaction service was invoked by a notification." 2018-09-25 03:30:04 +00:00
Felipe Leme
d9dc954e8f Fixed FillCallback.onFailure() and SaveCallback.onFailure() behavior.
FillCallback.onFailure() was not working as intented - it finished the session
on AutofillManagerService, but didn't update the client state on
AutofillManager.

And both of these methods were displaying Toasts to the user, which is something
the autofill services could take care of. Hence, for services target with SDK
Q, the message is ignored.

Also added a new Autofill Metric: FIELD_AUTOFILL_MESSAGE_LEN

Test: atest CtsAutoFillServiceTestCases:android.autofillservice.cts.LoginActivityTest#testAutofillAgainAfterOnFailure
Test: atest CtsAutoFillServiceTestCases # to make sure it didn't break anything
Test: time mmm -j frameworks/base/:doc-comment-check-docs
Test: m -j update-api

Bug: 112192360
Fixes: 116103297

Change-Id: I499909200980943dedf1fc8524dd1f14b49e2158
2018-09-21 13:31:44 -07:00
Beverly Tai
672837464d Merge "Load default zen rules from xml" 2018-09-20 22:37:59 +00:00
Felipe Leme
fa30852d6f Merge "Clarified FillCallback and SaveCallback behaviors." into pi-dev am: 971ad7aa5e
am: 5529a99f42

Change-Id: Ibdee3ee359415f684b1e30223f89b7a2dfb0ca4b
2018-09-19 19:46:51 -07:00
Felipe Leme
5529a99f42 Merge "Clarified FillCallback and SaveCallback behaviors." into pi-dev
am: 971ad7aa5e

Change-Id: I3dda44262a318c277aa226321b0ed1e1dc34e6a1
2018-09-19 19:33:39 -07:00
TreeHugger Robot
971ad7aa5e Merge "Clarified FillCallback and SaveCallback behaviors." into pi-dev 2018-09-20 02:12:57 +00:00
jiayuzhou
f9f565cee7 Add SHOW_SOURCE_NOTIFICATION to indicate that the interaction service
was invoked by a notification.

Bug: 112723657.
Test: build the AOSP without issue.

Change-Id: I9f372694b264bab97ef72eb22a39136d10a36090
2018-09-19 18:03:41 -07:00
Yuzhou Jia
35339498ef Merge "Make Changes to VoiceInteraction API for supporting System checking an assistant voice action availability on AAE." 2018-09-20 01:02:44 +00:00
Felipe Leme
deff81b12b Clarified FillCallback and SaveCallback behaviors.
Test: mmm -j frameworks/base/:doc-comment-check-docs

Bug: 116103297

Change-Id: Ib397556007d1f8bf6d5d08c6bf2edf69f88b7f07
2018-09-19 13:41:22 -07:00
Beverly
f3b92d24b0 Load default zen rules from xml
Change-Id: Ic82b5d048346127847685791164f0decc8b61f92
Fixes: 114200998
Test: atest frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
Test: atest frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
2018-09-19 15:08:00 -04:00
Felipe Leme
c8c4fea61f Merge "Log when the autofill service fails a callback." 2018-09-19 17:49:09 +00:00
Felipe Leme
3ebb359229 Log when the autofill service fails a callback.
Bug: 112417431
Bug: 116103297

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

Change-Id: I2af70a3e4685693d32bab2814f60fdeb9c8b5159
2018-09-19 17:48:53 +00:00
jiayuzhou
21a353b701 Make Changes to VoiceInteraction API for supporting System checking
an assistant voice action availability on AAE.

Test: build and test on AAE.
Bug: 110587280

Change-Id: If37036e0dbe021fee9c95caf7e450330ca24ae32
2018-09-19 10:21:59 -07:00
Julia Reynolds
63048fd8c5 Merge "Reduce errors for managed services" 2018-09-19 14:13:50 +00:00
Julia Reynolds
ca8e535c93 Reduce errors for managed services
Seen in on devices with work profiles.

- Only bind the the current started user(s)
- Wrap applyEnqueuedAdjustmentFromAssistant with a try/catch
since assistant services cannot recover from it on their own.

Additionally, while debugging this rebindServices hurt my brain,
so I've split it up a bit and added comments and tests.

Test: runtest systemui-notification, device restart and log queries
Bug: 113296846
Change-Id: I19b9044ff87712f9ef5401457217156ea9fb9f1f
2018-09-18 13:47:37 -04:00
Felipe Leme
d19a7a86a2 Clarified that some autofill interfaces can only be implemented by the system.
am: df0cefab6b

Change-Id: I221bd4abb43e4865630794b103d0aeef29c6ea7f
2018-09-17 13:27:42 -07:00
Felipe Leme
7727bcc692 Minor improvement on new Q API javadocs.
Test: mmm -j frameworks/base/:doc-comment-check-docs
Bug: 112051762

Change-Id: I030c77f7f974274fea93b46390caa8b65ac97761
2018-09-14 12:24:30 -07:00
TreeHugger Robot
bf7d0cb827 Merge "Clarified that some autofill interfaces can only be implemented by the system." 2018-09-14 17:04:16 +00:00
Felipe Leme
df0cefab6b Clarified that some autofill interfaces can only be implemented by the system.
Test:  mmm -j frameworks/base/:doc-comment-check-docs

Fixes: 113323194

Change-Id: Ic0bea0e16fca0ce4c67d36f5611587843d7aad9f
(cherry picked from commit d5225e13d0)
2018-09-14 10:03:30 -07:00
Mathew Inwood
db0657a4f4 Merge "Move some members to the "Q blacklist"." 2018-09-14 13:54:28 +00:00
Beverly Tai
ba779ca7a8 Merge "Added ZenPolicyProto" 2018-09-14 13:33:58 +00:00
Mathew Inwood
8c854f86a4 Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
2018-09-14 13:18:34 +01:00
TreeHugger Robot
921f354c6c Merge "Allow listeners to reset their requested hints." 2018-09-13 21:21:32 +00:00
Beverly
ac3159fc2d Added ZenPolicyProto
Change-Id: I776c3e9a7bfaced849475e95ab680b78ec1da358
Fixes: 115370281
Test: builds
2018-09-13 14:52:17 -04:00
Beverly Tai
1f8f03b0b7 Merge "New: ZenPolicy for DND" 2018-09-13 18:39:02 +00:00
Julia Reynolds
4703bacf00 Allow listeners to reset their requested hints.
Test: cts
Bug: 79340461
Change-Id: I55a3f55d69dd47078e9a2226616d2b89434d32d8
2018-09-13 14:04:18 -04:00
Felipe Leme
d5225e13d0 Clarified that some autofill interfaces can only be implemented by the system.
Test:  mmm -j frameworks/base/:doc-comment-check-docs

Fixes: 113323194

Change-Id: Ic0bea0e16fca0ce4c67d36f5611587843d7aad9f
2018-09-13 10:21:17 -07:00
Beverly
174d741944 New: ZenPolicy for DND
Bug: 111474881
Test: atest frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ZenModeConfigTest.java
Test: atest frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ZenPolicyTest.java
Change-Id: I41809b30866ab7172dd80e0504694025f7fa3c50
2018-09-13 10:17:03 -04:00
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