Commit Graph

2873 Commits

Author SHA1 Message Date
Julia Reynolds
47fe65234f Merge "Allow apps to migrate NLS filter settings" into sc-dev 2021-04-05 13:30:57 +00:00
Julia Reynolds
0e36d959d0 Allow apps to migrate NLS filter settings
On a per user vs manifest wide basis.

Test: atest, cts-verifier
Bug: 184027330
Change-Id: Iae591765e410e360f289692bac012a1f26574add
2021-04-02 17:04:58 +00:00
Yi Jiang
48c52c219e Merge "Fixes javadoc in RotationResolutionRequest" into sc-dev 2021-03-31 20:31:05 +00:00
Yi Jiang
1cc42bb371 Fixes javadoc in RotationResolutionRequest
Bug: 182914734
Test: None

Change-Id: Ic1af4033d8555a314214c238894ff01113c7822e
2021-03-31 10:54:40 -07:00
Ahaan Ugale
845e86b61b Merge "Fix HotwordDetectedResult phrase and extras." into sc-dev 2021-03-30 20:41:19 +00:00
Jay Aliomer
3bff4d5edc Merge "Add null checks in wallpaper service" into sc-dev 2021-03-30 19:45:55 +00:00
Jay Aliomer
32e5de029d Add null checks in wallpaper service
Fixes: b/183406113
Fixes: b/183196002
Fixes: b/181557891
Test: WallpaperServiceTest
Change-Id: I62fd71cd99d53ed63ee0a334e1c8daf7f90a4a6b
2021-03-30 19:43:15 +00:00
chaviw
2e605fd668 Add throttling to generateDisplayHash
Calling generateDisplayHash can cause the system to slow down if there
are too many requests. Add throttling logic to prevent apps from calling
the API too frequently. The throttling time is based on a value sent
from ExtServices so it can be adjusted later

Test: DisplayHashManagerTest
Bug: 155825630
Change-Id: Id49d1c4113fc65d7b73a1e7b9fc73f50a8d7041f
2021-03-29 15:54:37 -05:00
lpeter
6f2a263810 Add callback to report HotwordDetectionService status
Bug: 182788844
Test: Test: atest CtsVoiceInteractionTestCases
Test: atest CtsVoiceInteractionTestCases --instant
Change-Id: I12f0a265fc4fce0bbfe0983f39b4dcd947e3cf64
2021-03-29 17:41:24 +08:00
Ahaan Ugale
9ea331f06d Fix HotwordDetectedResult phrase and extras.
Requiring hotword phrases to be listed in the manifest is punted to T.
A simple limited phrase ID is used for now.

Use PersistableBundle for the extras so that remotable objects cannot be
passed through it.

Bug: 182788844
Bug: 168305377
CTS-Coverage-Bug: 183425641
Test: builds
Change-Id: I9c1472b586f737788cc10d8dd7e023f348763392
2021-03-28 14:31:24 -07:00
Sergey Volnov
baceb11e71 Introduce the concept of software and external hotword.
Follow-up: implement circular buffer and integrate with the flows.

Bug: 182788844
Bug: 168305377
CTS-Coverage-Bug: 183425641
Test: atest CtsVoiceInteractionTestCases
Change-Id: I654a06afb27bb961bfb547a6636e08eb72a031fc
2021-03-26 00:10:44 -07:00
Alex Buynytskyy
f8d0c5584e Merge "Making the rest of Streaming installation API public." into sc-dev 2021-03-25 23:58:06 +00:00
Alex Buynytskyy
8e3eeb507a Making the rest of Streaming installation API public.
Something was left behind when we opened the installation API.

Bug: 152310230
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: Ia2d4c3f3e97c8432fcca094d6e0f4e97dcc048d4
2021-03-25 14:52:33 -07:00
Zimuzo Ezeozue
3244637a97 Merge "Address onAnrDelayStarted API comments" into sc-dev 2021-03-25 19:35:47 +00:00
Zim
308a048787 Address onAnrDelayStarted API comments
Test: m
Bug: 183446229
Change-Id: I433096c9fdc003b777f8a280f13f675a2d7ea8bf
2021-03-25 16:15:36 +00:00
TreeHugger Robot
d5dc9e47a4 Merge "Unhide api for setHotwordDetectionServiceConfig" into sc-dev 2021-03-25 03:49:32 +00:00
Sergey Volnov
f4df342133 Merge "Enhance AlwaysOnHotwordDetector.EventPayload with more fields." into sc-dev 2021-03-24 23:28:11 +00:00
Nikita Dubrovsky
f5386796a8 Merge "Fix debug logcat message in AugmentedAutofillService" into sc-dev 2021-03-24 22:36:20 +00:00
Nikita Dubrovsky
32d4a839bd Fix debug logcat message in AugmentedAutofillService
Bug: 161549032
Test: Presubmit only
Change-Id: I81a2535717ded43a30ffccce5f2bf310ce736f07
2021-03-24 11:02:11 -07:00
Ahaan Ugale
a451a40f95 Add AutofillService#onSavedDatasetsInfoRequest.
System settings will use this to display the number of saved passwords
in each AutofillService available on the device.

The API supports some flexibility to make it easier to support a
different settings UX in the future.

Bug: 169455298
CTS-Coverage-Bug: 183499221
Test: manual - check the result displayed in settings
Change-Id: I13dd2f06dad18cfe8ef5de9b44854e44ac8d7365
2021-03-24 08:27:56 -07:00
Sergey Volnov
a3f9ee62e5 Enhance AlwaysOnHotwordDetector.EventPayload with more fields.
This will eventually support a more flexible information handling:
passing HotwordDetectedResult and audio stream directly from the server.

Bug: 182788844
Bug: 168305377
CTS-Coverage-Bug: 183425641
Test: N/A committing data class, will test e2e
Change-Id: Ie97723c113bced3046a1d2a652a95f94399399be
2021-03-24 08:35:11 +00:00
lpeter
247d69aa7e Unhide api for setHotwordDetectionServiceConfig
We also changed API from setHotwordDetectionServiceConfig
to updateState.

Bug: 182951186
CTS-Coverage-Bug: 183425641
Test: Test: atest CtsVoiceInteractionTestCases
Test: atest CtsVoiceInteractionTestCases --instant
Change-Id: I29ed0736f9502d3ac5a29ea26a8386bce7113e54
2021-03-24 16:34:44 +08:00
Ahaan Ugale
8f02ccf5dc Merge "Allow HotwordDetectionService to return HotwordRejectedResult." into sc-dev 2021-03-23 21:58:59 +00:00
TreeHugger Robot
20e5c931b5 Merge "Use the PersistableBundle instead of the Bundle" into sc-dev 2021-03-23 21:42:26 +00:00
Joanne Chung
dd0224162c Add API to get the PendingIntent for translation settings Activity
Bug: 176208267

Test: manual test with sample app
Test: atest CtsTranslationTestCases

Change-Id: I00416cf9cb63d522b9d8a448be3533b89b753aa0
2021-03-23 23:51:46 +08:00
Adam He
476e44e1f9 Merge "Add API for TranslationContext" into sc-dev 2021-03-23 05:12:29 +00:00
lpeter
58f920e023 Use the PersistableBundle instead of the Bundle
It will be more secure to use PersistableBundle
instead of Bundle for passing the configrations
data from VoiceInteractor to HotwordDetectionService.

Bug: 176938300
Test: Test: atest CtsVoiceInteractionTestCases
Test: atest CtsVoiceInteractionTestCases --instant
Change-Id: I19a412cca5e2cd5f9f79a112a9d7da8fd3a00a38
2021-03-23 12:32:25 +08:00
Ahaan Ugale
8151b18c52 Allow HotwordDetectionService to return HotwordRejectedResult.
This is simply passed through the system to the AlwaysOnHotwordDetector.

Bug: 182788844
Bug: 168305377
CTS-Coverage-Bug: 183425641
Test: builds
Change-Id: I2b7147b330051d870bfe970e9b5e16aaab52e9bc
2021-03-22 13:48:23 -07:00
Adam He
7c3a6e37a2 Add API for TranslationContext
* TranslationContext holds source/dest specs, replacing spec pairs in
methods.
* TranslationCapability holds information on the translation models, as well
as a helper method to generate a TranslationContext for creating
translators.
* TCapability is meant to hold information about the translation models, and
provide information/flag on what the translator can support, versus the
TContext which will indicate exactly which supported flags should be
used and activated by the models.
* Added TM.getTranslationCapabilities, and add/remove TCapabilityUpdateListener

Bug: 176208267
Test: atest CtsTranslationTestCases
Change-Id: I2ab7a3eadcbbc9e13f8f33bf9c51cda69f30fdb7
2021-03-22 11:38:50 -07:00
Beverly
8652e483b0 Next alarm is definitive info from clock
Even if the next alarm is further in the future than the alarm on the
ScheduleCalendar, update the next alarm b/c this means that our current
nextAlarm is old info

Test: atest ScheduleCalendarTest
Test: manual
  1. enable DND that ends at alarm
  2. create an alarm that goes off in 5 min
  3. change alarm to go off in 11 min
  4. in the 6 minute difference, notice that DND is still on and didn't
  end earlier than execpted.
Fixes: 181665547
Change-Id: Ieb2fc7269c4a9b1bc109941d16ce191012d338c4
2021-03-22 10:29:54 -04:00
Julia Reynolds
b7eee43f50 Merge "Provide more specific notification cancelation reasons" into sc-dev 2021-03-22 02:08:10 +00:00
Adam He
2e43f72bf1 Merge "Implement TranslationCallback with support for partial responses." into sc-dev 2021-03-21 09:45:33 +00:00
Julia Reynolds
972df6e950 Provide more specific notification cancelation reasons
For S+ apps

Test: CTS
Fixes: 175319604
Change-Id: I836b6632007224381a181add54e3c36a39466d4b
Merged-In: I836b6632007224381a181add54e3c36a39466d4b
2021-03-20 02:05:06 +00:00
Adam He
ff092aae1a Implement TranslationCallback with support for partial responses.
Translator#translate() is also updated to be asynchronous with callback
instead.

Bug: 178651352
Test: atest CtsTranslationTestCases
CTS-Coverage-Bug: 178651352
Change-Id: Ibe1f97994fe6ee593a3a3bbb452c075b49a7eb5a
2021-03-19 14:58:47 -07:00
Nicolò Mazzucato
11bc52ed42 Merge "Always call onHandleAssist with AssistState containing at least activity id" into sc-dev 2021-03-19 13:34:18 +00:00
TreeHugger Robot
4c460aca40 Merge "Defined trigger result structures for positive / negative hotword triggers." into sc-dev 2021-03-19 11:24:29 +00:00
Sergey Volnov
b481d8c8f7 Defined trigger result structures for positive / negative hotword
triggers.

CTS-Coverage-Bug: 182788844
Bug: 168305377
Test: N/A committing data classes.
Change-Id: I9838d569b7cd4868d4b319a6c627f9215c71a489
2021-03-18 23:37:59 +00:00
Nicolo' Mazzucato
bbc1459cf0 Always call onHandleAssist with AssistState containing at least activity id
With this change, even if clients are not requesting any assist
data (e.g. VoiceInteractionSession.showSession is called with 0
as flags), Activity's `onHandleAssist(AssistState)` is always
called with non-null ActivityId. If no other data were requested,
AssistContent, AssistData and AssistStructure inside
VoiceInteractionSession.AssistState are null.

The previous behaviour was that if no assistData were requested,
Activity's `onHandleAssist` would not have been called.

This new behaviour saves time to clients interested only in ActivityIds,
because no activities methods need to be called (to get AssistData and
AssistContent).

We are not adding a new flag "SHOW_WITH_ACTIVITY_ID" because this
ActivityId is always non-null in ActivityState, and it's cheap to get it.

Bug: 178020517
Test: atest CtsAssistTestCases
Test: atest CtsVoiceInteractionTestCases
Change-Id: Icb46a928c8508a4bd355622df78f9371c21fd0e6
2021-03-18 20:14:36 +00:00
Julia Reynolds
18417de2c5 Merge changes I5a807bbb,Icc3dd959 into sc-dev
* changes:
  Add an intdef
  Fix contrast issues in channel blocking ui
2021-03-18 13:49:05 +00:00
TreeHugger Robot
3be701e767 Merge "Only allow preinstalled application to be able to call setHotwordDetectionServiceConfig" into sc-dev 2021-03-18 08:24:21 +00:00
TreeHugger Robot
c49aefef55 Merge changes from topic "aff_inline_tooltip-sc-dev" into sc-dev
* changes:
  Implement inline suggestion tooltip
  Add interface for the inline suggestion tooltip
2021-03-18 04:32:15 +00:00
Julia Reynolds
039f924455 Add an intdef
Test: make
Fixes: 176822079
Change-Id: I5a807bbbb89a7bd07d7d46c792b9e2199201713a
2021-03-18 01:31:58 +00:00
TYM Tsai
2901b78aaa Add interface for the inline suggestion tooltip
The inline suggestion tooltip is used to show some descriptions for a
specific inline suggestion to let the user easily understand the
suggestion and promo the suggestion. Or educates the user how to
operate the inline strip.

The patch defines some APIs to enable the suggestion provider to
conveniently provide tooltips for the user.

Bug: 172024354
Test: atest CtsAutoFillServiceTestCases:InlineTooltipTest
Change-Id: I5b0fc481b7352da2804f0e4f4633f1698a69109b
2021-03-18 09:12:23 +08:00
lpeter
b787d41387 Only allow preinstalled application to be able to call setHotwordDetectionServiceConfig
We added a new permission "MANAGE_HOTWORD_DETECTION" to allow
the application that held this permission to be able to use
setHotwordDetectionServiceConfig functions.

In order to avoid the feature leakage, we submit the change
about Shell in internal branch.

Bug: 178346114
Test: atest CtsVoiceInteractionTestCases
Test: atest PermissionPolicyTest
Change-Id: I8829c3c389fb5fe4b06ffcf21870db50fa2ede4b
2021-03-17 19:37:16 +08:00
Neil Fuller
e85b1a6c5e Merge "Improve docs for onStartUpdates / onStopUpdates" into sc-dev 2021-03-15 20:24:13 +00:00
Chavi Weingarten
1227084212 Merge "Add DisplayHashParams to specify how to generate display hash" into sc-dev 2021-03-15 17:07:01 +00:00
Neil Fuller
4bc11722e8 Improve docs for onStartUpdates / onStopUpdates
Improve docs for onStartUpdates / onStopUpdates, expanding on what
implementations are expected to do.

Bug: 179829144
Test: build only
Change-Id: I8fedfee4988cd7f37f415efc8d6cba0784c400a2
2021-03-15 16:58:09 +00:00
chaviw
3d87156bd0 Add DisplayHashParams to specify how to generate display hash
When generating a DisplayHash, each algorithm can have different
requirements about how to capture the content. Instead of
trying to adjust the buffer after the content is rendered, we can
let SurfaceFlinger use the specified arguments to render the content.

This can be done by getting the display hash params from ExtServices so
they can be specified per algorithm. Then, system server will render the
content using the specified values, ensuring a more efficient
way to scale and grayscale the final buffer.

Test: DisplayHash is grayscale and scaled.
Bug: 155825630
Change-Id: I657e2f94219baaac9318500134a6cd82cd07af56
2021-03-12 10:12:40 -06:00
TreeHugger Robot
98dfc2a69c Merge "Implement passing the model data to the trusted process" into sc-dev 2021-03-12 02:32:22 +00:00
Yi Jiang
0f73fd4907 Adds one more feild into RotationResolutionRequest.
Adds a boolean to indicate whether the camera should be used to resolve
rotation.

Also used codegen to auto generated the RotationResolutionRequest class.

Bug: 178128148
Bug: 181151868
Test: atest RotationResolverManagerPerUserServiceTest, tested the
feature locally.
CTS-Coverage-Bug: 178219876

Change-Id: I892d7c7de37fec700cfd3e1f5dfaed29eaf70ac4
2021-03-11 20:55:42 +00:00