Commit Graph

1603 Commits

Author SHA1 Message Date
Wei Sheng Shih
af7395db11 Merge "Support wallpaper on secondary displays.(7/N)" 2019-01-08 04:05:41 +00:00
Robert Carr
5fea55b2d2 Remove usage of scoped connections.
Tracking SurfaceFlinger changes. Now to construct a child surface
we need the SurfaceControl as opposed to just the surface, and so
we parcel the SurfaceControl across relayout.

Test: Manual
Bug: 62536731
Bug: 111373437
Bug: 111297488
Change-Id: I0a034767e92becec63071d7b1e3e71b95d505b77
2019-01-04 10:08:56 -08:00
Adam He
1cb6f80670 Merge app-specific and generic user data for field classification.
Bug: 118617202
Test: atest CtsAutoFillServiceTestCases
Test: atest android.autofillservice.cts.FieldsClassificationTest android.autofillservice.cts.UserDataTest

Change-Id: Ibb958e0ca790d798c7c62bce5f7dbc108041fe07
2019-01-02 13:22:18 -08:00
Mathew Inwood
31755f94e1 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

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: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 11:50:04 +00:00
wilsonshih
36597d4bd7 Support wallpaper on secondary displays.(7/N)
Expand the wallpaper color listener for multiple displays. This will
allow the launcher on the secondary display can also receive the
correct wallpaper color.

Bug: 115486823
Test: atest WallpaperManagerTest
Test: atest ActivityManagerMultiDisplayTests
Change-Id: I3d893537a8c606170b5641c9eb4683d09743d80c
2018-12-27 12:02:50 +08:00
TreeHugger Robot
da398f05af Merge "New APIs for ContentCaptureService: onConnected() and onDisconnected()" 2018-12-22 10:55:19 +00:00
Felipe Leme
bb98ed6521 New APIs for ContentCaptureService: onConnected() and onDisconnected()
Bug: 117944706
Test: atest CtsContentCaptureServiceTestCases:android.contentcaptureservice.cts.BlankActivityTest#testDisconnected
Test: atest CtsContentCaptureServiceTestCases

Change-Id: Iba3c1ae774221946a550fad95539d3a9771ae3d7
2018-12-21 15:11:49 -08:00
TreeHugger Robot
dd6ea3bf12 Merge "Users can change zen policy for system dnd rules" 2018-12-21 21:16:38 +00:00
Feng Cao
c5cd1325fc Merge "Fix augmented autofill window positioning to be right below the input field." 2018-12-21 18:57:13 +00:00
Beverly
1219670629 Users can change zen policy for system dnd rules
- Check consolidated zen policy in volume dialog, seek bar volumizer
and ZenModeControllerImpl instead of default notification policy
- Save ZenPolicy changes on restore

Test: atest ZenModeHelperTest
Test: atest ZenModeControllerImplTest
Bug: 111475013
Change-Id: I43b6dc8c6453739c50c874fe37415d425223d8c4
2018-12-21 10:57:54 -05:00
TreeHugger Robot
84cdbdfc13 Merge "Send logs to TextClassifier by calling onTextClassifierEvent in NAS" 2018-12-21 02:36:32 +00:00
Feng Cao
023b84c35f Fix augmented autofill window positioning to be right below the input field.
Test: manual verification

Bug: 120932071

Change-Id: If8fc3b78fd6240bca54035b139f44e56ddb996dc
2018-12-20 17:25:57 -08:00
TreeHugger Robot
7425194672 Merge "Moved createContentCaptureSession() to ContentCaptureSession." 2018-12-20 22:14:02 +00:00
Jiuyu Sun
023dfa28b2 Merge "Support profile policy rule as a resolvable error." 2018-12-20 21:47:44 +00:00
Felipe Leme
87a9dc9a97 Moved createContentCaptureSession() to ContentCaptureSession.
Such move will allow nested sessions. For example, WebView could create a
new session for the main page, then child sessions for IFRAMEs contained on it.

This CL changes the API and provides an initial implementation, although it's
not quite ready yet - it only allows 1 level of children (from the activity
session), but the full implementation is coming soom to a movie theather near
you...

Bug: 121033016
Bug: 117944706

Test: atest CtsContentCaptureServiceTestCases

Change-Id: I86156bb3b8a2c08cb00b9518599eb6d67fbf77c2
2018-12-20 08:59:48 -08:00
Felipe Leme
fc24beab3e Changed ContentCaptureService to receive one event at time.
The initial implementation was using a batch the events to optimize the
performance, but that can be optimize behind the scenes (i.e., we can still
send the batches in the binder, but deliver them one by one).

This change not only makes it easier for the service to use the API, but it
paves the way to implement multiple sessions (so we can buffer children events
while the parent session is not completely started yet).

Bug: 121033016
Bug: 117944706
Bug: 121051220

Test: atest CtsContentCaptureServiceTestCases

Change-Id: I713ceb998bd81733255fd3ef8d0b8d7a3fcac20c
2018-12-19 16:36:19 -08:00
Felipe Leme
b63e0ddc84 Split ContentCaptureSession in 2 classes.
This is just a refactoring for now, but it paves the way to support children
sessions.

Bug: 121042846
Bug: 117944706

Test: atest CtsContentCaptureServiceTestCases

Change-Id: I64bb5562dcfd4a9f0f69bb13009e4cf47a4f3b37
2018-12-19 16:35:59 -08:00
Holly Jiuyu Sun
881fe4c820 Support profile policy rule as a resolvable error.
Resolvable errors in the download step are present in a bit map and
returned to the calling app. The calling app can resolve all the
resolvable errors at one time.
Also pass cardId around for future use.

Bug: 68941776
Test: test on phone
Change-Id: I37a365bce2eb183161a2649ca8098504b6ed2370
2018-12-19 12:18:37 -08:00
TreeHugger Robot
9b25fa81b6 Merge "Add an API to Tile for subtitles" 2018-12-19 15:03:37 +00:00
Felipe Leme
b9687849bb Optimizes the Content Capture workflow by calling the service directly.
Initially, the ContentCaptureManager (in the app) was calling the
IContentCaptureManager (on system server) for everything, even to pass the
list of captured events, which caused 2 IPCs for each batch of events (i.e.,
from app to system_server, then from system_service to service).

This CL optimizes the workflow by getting rid of the "middle man" and sending
the events from the app to the service directly, which the system_server only
calling the service to notify when the view starts and finishes (and passing
the UID in the former so the servier can validate the sendEvents() calls).

Bug: 119220549
Test: atest CtsContentCaptureServiceTestCases

Change-Id: I6c08dccf755605320ac37cbc9424132e5455a594
2018-12-18 10:03:37 -08:00
TreeHugger Robot
be21b4a610 Merge "Support wallpaper on secondary displays.(6/N)" 2018-12-18 04:01:11 +00:00
Julia Reynolds
feb504cb66 Merge "Deprecate ConditionProviderService." 2018-12-17 21:08:55 +00:00
TreeHugger Robot
56208f49dc Merge "Another round of changes on Content Capture." 2018-12-17 17:59:40 +00:00
Julia Reynolds
68062074c6 Deprecate ConditionProviderService.
And replace it with something more battery friendly!

Test: CTS, runtest systemui-notification
Bug: 111474881
Change-Id: I45af94135fb8d2de050d5f7baaa9724b95bb1907
2018-12-17 09:13:59 -05:00
wilsonshih
8ccb9ce312 Support wallpaper on secondary displays.(6/N)
Provide an API that let the Engine get the corresponding display context.
As a result, wallpaper developers can easily get the right resources.

Bug: 115486823
Test: atest WallpaperManagerTest
Change-Id: I9ec85028331c2d2e4445b9a47ee05dc311a8e3e7
2018-12-17 13:27:21 +08:00
Felipe Leme
aa5088ede6 Another round of changes on Content Capture.
- Get rid of activity-level events.
- Renamed InteractionSessionId and InteractionContext to
  ContentCaptureSessionId and ContentCaptureContext (and made them public)
- Create the explicit concept of ContentCaptureSesssion (and moved notification
  APIs to it).
- Added APIs to let apps create new sessions (not implemented yet).
- Added APIs to remove user data based on some context properties (like URI).

The reasoning behind this change is to let app developers explicitly associate
the captured content with some app-level domain (and also let the app ask the
service to clear such data at user's request). For example, a browser app
(and WebView) can use these APIs to associate the content capture events with
the URL being rendered.

Bug: 117944706
Fixes: 121034139

Test: atest CtsContentCaptureServiceTestCases
Test: m update-api && m

Change-Id: I7841da303b6a39c825651b03a07e3081fbd0bdf5
2018-12-14 18:02:24 -08:00
Tony Mak
e94e0787db Send logs to TextClassifier by calling onTextClassifierEvent in NAS
Whenever NAS called TextClassifier.suggestConversationActions,
it will cache the notification key to result id mapping.
The result id will be used to log subsequent events related to
these suggestions.

This change should allow us to collect CTR.
TODO: Log the coverage, i.e. among all suggestConversationActions
request, how many of them actually contains some suggestions.

BUG: 120803809
Test: atest SmartActionHelperTest
Test: Manual, add a log in TextClassifierImpl.onTextClassifierEvent
1. Send a message notification
2. Expand the notification, observe event is logged.
4. Clicked on one of the replies, observe event is logged.
5. Send another message to myself
6. Inline reply it, observe event is logged.

Change-Id: I590d9bfcdb7ae7ee7976740d71bf7f1204683939
2018-12-15 08:04:15 +08:00
TreeHugger Robot
b4ee870eca Merge "Hides audibly alerted icon after 30 seconds." 2018-12-14 21:58:34 +00:00
TreeHugger Robot
a02d2ad739 Merge "Updated SmartSuggestions coordinates when focused field changed." 2018-12-14 18:18:19 +00:00
Gus Prevas
7306b90554 Hides audibly alerted icon after 30 seconds.
Bug: 116622974
Test: atest SystemUITests FrameworksUiServicesTests
Change-Id: I9074e46b5e557c7c65f601ee118dfa7e3751652a
2018-12-14 10:07:48 -05:00
Abodunrinwa Toki
37ccedcc12 Introduce TextClassifierEvent
This serves as a general TextClassifier event object for reporting
any textclassifier event and will replace the SelectionEvent class.

Example:

// Smart link clicked.
new TextClassifierEvent.Builder(CATEGORY_LINKIFY, TYPE_LINK_CLICKED)
  .setEventContext(new TextClassificationContext.Builder(
      pkgname, WIDGET_TYPE_TEXTVIEW)
      .build())
  .setEntityType(TextClassifier.EMAIL)
  .setResultId(textclassification.getId())
  .setEventIndex(0)
  .setEventTime(now)
  .setStart(0)
  .setEnd(3)
  .build();

Bug: 120837847
Test: See related cts CL
Test: atest cts/tests/tests/view/src/android/view/textclassifier/cts \
      frameworks/base/core/tests/coretests/src/android/view/textclassifier
Change-Id: Ifd84a45fc5c46ffdb200dcb9600f6a470ce792bb
2018-12-14 15:49:01 +08:00
Evan Laird
66a8e7323f Add an API to Tile for subtitles
Test: create a third party tile
Change-Id: Ibcf6bd160f7132e724dd16d8dfa45191c90fa02f
Fixes: 115292064
2018-12-13 10:34:12 -05:00
Felipe Leme
6867e7042b Updated SmartSuggestions coordinates when focused field changed.
Test: manual verification
Fixes: 120931578

Change-Id: I6a7ad2b49630a9393136d7420789677e0dcf9a6a
2018-12-12 16:20:01 -08:00
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