Commit Graph

1548 Commits

Author SHA1 Message Date
Lucas Dupin
54ff93c6b2 Merge "Ambient wallpaper API feedback" 2018-11-29 20:44:13 +00:00
Jorim Jaggi
9a94afc6ca Merge "A brave new world for window insets (1/n)" 2018-11-29 17:14:15 +00:00
Lucas Dupin
4c8c3274da Ambient wallpaper API feedback
Making this api a @SystemApi, protecting it with a permission and
changing boolean animation parameter to a long.

Change-Id: Ife6aac2806a5590288a801751f22d85c3cfd4622
Fixes: 116117810
Test: atest DozeWallpaperStateTest
Test: atest WallpaperServiceTest
Test: set image wallpaper
Test: set AOD wallpaper that holds permission
Test: set AOD wallpaper that doesn't hold permission
2018-11-29 17:38:11 +01:00
Jorim Jaggi
f96c90ac6c A brave new world for window insets (1/n)
This CL starts a journey to discover a brave new inset world. The
path to get us there may be rocky, but it's going to be rocky.

One of the main pledges of the new API is that an app can retrieve
what is causing a certain inset easily. For that, we need to
dispatch metadata who is causing what inset, such that we can query
it from the client side.

Furthermore, the client will be able to manipulate insets directly,
but also listen to animation changes. We don't want to go through
window manager for that, thus, there needs to be a local codepath
from (global window state -> WindowInsets).

Because we have these two requirements, we dispatch the relevant
global window state for insets, represented by InsetsState, and
dispatch it to the client. On the client side we take the frame
and the InsetsState and generate WindowInsets out of it.

Bug: 118118435
Test: InsetsSourceTest, InsetsStateTest, InsetsSourceProviderTest,
InsetsStateControllerTest
Change-Id: I2bfe9dda376512916261823fc2ee35cbedeb6731
2018-11-29 13:37:43 +01:00
Tony Mak
7d4b3a5f19 Add onActionClicked in NotificationAssistantService
This is added to report clicks on actions buttons to NAS.

BUG: 119010281
Test: atest SystemUITests
Test: atest RemoteViewsTest
Test: atest NotificationManagerServiceTest
Test: Manual. Tapped on the action (both normal and contextual) and
      observed the log.

Change-Id: I381994737d8c3185d3fabf9b6c481fd01a89a634
2018-11-29 11:43:53 +00:00
TreeHugger Robot
d8a9db8486 Merge "Add interface for SMS message read for financial app mainline module." 2018-11-27 21:54:23 +00:00
TreeHugger Robot
20dbbf22b8 Merge "Add onSuggestedReplySent in NotificationAssistantService" 2018-11-27 19:51:55 +00:00
Tony Mak
2999670406 Add onSuggestedReplySent in NotificationAssistantService
This is added to report clicks on smart reply buttons to NAS.

Also refactored the code a bit by having SmartReplyView to use
SmartReplies and SmartActions object, rather than passing a long list
of arguments.

Test: atest SystemUITests
Test: Manual. Tapped on the reply and observed the log.
BUG: 111437455

Change-Id: I897fb46a304f4f7b80b2a6bc4db0ac39f6dc6e8f
2018-11-27 18:18:21 +00:00
Anton Hansson
e1d1a875a7 Fix docs build
The correct tag to use is @throws.

Test: make
Change-Id: I47260540c72bc69784e56c8768ec91fb6c53d12a
2018-11-27 13:27:31 +00:00
TreeHugger Robot
83026e5488 Merge "Introduce onNotificationExpansionChanged and onNotificationDirectReplied .. in NAS" 2018-11-27 12:21:43 +00:00
Felipe Leme
fc8b2460c3 Merge "Initial implementation of Augmented Autofill." 2018-11-27 06:46:20 +00:00
Felipe Leme
284ad1c3e2 Initial implementation of Augmented Autofill.
Augmented Autofill is a mechanism that will let a system-provided service
provide autofill suggestions when the stardand autofill can't.

Because the Augmented Autofill service is a system app, it has less restrictions
than the standard service; in particular, this service will be responsible for
drawing the autofill UI, although the framework will provide a mechanism to host
the window. Right now, it's creating a TYPE_APPLICATION_OVERLAY window in the
service process roughly below the focused view, but in the long-term it will
use the IME suggestion window to display it.

This CL provides the initial APIs and end-to-end workflow for the simplest
scenario, but it's still full of TODO's.

Test: atest CtsAutoFillServiceTestCases # to make sure it doesn't break it
Test: atest FrameworksCoreTests:SettingsBackupTest
Test: mmm -j150 packages/experimental/FillService &&\
  adb install -r ${OUT}/data/app/FillService/FillService.apk &&\
  adb shell settings put secure intel_service foo.bar.fill/.AiaiService &&\
  adb shell settings put global autofill_smart_suggestion_emulation_flags 2 &&\
  adb shell pm grant foo.bar.fill android.permission.SYSTEM_ALERT_WINDOW

Bug: 119638877

Change-Id: I8d59b4eab3e530cd89b81456681a72fdab532756
2018-11-27 05:09:06 +00:00
Hongming Jin
fa329d3d8b Add interface for SMS message read for financial app mainline module.
Test: Test will be done with the mainline module implementation of this
service.
Bug: 111207447
Change-Id: I3fdd53adbe27ff69ab98b0862e6bf2ae3e6bba77
2018-11-26 13:09:09 -08:00
Tony Mak
eda84a7b5b Introduce onNotificationExpansionChanged and onNotificationDirectReplied ..
in NAS

Also, avoid the code duplication around all the notifyAssistant* methods
by pulling out the common piece of code to notifyAssistantLocked.

Bug: 111437455
Bug: 111406942

Test: Observe logs from ExtServices when a notification is expanded
      / direct replied.
Test: atest NotificationManagerServiceTest

Change-Id: I5e135d704763ecf847f82a4ff7ffe439fa56fb5c
2018-11-26 17:05:50 +00:00
wilsonshih
81e10a7068 Support wallpaper on secondary displays.(3/N)
The launchers which running on secondary displays can set the desired
wallpaper dimensions and paddings on correct display.
Preset reasonable wallpaper size for newly added displays.
Add some error handling between the binder calls.

Note: We still only save/load wallpaper info for default display, as most of
time secondary displays are not fixed.

Bug: 115486823
Test: atest WallpaperManagerTest
Test: atest WmTests
Test: atest ActivityManagerMultiDisplayTests

Change-Id: Ifd1a96fa185f2d75825c6fe8d3db69466b31c5c8
2018-11-23 17:12:24 +08:00
TreeHugger Robot
c61363e7a2 Merge "Add detectLanguage and suggestConversationActions to TCS" 2018-11-22 11:16:30 +00:00
Chen Xu
ecfc941500 Merge "integrate carrier id to carrier config" 2018-11-22 01:22:23 +00:00
chen xu
ed7a2e1e41 integrate carrier id to carrier config
add carrierId and preciseCarrierId in CarrierIdentifier
which will be passed to carrier service to decide which carrier
info to look up

Bug: 110559381
Change-Id: I1b4a44dd32148ebdf5aa437c5938cb89656c27c2
2018-11-21 11:09:40 -08:00
Tony Mak
0be540b227 Add detectLanguage and suggestConversationActions to TCS
BUG: 111406942
BUG: 111437455

Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/TextClassifierTest.java

Change-Id: Iee9c970ebbec6590906907d67be3dd4021c1b4b2
2018-11-21 15:36:11 +00:00
wilsonshih
de93f49ae4 Support wallpaper on secondary displays.(1/N)
Extends WallpaperConnection:mEngine, mapping an engine to a display.
Handling display change events for add or remove wallpaper on secondary
display.
Only attach wallpaper on accessible display, usually WallpaperService is
third party app and cannot access private display.

Bug: 115486823
Test: atest ActivityManagerMultiDisplayTests
Test: atest WallpaperManagerTest

Change-Id: Idb6063c3cf4c8c5b854676666615e3df4e6d65f4
2018-11-21 14:46:24 +08:00
TreeHugger Robot
39a498066f Merge "Add mechanism to send assist data to a IntelligenceService" 2018-11-20 22:55:57 +00:00
Winson Chung
fbbb158da6 Add mechanism to send assist data to a IntelligenceService
- Proxy requested assist data from swipe up through the the
  IntelligenceServiceManager to AiAi for each activity that we receive
  assist data for (the AssistDataReceiver to be removed later once AiAi
  implements the new IntelligenceService interface).

Bug: 117268952
Test: Build dummy intelligence service, ensure that we get capture event
      on swipe up.

Change-Id: Iec29792932d30e94a702bd5079711c6615d0738a
2018-11-20 10:08:59 -08:00
Felipe Leme
2eadd14d5a Merge "Minor changes on IntelligenceManager APIs." 2018-11-20 00:09:31 +00:00
TreeHugger Robot
5798ef6a96 Merge "public eSIM APIs created in Android P" 2018-11-19 18:26:23 +00:00
Jordan Liu
64b4925059 Merge "Expose ApnService as a SystemApi and use subId arg" 2018-11-16 23:01:43 +00:00
Jordan Liu
d60a4c00b3 Expose ApnService as a SystemApi and use subId arg
IApnSourceService#getApns now takes a subId argument, and can be
implemented by extending ApnService.

Bug: 113075153
Test: unit tests and manual
Change-Id: I9cfcf977c20f33abd2d773393780f9e54d75fe21
2018-11-15 15:39:03 -08:00
Qingxi Li
cfb6e7be84 public eSIM APIs created in Android P
This CL public following APIs:

EuiccManager#EXTRA_FORCE_PROVISION: used to identify whether the user
wants to start eSIM activation flow in Setup Wizard or not.

EuiccService#ACTION_BIND_CARRIER_PROVISIONING_SERVICE: used to bind
carrier app to get activation code for eSIM profile downloading.

Bug: 76121595
Bug: 119234674
Test: TreeHugger
Change-Id: Iddfc98937d5aa8d049a2a483790a689f44978b07
2018-11-14 15:52:23 -08:00
Felipe Leme
6b3a55c0ba Minor changes on IntelligenceManager APIs.
Test: m -j update-api doc-comment-check-docs
Bug: 117944706

Change-Id: I6fce82e3d9ab7903d0de6c6648a0b2f31a88d956
2018-11-13 17:25:40 -08:00
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