Commit Graph

1736 Commits

Author SHA1 Message Date
Felipe Leme
5cb9cb529b Removed deprecated ContentCaptureEventsRequest
Test: m update-api
Test: atest CtsContentCaptureServiceTestCases

Fixes: 121051220

Change-Id: Ica14c64e59f82628c2cbe46853aa09be897d1ace
2019-02-20 22:46:24 -08:00
TreeHugger Robot
3ffadce8b9 Merge "Optimized Content Capture workflow by caching some state at the application level." 2019-02-21 05:34:34 +00:00
Felipe Leme
326f15a392 Optimized Content Capture workflow by caching some state at the application level.
Content Capture for an activity and/or package is only available when the Content Capture service
explicitly whitelists it. As the whitelist is kept at system-server level, it's better to fetch that
info when the application is started and cache it locally, so we can optimize the
ContentCaptureManager APIs to return quickly when it's disabled.

This CL also caches other values such as the buffer parameters.

Test: atest CtsContentCaptureServiceTestCases

Bug: 120494182
Bug: 121202151

Change-Id: I9d5211bca496ffa85ba9efc2a7bb32411834b787
2019-02-20 18:44:05 -08:00
Adam He
ae93a0111d Permanently and immediately binds the augmented autofill service.
Fixes: 124456706
Test: manual verification
Change-Id: I01a2035f405b9ed659412828de9ff08937bc673d
2019-02-20 17:13:02 -08:00
TreeHugger Robot
4cac1f42f0 Merge "Move TextClassifier.getLocalTextClassifier() API." 2019-02-20 16:40:21 +00:00
TreeHugger Robot
e5fbef5273 Merge "Add API comment for new API in WallpaperService." 2019-02-20 15:22:58 +00:00
Fabian Kozynski
8e804ef686 Merge "Fix Adjustment for API review" 2019-02-20 14:01:53 +00:00
TreeHugger Robot
c3ace54919 Merge "Changed ContentCaptureManager API so service can only disable itself." 2019-02-20 06:54:10 +00:00
TreeHugger Robot
9a71920b02 Merge "New Augmented Autofill APIs: onConnected() and onDisconnected()" 2019-02-20 04:04:18 +00:00
Fabian Kozynski
1d051c273c Fix Adjustment for API review
Bug: 124448813
Test: passes existing System tests
Test: CTS test
Change-Id: I86b765e32427639d43768bde9b2c6c8637902115
2019-02-19 13:36:07 -05:00
Felipe Leme
72e83d8c3d Changed ContentCaptureManager API so service can only disable itself.
To re-enable, it will need to launch a Settings intent
(Settings.ACTION_REQUEST_ENABLE_CONTENT_CAPTURE).

Bug: 123286662
Test: atest CtsContentCaptureServiceTestCases

Change-Id: I0dd03013aba645c188af4034e530492d8294180e
2019-02-19 09:29:14 -08:00
wilsonshih
fd058f6121 Add API comment for new API in WallpaperService.
Supplement some comment to let developer know how to use new API
WallpaperInfo#supportsMultipleDisplays.

Also add a nullability annotation and comment for
WallpaperService.Engine#getDisplayContext.

Fix: 124302009
Fix: 123661589
Test: Build pass and read comment.

Change-Id: Id6040eff12495838f21f539b7c68d6743c9baf74
2019-02-19 20:57:21 +08:00
Felipe Leme
e8eae9d420 Initial implementation of ContentCaptureService.setContentCaptureWhitelist()
For now it only whitelists packages, not activities.

Test: atest CtsContentCaptureServiceTestCases

Bug: 122595322

Change-Id: I5beb9b027eb704510e68f3af15e84e14bda07eb2
2019-02-15 20:00:49 -08:00
Julia Reynolds
fd2ec469ed Merge "Fix API errors" 2019-02-15 18:47:06 +00:00
Julia Reynolds
79f0277f29 Fix API errors
APIs that were @SystemApi in the last release cannot be changed.

Test: atest CtsSystemApiSignatureTestCases
Bug: 124209375
Change-Id: I631b7dea09e723f509581f82a85da99344b42a09
2019-02-15 11:38:48 -05:00
TreeHugger Robot
3a5211e744 Merge "Changed ContentCaptureService.setContentCaptureWhitelist() to use Set instead of List." 2019-02-15 04:20:23 +00:00
Felipe Leme
f3d317c80d New Augmented Autofill APIs: onConnected() and onDisconnected()
Test: m update-api # they're not implemented yet
Bug: 124456706

Change-Id: Ia313b093178204bf7ddc2c6bd664c3c840b0ed5a
2019-02-14 14:30:02 -08:00
Felipe Leme
7a3c9f5324 Changed ContentCaptureService.setContentCaptureWhitelist() to use Set instead of List.
(Same for Augmented Autofill)

Bug: 122595322
Test: m update-api

Change-Id: I6753ce2567801da148682c0ccbad7f6abc4d1ecc
2019-02-14 14:13:56 -08:00
James O'Leary
08211297cf Merge "Encapsulate state & transcription in hints bundle" 2019-02-14 21:25:24 +00:00
TreeHugger Robot
1df6e435b0 Merge "Removed unused APIs." 2019-02-14 16:51:29 +00:00
Felipe Leme
0552f41c4e Merge "Add new ContentCapture APIs to let apps change the ContentCaptureContext." 2019-02-14 15:26:27 +00:00
James O'Leary
9c9dd98ee0 Encapsulate state & transcription in hints bundle
Continuation of ag/6226654; edits made per Svetoslav's last comments.

Bug: 122740752
Bug: 123080754
Test: blueline-userdebug build completes successfully.

Change-Id: I3e43137eb6e0d8cae77e14d331150d5a05ede07c
2019-02-14 15:24:08 +00:00
Felipe Leme
3f1e2318e6 Removed unused APIs.
Plus fixed a few minor TODOs.

Test: atest AugmentedLoginActivityTest
Test: m update-api

Bug: 122654591
Fixes: 123233342

Change-Id: Ie5040077255ffab8fee019ca6a0a122fe9f2e03d
2019-02-13 13:21:27 -08:00
Amin Shaikh
c3f0b06ccc Update notification layouts when overlays change.
- Use the overlay directories specified in the ApplicationInfo retrieved
from PackageManager. The resources directories cached in LoadedApk in
ActvityThread may contain stale values for remote applications.
- Clear StatusBarNotification#mContext when overlays change to ensure
that the Resources for remote Contexts are not stale. These Contexts
will be recreated in the subsequent AsyncInflationTask.

Bug: 120987987
Test: mp core sysuig; change theme using theme picker
Change-Id: I100d164facdd4208610ee6409dd3868d6f304712
2019-02-13 15:34:27 -05:00
Jordan Liu
c30d7ced2f Merge "Add UNINITIALIZED and rename INVALID" 2019-02-13 17:49:50 +00:00
Abodunrinwa Toki
324572e747 Move TextClassifier.getLocalTextClassifier() API.
In the future, we think the TextClassifier is going to run in an
external process. This CL moves the getLocalTextClassifier() API so
that we don't have to guarantee this to apps.
OEMs implementing TextClassifierServices however will want access to
this API so this CL effectively moves the the API from where apps
typically look for a TC (we prefer apps to call getTextClassifier()
instead) to where TCS implementations are most likely to be accessing
such APIs. The method is also renamed appropriately to what it will be
long term (i.e. the default TC implementation rather than as the local
TC).

Bug: 123681286
Test: atest core/tests/coretests/src/android/view/textclassifier
Test: atest cts/tests/tests/view/src/android/view/textclassifier/cts
Test: adb shell am instrument -w -e class android.textclassifier.TextClassifierPerfTest com.android.perftests.core/androidx.test.runner.AndroidJUnitRunner
Change-Id: I685e2b5263ffddbe301256fc2ed0d6254c3357ed
2019-02-12 20:56:58 +00:00
Felipe Leme
4eecbe6e3c Add new ContentCapture APIs to let apps change the ContentCaptureContext.
Test: atest CtsContentCaptureServiceTestCases:android.contentcaptureservice.cts.LoginActivityTest#testSimpleLifecycle_changeContextOnCreate \
   CtsContentCaptureServiceTestCases:android.contentcaptureservice.cts.LoginActivityTest#testSimpleLifecycle_changeContextAfterCreate
Test: atest FrameworksCoreTests:android.view.contentcapture.ContentCaptureEventTest

Bug: 124266664

Change-Id: I0348e81e1b2bac01363cf615d2ab32e5bab8aee1
2019-02-12 11:31:06 -08:00
Felipe Leme
6ca8ee7bff Fixed @deprecated message:
Test: not really
Bug: 121051220

Change-Id: I151b44a3e113707e6b156d53736d891350b47d9c
2019-02-12 10:23:02 -08:00
Tony Mak
84c8c2a2aa Merge "Add TEST_MAPPING to textclassifier" 2019-02-11 20:47:46 +00:00
Tony Mak
128a61df90 Add TEST_MAPPING to textclassifier
Setup presubmit for textclassifier by using TEST_MAPPING.
We will get a dashboard for the test result as well.

Also fixed a few broken tests found by this CL.

BUG: 124041915

Test: atest --test-mapping frameworks/base/core/java/android/service/textclassifier/TEST_MAPPING

Change-Id: I0c516ea8699d7e94cfabd2ea98ebad58505c7e90
2019-02-08 17:52:27 +00:00
Jordan Liu
cb47d1dcc7 Add UNINITIALIZED and rename INVALID
UNINITIALIZED_CARD_ID is for before the card ID is ready.
INVALID_CARD_ID is renamed to UNSUPPORTED_CARD_ID and it is used if the
card ID is known to be unsupported.

Bug: 122978614
Test: atest UiccControllerTest
Change-Id: Ia2315d9b38ef35b30d9b96b6436c08fa4404e4df
2019-02-07 16:42:11 -08:00
Michael Wright
ebc78db8e1 Merge "Instrument wake up reasons." 2019-02-06 23:37:05 +00:00
TreeHugger Robot
afe584a166 Merge "fix documentation for the non-final version of dump() in AugmentedAutofillService" 2019-02-06 20:05:41 +00:00
Makoto Onuki
db7d1c98a4 Merge "Rename SmsAppService to CarrierMessagingClientService" 2019-02-06 17:01:38 +00:00
Julia Reynolds
7f52f4a051 Merge "Add settings for notification bubbling" 2019-02-06 13:41:43 +00:00
Michael Wright
e3001042b6 Instrument wake up reasons.
This lets us run experiments that need to know the reason for the wake
up in addition to the time and latency.

Bug: 122949636
Test: manually turning the device on and off, looking at the logs
Change-Id: I38429c3387a289010e1a2696ad351ffbe568413b
2019-02-06 12:54:00 +00:00
Feng Cao
3b24ef0599 fix documentation for the non-final version of dump() in AugmentedAutofillService
Fixes: 123927351
Test: mmm frameworks/base/:doc-comment-check-docs
      m update-api

Change-Id: Ie4f4d527d6b7a6804de62d212085c0e7d2e651a7
2019-02-05 17:24:11 -08:00
Julia Reynolds
4509ce731c Add settings for notification bubbling
And a new api to consolidate that information for notification
listeners

Test: atest
Bug: 123543052
Change-Id: I61d1718ef5b5bb8ab824d4c3efff511669266313
2019-02-05 08:47:16 -05:00
Felipe Leme
19652c0c27 Made ContentCapture APIs available for testing.
Test: atest CtsContentCaptureServiceTestCases
Test: m update-api

Bug: 123584359
Bug: 119187075

Change-Id: I4ece03de6c7994451dbb9d0ce36d37f20656d3e0
2019-02-04 21:09:16 -08:00
TreeHugger Robot
1a9862c9da Merge "Removed the Content Capture blacklist APIs." 2019-02-04 23:04:48 +00:00
Makoto Onuki
05d64cbc41 Rename SmsAppService to CarrierMessagingClientService
Also rename the permission and the intent action.

Change-Id: I366a136556a42db1eb657dfb8e797ec22b67a5ba
Fix: 123661399
Test: atest CtsAppBindingHostTestCases
2019-02-01 16:10:05 -08:00
Beverly Tai
131ffc4b92 Merge "Use default zen policy's callers/messages" 2019-02-01 21:10:15 +00:00
Beverly
877d5193c4 Use default zen policy's callers/messages
Change-Id: I57674466af56cc45aa28b72bd6b346f3e0a1555c
Fixes: 123406095
Test: atest ZenModeConfigTest
2019-02-01 14:14:09 -05:00
James O'Leary
596708b973 Only selected VoiceInteractionService can call methods
- Extract current code for checking caller into a private method
- Replace occurrences of that code with a call to the private method
- Add method call to setTranscription/clearTranscription/setVoiceState

Test: Verified Milford can't call setTranscription/clearTranscription
when it is no longer the active service.
Bug: b/123412646

Change-Id: I2c428c6c65b62f6a83264286df4f44fb5d1c249e
2019-02-01 02:21:58 -05:00
Felipe Leme
3186bcdeda Removed the Content Capture blacklist APIs.
We'll initially implement just the whitelist ones...

Bug: 122595322

Test: m update-api
Test: atest CtsContentCaptureServiceTestCases

Change-Id: I403716905d429abb2e1cb4085c838706226e9969
2019-01-31 18:08:20 -08:00
Peiyong Lin
a0baea28b7 Merge "Replace createHardwareBitmap with wrapHardwareBuffer." 2019-01-31 15:37:56 +00:00
TreeHugger Robot
e2841c523b Merge "Fix comments in AttentionService result consts" 2019-01-31 01:52:36 +00:00
Matt Casey
f984e58cc8 Merge "Remove enumerated voice states." 2019-01-30 23:26:07 +00:00
Peiyong Lin
9d4274005e Replace createHardwareBitmap with wrapHardwareBuffer.
The bitmap.createHardwareBitmap doesn't take a ColorSpace as input, as a result
the returned bitmap is always in SRGB color space. Given that we want to remove
the assumption of SRGB color space, we replace the usage of
createHardwareBitmap with wrapHardwareBuffer which takes an extra argument
ColorSpace. As a result, we will be able to also fix SurfaceControl and various
other places that use screenshot in follow up patches.

BUG: 120904891
Test: CtsUiRenderingTestCases
Change-Id: I57fc0c85d68df43b0e69f9a1ebac00d2ba39554d
2019-01-30 15:22:54 -08:00
Alex Salo
7ce945bea5 Fix comments in AttentionService result consts
Test: not needed, javadoc comment change only
Bug: 111939367

Change-Id: I72a3b0d406a5bacc75651617c6505817e7e03693
2019-01-30 14:50:52 -08:00