Commit Graph

1570 Commits

Author SHA1 Message Date
Chen Xu
b21a629f0b Merge "expose Carrier Id related APIs" 2018-12-12 18:02:52 +00:00
Adrian Roos
e77ff79fdb Merge "API: Clean up redundant and ineffective usages of SystemApi and TestApi" 2018-12-12 13:43:34 +00:00
TreeHugger Robot
7fed87622e Merge "Fixed 2 Augmented Autofill issues:" 2018-12-12 00:10:41 +00:00
TreeHugger Robot
61b6eb9127 Merge "Updates to Adjustment.KEY_IMPORTANCE handling" 2018-12-11 23:25:32 +00:00
Felipe Leme
b49208df9a Fixed 2 Augmented Autofill issues:
- NPE when FillCallback.onSuccess is invoked with null FillResponse.
- Updated AutofillProxy properties when field focused again.

Test: manual verification

Fixes: 120788613
Fixes: 120854842

Change-Id: I6d614c11afa501eba88e3d62334cfd4dd4624f79
2018-12-11 13:25:32 -08:00
Adrian Roos
66f859135b API: Clean up redundant and ineffective usages of SystemApi and TestApi
Everything that is marked SystemApi or TestApi, but not @hide is still
part of the public SDK, it is therefore not sound to have that combination.

In the future, specifing such a combination will be considered an error
to prevent inadvertently exposing SystemApi and TestApi as public API.

Bug: 115333477
Change-Id: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Test: METALAVA_PREPEND_ARGS="--error UnhiddenSystemApi" m checkapi
Exempt-From-Owner-Approval: API cleanup
2018-12-11 20:38:02 +01:00
chen xu
d47a06836c expose Carrier Id related APIs
1. expose public API for preciseCarrierId and preciseCarrierIdName
2. expose public API for carrier id in CarrierIdentifier
3. New public broadcast for precise carrier identity changed
4. clean up

Bug: 110559381
Test: unit test & atest CtsTelephonyTestCases:TelephonyManagerTest
Change-Id: I18f8bc3252632bba699829c6c577d1041335fee9
2018-12-11 11:28:49 -08:00
Adam He
52c748d541 Merge "Added new API to set field classification algorithms per category." 2018-12-11 18:59:35 +00:00
Julia Reynolds
27c0a96cb5 Updates to Adjustment.KEY_IMPORTANCE handling
- Do not run signal extractors on enqueued notifications - the
assistant isn't told that information and the information that
the extractors base their decisions on it's final. Instead,
extract signals in the post runnable, before the sort/before we
generate the notification update for listeners

- Ignore importance adjustments sent from onNotificationEnqueued
that arrive after the notification was posted, because it's too
late to cancel the notification or silence it.

- Also fix a bug in the handling of importance adjustments
that are sent via adjustNotification: *listen* to the comment that says
'any field that can be changed in an extractor needs to be handled
in handleRankingSort'

Change-Id: I1603d6c5701fcc16f038231e22e21565dd366572
Fixes: 120601946
Test: atest, manual
2018-12-11 13:49:47 -05:00
Adam He
97e2b2a6a1 Merge "Add support for app specific field classification." 2018-12-10 21:44:24 +00:00
Adam He
71d53e0cc8 Added new API to set field classification algorithms per category.
Originally one field classification algorithm was used to classify every
field. The change allows different category of fields to be classified
by different field classification algorithms.

Change-Id: I27205a4096774d6e0c0d56da5e0fd38dda995d8f
Fixes: 118681526
Test: atest CtsAutoFillServiceTestCases
Test: atest android.autofillservice.cts.FieldsClassificationTest
2018-12-07 14:41:56 -08:00
Feng Cao
010b993ee0 Fix augmented autofill UI.
Test: manual verification

Bug: 120559640

Change-Id: Ifa6df41945c38e6fbb9a0505b66be50cb202337c
2018-12-06 22:32:49 -08:00
Felipe Leme
749b889889 Yet another (major) refactoring on Content Capture and Augmented Autofill.
Bunch of changes:

- Split public SmartSuggestionsService info ContentCaptureService and
  AugmentedAutofillService
- Renamed 'intelligence' packages to either 'contentcapture' or
  'autofil.augmented'
- Renamed internal packages and classes.
- Changed permissions, resource names, etc...
- Moved Augmented Autofill logic from IntelligeceManagerService (R.I.P.) to
  Autofill.
- Optimized IPCs by passing a String instead of the InteractionSessionId
  (that also solves the view -> service dependency).

Test: atest CtsContentCaptureServiceTestCases \
            CtsAutoFillServiceTestCases \
            FrameworksCoreTests:SettingsBackupTest
Test: manual verification with Augmented Autofill Service

Bug: 119638877
Bug: 117944706

Change-Id: I787fc2a0dbd9ad53e4d5edb0d2a9242346e4652d
2018-12-06 16:56:39 -08:00
Felipe Leme
bf93cdcb91 Few improvements on Augmented Autofill.
- Send the initial value of the focused field, so the service can decide whether
  or not to display the autofill UI if it's not empty.
- Log how long it took for the service to handle the request and to hte system
  to render the UI.
- Use CloseGuard to make sure the UI is properly destroyed.

Bug: 120303290
Bug: 119638877

Test: manual verification

Change-Id: I7abed10c0915ff9a2deddb488c70e1491cdbd480
2018-12-05 08:49:25 -08:00
Felipe Leme
d830ca25a1 Merge "Refactored AbstractRemoteService in 2 classes." 2018-12-04 06:26:49 +00:00
TreeHugger Robot
8dfdd61718 Merge "Add checkable two target preference layout" 2018-12-04 00:42:00 +00:00
Felipe Leme
39233ff029 Refactored AbstractRemoteService in 2 classes.
AbstractRemoteService was spun off from RemoteFillService, which only supports
1 pending request while not bound to the service - if a new request comes,
it cancels the previous one.

This behavior is fine for Autofill, but for Content Capture all requests must be
queued. In fact, the upcoming CTS tests for Content Capture were failing because
the 1st PendingOnContentCaptureEventsRequest would cancel the pending
PendingSessionLifecycleRequest.

So, this CL fix this problem by creating 2 subclasses:
 - AbstractSinglePendingRequestRemoteService
 - AbstractMultiplePendingRequestsRemoteService

Test: atest CtsContentCaptureServiceTestCases CtsAutoFillServiceTestCases

Bug: 111276913
Bug: 117779333

Change-Id: I43bb98be16f5def037f85a415e1f77799adf156e
2018-12-03 15:29:07 -08:00
Felipe Leme
ecb08be22e Split IntelligenceManager / IntelligenceService.
This name is too generic, so we split it in 2 parts:

- ContentCaptureManager: the public API used by views and apps to report their
  structure.
- SmartSuggestionsServiec: the system service use to consume these events and
  provide autofill suggestions.

This CL also:

- Optimizes ContentCaptureManager allocation so they are not created on contexts that are not
  capturing events (such as views from the system server).
- Uses a generic ContentCaptureEventsRequest (rather than a list of events) to make it easier
  to be extended.
- Fixed IntelligencePerUserService so it clears the sessions when the
  implementation changes.

Test: manual verification

Bug: 119776618
Bug: 117944706
Bug: 119638877

Change-Id: I069bcd23dda94afe18b2781fd3981b8b555afa56
2018-12-03 15:29:07 -08:00
Beverly
9cb05c9546 Add checkable two target preference layout
Test: atest NotificationManagerTest
Bug: 111475013
Change-Id: I2b0fe3e33eb4d8da486d57faca0d0fe711d51445
2018-12-03 14:16:06 -05:00
Andrew Scull
d968016172 Merge "Complete OemLockService API." 2018-12-03 17:43:51 +00:00
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
Andrew Scull
23a1a5f4e1 Complete OemLockService API.
The API was missing a call to query the name of the HAL which is used to
identify the security protocol in use. The API also didn't conform to
the documentation in a few cases.

Bug: 120078865
Test: gts-tradefed run gts -m GtsOemLockServiceTestCases
Change-Id: Ib1ec06f99bbe21710d4d8f61252d6431ffab51a6
2018-11-28 17:31:53 +00:00
Adam He
2cc31467c2 Add support for app specific field classification.
Change-Id: I03e597235f66bf53fd4af39760f0d1136c7da48b
Fixes: 118617202
Test: atest CtsAutoFillServiceTestCases
Test: atest android.autofillservice.cts.FieldsClassificationTest
2018-11-27 14:33:29 -08: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