Commit Graph

2773 Commits

Author SHA1 Message Date
Shashwat Razdan
ae26632fa2 Merge "Adding owners in smartspace packages" am: 10603d5102 am: 6bef558283 am: 5a53f7c676
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1570760

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ideffda52245794487ac6289f4046b88aab941e93
2021-02-02 21:52:24 +00:00
Shashwat Razdan
057896ae34 Adding owners in smartspace packages
Test: not needed as this is a meta file change

Change-Id: I32f5205c4c1b771aae963a20e9a52fa7691ce271
2021-02-02 17:50:18 +00:00
Alex Buynytskyy
4f3e949354 Merge "Close leaking FD." into sc-dev 2021-02-02 17:24:42 +00:00
Shashwat Razdan
fc890f1fba Merge "SmartspaceManager initial implementation" into sc-dev 2021-02-02 12:31:26 +00:00
Adrian Roos
84199909eb Merge changes from topic "nullablecollection" into sc-dev
* changes:
  API: Suppress existing NullableCollections lints (TaskOrganizer)
  API: Suppress existing NullableCollections lints (S edition)
2021-02-02 09:24:38 +00:00
Shashwat Razdan
d33e8c387a SmartspaceManager initial implementation
Bug: 176851064
Test: Deployed on Phone,CTS tests
Change-Id: I3e03628d4d0e0aec0b6442f0ee8949ac378a1572
2021-02-01 21:39:07 +00:00
Chloris Kuo
e689997b6f Merge "NAS API Change" into sc-dev 2021-02-01 21:03:08 +00:00
Alex Buynytskyy
6c43e96c08 Close leaking FD.
Bug: 160634487
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I91b18c64b4436ae4d12beeb73735e865440bebf5
2021-02-01 09:46:28 -08:00
Adrian Roos
d7f33cd648 API: Suppress existing NullableCollections lints (S edition)
Bug: 152525509
Test: make checkapi
Change-Id: Idf96709bf93ef49ca5ad3cdd1f14d06e0d9e09d7
Exempt-From-Owner-Approval: API lint large scale change
2021-02-01 14:54:34 +00:00
Alex Buynytskyy
3558f0d686 Merge "create owners" am: 00c3346e2d am: feaccc5be9 am: 9f3cfe4c82
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1565113

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic8273c33849e1b37f68ff1d63fde070092357ee4
2021-02-01 09:19:20 +00:00
Ahaan Ugale
4d8bb5d015 VoiceInteraction: Handle session delivery failure.
When the system connects to the VoiceInteractionSessionService, it
requests the service to create a new session. The service then delivers
this session to the system. Currently, a failure to deliver it is just
ignored, and the service continues to initialize the session. This
silently leaves the session in an invalid state where operations with it
always fail (since the system doesn't recognize the session).

There's currently a concurrency bug in the system server that causes the
session delivery to fail occasionally. Even with that fixed though, it's
good to handle unexpected errors here.

Fix: 178776751
Test: atest CtsVoiceInteractionTestCases --iterations
Change-Id: I3489db108158fa7c71179bee3d098ecd4ab6b2bd
2021-01-29 09:54:01 +00:00
Todd Kennedy
7a7726e420 create owners
Change-Id: I2791a9f9a80b6f68a948c706d6930d24ed59516d
2021-01-29 05:05:09 +00:00
Chloris Kuo
18b4ec8054 NAS API Change
Add onNotificationEnqueued(sbn, channel, rankingMap)

Bug: 177032312
Test: CtsLegacyNotification29TestCases
Change-Id: I116f74317028154ef451a0f1e02ac6a83e6b1012
(cherry picked from commit 7236b38847)
2021-01-29 02:03:16 +00:00
Yi Jiang
eee34dd19e Adds ONWERS files for rotation resolver service.
Bug: 172370409
Test: none
Change-Id: Ia932e6169d83eeee2f2ddcb6b028931858ca51f0
2021-01-27 08:34:18 +00:00
Ahaan Ugale
5c538f8163 Merge "VoiceInteraction: Add TEST_MAPPINGs." 2021-01-26 21:03:00 +00:00
lpeter
205ee1efed Create basic behavior of HotwordDetectionService
Create the HotwordDetectionService to help to verify the audio data.
The VoiceInteractor app will implement the HotwordDetectionService
and create the validation algorithm to increase the hotword accuracy.

The HotwordDetectionService will be triggered by VoiceInteractor app
from the VoiceInteractionService after the VoiceInteractionService
is ready.

The VoiceInteractionManagerService will check if we need to bind the
HotwordDetectionService.

After receiving the audio data from the DSP, the
VoiceInteractionManagerService will pass the audio data to the
HotwordDetectionService, then the HotwordDetectionService will verify
the audio data and send the result back.

If the hotword is valid, then the VoiceInteractionManagerService will
inform the VoiceInteractionService. The VoiceInteractor app will show
the UI.

Local test:
1.Make sure the original hotword function to work well manually.
2.Add the additional test code and check the log to make sure the
basic flow of hotword detection service runs well manually.

Bug: 175738546
Test: Manually
Test: atest CtsVoiceInteractionTestCases
Change-Id: Idb662bab37bb9691da24c9c2910a2c3dafedcadd
2021-01-26 00:58:37 +00:00
Yi Jiang
7a0969c65d Merge "Introduces RotationResolverService to the system" 2021-01-26 00:09:12 +00:00
Tianjie Xu
edc7961287 Merge "Create the ResumeOnRebootService." 2021-01-25 23:08:17 +00:00
Ahaan Ugale
4936643625 Merge changes I9a0d859f,I8ab1824a,I2093b163,Ie4370c2e,I62a9480f
* changes:
  VIMS: Simplify findAvailInteractor() by getting metadata in initial pm query.
  VIMS cleanup: set package on pm query instead of filtering results.
  VoiceInteraction: Remove MATCH_DEBUG_TRIAGED_MISSING from PM queries.
  VIMS: Remove useless field mCurUserUnlocked.
  VoiceInteractionServiceInfo cleanup: Nullability, javadoc, try-with, unused method.
2021-01-25 21:43:02 +00:00
Ahaan Ugale
54a505d46f VoiceInteraction: Remove MATCH_DEBUG_TRIAGED_MISSING from PM queries.
MATCH_DEBUG_TRIAGED_MISSING is the deprecated equivalent to MATCH_DIRECT_BOOT_AUTO.
Not needed since we use MATCH_DIRECT_BOOT_AWARE and MATCH_DIRECT_BOOT_UNAWARE (see
comments on ag/1101955).

Bug: 178410946
Test: atest CtsVoiceInteractionTestCases
Change-Id: I2093b163bb18e43c4f868715d60bc4b637fced6c
2021-01-25 13:39:02 -08:00
Ahaan Ugale
008f1d2914 VoiceInteractionServiceInfo cleanup: Nullability, javadoc, try-with, unused method.
Bug: 178410946
Test: atest CtsVoiceInteractionTestCases
Change-Id: I62a9480f9046e328f16c6f7ecff77570da8d0154
2021-01-25 13:34:44 -08:00
Yi Jiang
0127af73ed Introduces RotationResolverService to the system
Rotation Resolver Service provides the suggested screen rotation
to the system server.

Bug: 162359770
Bug: 172370409
Test: atest RotationResolverManagerPerUserServiceTest
Change-Id: Ia43dfdba8502e04768933ef46a4ac8a687d4936c
2021-01-25 20:58:14 +00:00
Fabian Kozynski
7535e43120 Merge "Revert ag/13072747" 2021-01-25 15:23:36 +00:00
Nicholas Ambur
28cc6364d6 add API for ST clients run in battery saver mode
New system API interface for both SoundTriggerManager and
AlwaysOnHotwordDetector to indicate if a recognition should run in
battery saver mode or not.

Clients supply this information through the existing startRecognition
calls, and the client must hold a new privledged permission,
SOUND_TRIGGER_RUN_IN_BATTERY_SAVER, to indicate this intention.

As a prerequisite, the device PowerManagerService must have the
SoundTrigger service enabled in the battery saver mode battery policy.
If not enabled, recognition will be paused as if the client did not
provide the indication to run in battery saver mode.

Bug: 172294448
Test: build with Google search apk using this feature and verify
recognition keeps running in battery saver mode

Change-Id: Ia43be99290e6fd7c50ff8e4908d6c60ea513b19a
2021-01-22 18:24:39 -08:00
Hall Liu
e6758b9e57 Merge "Address API review on CarrierMessagingServiceWrapper" 2021-01-22 23:34:25 +00:00
Hall Liu
d973ac087c Address API review on CarrierMessagingServiceWrapper
* Rename disposeConnection to disconnect
* Save the instance of Context used to bind the service

Fixes: 176822560
Test: atest CarrierMessagingServiceWrapperTest
Change-Id: I9d9f76033076f7a1261dddbe81429f81b0603bf4
2021-01-22 12:16:54 -08:00
Fabian Kozynski
6b7e9a3058 Revert ag/13072747
The change in ag/13072747 could bring some unexpected behavior, as it
would drop important messages (onTileAdded, onTileDestroyed).

Given that there is no way to prevent messsages delivered after
onDestroy without implementing some kind of callback mechanism, instead
add explicit documentation about this behavior.

Test: build
Fixes: 172511340
Change-Id: I3fa6e41389477cbafa31809cd5041d67a76ccb91
2021-01-22 15:11:27 -05:00
Mark Renouf
7b987440a9 Javadoc fix, correct typo
Bug: 178111968
Test: read it
Change-Id: I753c46eaeaa7ce41649849db648f472fba81bddd
2021-01-22 12:47:13 -05:00
Chavi Weingarten
c2225b451c Merge "[ImpressionAttestation] Updated Impression Attestation APIs" 2021-01-21 22:24:17 +00:00
Jiachen Zhao
174d83e335 Merge "Create the ResumeOnRebootService." 2021-01-21 22:21:16 +00:00
Ahaan Ugale
3d5ae5c491 VoiceInteraction: Add TEST_MAPPINGs.
Removes an unused constant in VoiceInteractor to test it.

Test: check the presubmits
Change-Id: I815eff582b130a533f0df5c8f10938009de9c65a
2021-01-21 13:57:50 -08:00
TreeHugger Robot
aca883298a Merge "Add supportedAttributes param for spell checker." 2021-01-21 19:45:17 +00:00
Jiachen Zhao
4ace479070 Create the ResumeOnRebootService.
This is the base class for service that provides wrapping/unwrapping of the opaque blob needed for
ResumeOnReboot operation. The package needs to provide a wrap and unwrap
implementation for handling the opaque blob, that's secure even when on
device keystore and clock is compromised. This can be achieved by using
tamper-resistant hardware such as a secure element with a secure clock,
or using a remote server to store and retrieve data and manage timing.

Bug: 172780686
Test: atest FrameworksServicesTests:ResumeOnRebootServiceProviderTests
Change-Id: I98378be6963194c2e6faef8ebc441066b75a0bbf
2021-01-21 06:16:54 +00:00
Kohsuke Yatoh
036c61877a Merge "Add missing textservice OWNERS files." am: 0f4112a760 am: 49023f3cd8 am: 782d427971
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554552

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie00b4339b17b58e4041b506d23c8f7a984839481
2021-01-21 01:20:06 +00:00
Kohsuke Yatoh
0f4112a760 Merge "Add missing textservice OWNERS files." 2021-01-20 23:16:33 +00:00
chaviw
a522a51444 [ImpressionAttestation] Updated Impression Attestation APIs
Updated ImpressionAttesationService to take in a byte array for the salt
instead of a String.

Test: Builds
Bug: 155825630
Change-Id: Iacd60e34e5103383207a4a497b0ee5e759d83b2b
2021-01-20 14:11:14 -08:00
Kohsuke Yatoh
93d47b0487 Add supportedAttributes param for spell checker.
Bug: 166304720
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: I22f4a59a0c8ccb43f799351062f9fabca42403cd
2021-01-20 20:06:12 +00:00
Jiachen Zhao
91d8ff41d1 Create the ResumeOnRebootService.
This is the base class for service that provides wrapping/unwrapping of the opaque blob needed for
ResumeOnReboot operation. The package needs to provide a wrap and unwrap
implementation for handling the opaque blob, that's secure even when on
device keystore and clock is compromised. This can be achieved by using
tamper-resistant hardware such as a secure element with a secure clock,
or using a remote server to store and retrieve data and manage timing.

Bug: 172780686
Test: atest FrameworksServicesTests:ResumeOnRebootServiceProviderTests
Change-Id: I98378be6963194c2e6faef8ebc441066b75a0bbf
Merged-In: I98378be6963194c2e6faef8ebc441066b75a0bbf
(cherry picked from commit e1f51ddab63a54b7d66d3971b5301b66787e47cf)
2021-01-20 11:48:28 -08:00
Kohsuke Yatoh
b1d2fe86f7 Add missing textservice OWNERS files.
Test: n/a
Change-Id: I56939ce3a22c72ac489e4d9248de9e0ce4ee9413
2021-01-20 18:53:11 +00:00
Chloris Kuo
dde50e8d10 Add NAS#onNotificationClicked API and TestAPI for cts test
Bug: 177032312
Test: atest NotificationListenerServiceTest
Test: atest NotificationManagerServiceTest
Change-Id: Ia11693c39c184a3c26c099acbc5dc6a3d5e8acd2
2021-01-19 12:20:34 -08:00
Hyunyoung Song
558c605944 Merge "Add OWNERS file to SearchUi related projects" am: 3e4b74520b am: 1f0eb2327a am: 3bbcad312a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552394

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I36d598aece29035d9d040eb2f03a9b9cdc723ff6
2021-01-15 22:17:13 +00:00
Hyunyoung Song
12d7faedf0 Add OWNERS file to SearchUi related projects
Test: not needed as this is a meta file change

Change-Id: I4900664d11374f2b82247a73445e0deea0e70cbc
2021-01-15 10:00:29 -08:00
Joanne Chung
d47c351b8d Merge "Initial layout of translation related APIs." 2021-01-12 16:00:23 +00:00
Adam He
2653f23d47 Initial layout of translation related APIs.
The initial translation related APIs. The APIs and the implementation
will be revised in the follow up changes. The service register will
on the next changes.

Bug: 173243538
Bug: 176208267
Test: manual verification (build)

Change-Id: Ib7b39e1b548bc6663a81482fa335632e8da18d6a
2021-01-12 21:08:05 +08:00
TreeHugger Robot
1d30d73d0e Merge "Catch the SecurityException in the APIs of SoundTriggerSession to avoid crashing." 2021-01-08 09:55:11 +00:00
Julia Reynolds
9bfd6c0f0a Merge "Add 'ongoing' filter type" 2021-01-08 03:14:52 +00:00
lpeter
3492b92b26 Catch the SecurityException in the APIs of SoundTriggerSession to avoid crashing.
Currently when switching the user, it will be possible to meet this
kind of issue due to timing factor that the API of SoundTriggerSession
was called by previous user and caused the exception "Caller is not
the current voice interaction service.". It seems that the flow between
switching user and voice interaction needs to be improved to avoid this
race condition issue, but the impact will be high.

It would be better to catch the exception and return the fail status
to caller instead of crashing as a short term solution.

Four approaches are considered below:
(1) Change state to STATE_INVALID
When AlwaysOnHotwordDetector is shutdown, the state will be set to
STATE_INVALID. Then all called methods from it will fail with an
IllegalStateException. This is a normal behavior that has been defined
in the javadoc. But the STATE_INVALID does not clearly indicate what
happended in the AlwaysOnHotwordDetector for this issue and what to do
next. So it is not the best approach to change the state to
STATE_INVALID directly.

(2) Use a new state to inform the caller (apply this)
Define a new state STATE_ERROR to indicate the unknown active
keyphrase availability due to an error.
public static final int STATE_ERROR = 3;

When the exception occurs, it will pass STATE_ERROR to the caller by
the callback API "onAvailabilityChanged(int status)".
Then all called methods from it should fail with an IllegalStateException
due to AlwaysOnHotwordDetector can not be used currently.
The caller should create a new instance after receiving this state.

In order to avoid unintended behavior in the application, it would be
better to use this approach when the target SDK version is greater
than R.

(3) Use onError() callback to inform the caller
Currently when some errors occurred during Recognition, the onError()
callback will be called. But it doesn't mean the caller should stop
to using the AlwaysOnHotwordDetector. It is different from what we
want that the caller should not use the AlwaysOnHotwordDetector and
should create a new instance. So it is not suitable to use the onError()
callback to inform the caller due to no error reason in the onError()
callback. The caller will not know what happened and what to do next.

(4) Create a new onError(int reason) callback to inform the caller
In this approach, it will need to create a new onError(int reason)
callback to inform the caller. It also needs to change the state of
AlwaysOnHotwordDetector, then all called methods from it should fail
with an IllegalStateException due to AlwaysOnHotwordDetector can not
be used currently. This approach is also fine, but it is very similar
to approach 2. Finaly we use the approach 2.

Bug: 148136382
Test: atest CtsVoiceInteractionTestCases
Test: atest CtsSoundTriggerTestCases
Change-Id: I4697a2e6e26d412cf5c985467c652d30586adbe7
2021-01-08 01:35:01 +00:00
Julia Reynolds
cd561fc63b Add 'ongoing' filter type
Test: atest
Bug: 173052211
Change-Id: I2d780d38fc86a11005450ea1f159b0067ff7f65d
2021-01-07 23:36:08 +00:00
TreeHugger Robot
677c97ddf8 Merge "Pass focused field's ViewNode information in the augmented autofill request" 2021-01-07 20:25:15 +00:00
Neil Fuller
762c026554 Merge "Add LocationTimeZoneProvider test infrastructure" 2021-01-06 23:03:48 +00:00