Commit Graph

585 Commits

Author SHA1 Message Date
Ivan Chiang
16e3893181 Hotword: Add metrics for Audio Egress
Bug: 249269473
Test: statsd_testdrive 434
Change-Id: Ia84489dcef1cc96f8fc61a44ccac34d433658bc9
2022-12-02 09:20:41 +00:00
Mark Punzalan
585c555cc9 Rename HotwordAudioStreamManager and add Javadoc
"Manager" is a little vague and "Copier" is clearer with the class's
purpose.

Bug: 258323047
Test: None with this change; simple refactoring
Change-Id: I43a24b27983838e0ef9798eef2f45d1d4b1c9ac8
2022-12-01 17:40:31 +00:00
Mark Punzalan
2e6c85187e Remove dependency on Identity in HotwordAudioStreamManager
android.media.permission.Identity is not needed for AppOpsManager calls
and is an unnecessary coupling.

Bug: 258323047
Test: None with this change; pure refactoring
Change-Id: I1c70f95a73e36c2793e87116b426d55ce359b74b
2022-12-01 17:40:31 +00:00
Mark Punzalan
3959b354c5 Allow setting buffer length for HotwordAudioStreamManager
A HotwordDetectionService can specify a buffer length for each
HotwordAudioStream in the HotwordDetectedResult by adding an int in the
HotwordAudioStream's metadata PersistableBundle, with the key
HotwordAudioStream.KEY_AUDIO_STREAM_COPY_BUFFER_LENGTH_BYTES.

If the value is not specified or is an invalid value, the default buffer
length is 2,560 bytes.

Bug: 257509629
Test: Manually with test app, verified with logs
Test: atest CtsVoiceInteractionTestCases
Change-Id: I28c7f21bdf7c00b62c9cc6c29153d79ce9d85286
2022-12-01 17:40:13 +00:00
lpeter
407df39bd3 Copy HotwordDetectionConnection into TrustedHotwordDetectorSession
The HotwordDetectionConnection controls the communication
with the HotwordDetectionService and handles the detection
of trusted hotword detector. We separate the detection of
trusted hotword detector into TrustedHotwordDetectorSession.

In order to make the code review easier, we copy the all
content of HotwordDetectionConnection class into the new
TrustedHotwordDetectorSession class.

Test: atest CtsVoiceInteractionTestCases
Bug: 241041976
Change-Id: I0943fdec5979440aaab23642caa5677470002466
2022-11-21 16:48:20 +00:00
Cole Faust
e4abcbec1d [conflict] Merge "Fix errorprone warnings that should be errors" am: 677d6cd780 am: f9df26ae3c am: d3c499dabc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2256563

Change-Id: I84d67fdfcc99f9f6fca218d4264ab8e0bc1f1653
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-15 19:47:41 +00:00
Cole Faust
d3c499dabc Merge "Fix errorprone warnings that should be errors" am: 677d6cd780 am: f9df26ae3c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2256563

Change-Id: I8090e254f06a3b5fc7e9b23fdae6c5bd3db230c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-15 19:37:15 +00:00
Cole Faust
f9df26ae3c Merge "Fix errorprone warnings that should be errors" am: 677d6cd780
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2256563

Change-Id: I0e9c5077610407a117ee34ff688b40b52e161a03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-15 19:11:55 +00:00
TreeHugger Robot
3d22271ce7 Merge "Set HotwordAudioStreamManager buffer size to 2560" into tm-qpr-dev am: f286b827fd am: d93df6244a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20476191

Change-Id: I375a0490cd503f1a33036377f68501a7c46097d9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-15 16:11:10 +00:00
lpeter
550ff9e292 Fix incorrect trusted hotword metric
It doesn't pass the right value into trusted hotword
metrics when creating trusted hotword detector.

Test: Build pass
Bug: 259212509
Change-Id: I5ab23ccc88c0c1221a2b2843f90f787346df41b7
2022-11-15 17:50:20 +08:00
Mark Punzalan
6eb0a979e7 Set HotwordAudioStreamManager buffer size to 2560
Bug: 244595867
Test: None; minor constant change
Change-Id: I2f0fc99c78bdf00f512e61fc4419b882286f445f
2022-11-15 07:36:39 +00:00
Mark Punzalan
15055a4e41 Copy data in HotwordAudioStream ParcelFileDescriptors
Bug: 244595867
Test: TODO - Manual E2E test for now, CTS tests later
Change-Id: I02050cc39146e93e9dca1f3db6e0b5b894e85dd6
Merged-In: I02050cc39146e93e9dca1f3db6e0b5b894e85dd6
2022-11-15 07:02:10 +00:00
Cole Faust
7da659bb6c Fix errorprone warnings that should be errors
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:

BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower

See https://errorprone.info/bugpatterns for more
information on the checks.

Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I8446f9076a45ebf7e7ffa06cb0d4ddb1001b6c00
2022-11-14 17:57:30 -08:00
Daniel Kim
ba16af7804 Merge "Update the proximity feature to return proximity levels" 2022-11-14 19:02:44 +00:00
Daniel
2419ded7bb Update the proximity feature to return proximity levels
The original proximity feature which returned the distance in meters was
determined to be too privacy-invasive. AttentionManagerService continue
to receive proximity in distance from Attention Service, but
HotwordDetectedResult will map it
to different proximity levels, near and far. These proximity levels will be used in HotwordDetectionConnection. Use a RequiredServiceRule to make sure we only run the test if the device has the attention service

Bug: 253326426
Test: atest CtsVoiceInteractionTestCases
Change-Id: I4d55564c39d48dd1869d747beb37f81170c102f6
2022-11-14 00:21:23 +00:00
TreeHugger Robot
12e866c13e Merge "Add trusted hotword metrics for unexpected IPC Exceptions." 2022-11-09 05:41:42 +00:00
lpeter
164ae7497b Add trusted hotword metrics for unexpected IPC Exceptions.
Bug: 244389975
Test: build pass
Test: atest CtsVoiceInteractionTestCases
Change-Id: I81f856d69e537bb487582fe0e675c857477a7c4a
2022-11-08 02:09:49 +00:00
Mark Punzalan
8e71589cb9 Merge "Copy data in HotwordAudioStream ParcelFileDescriptors" 2022-11-07 21:47:00 +00:00
Matt Gilbride
7bf5af6f6e Merge "VoiceInteraction - call PermissionEnforcer helper on methods annotated with @EnforcePermission" 2022-11-04 20:22:25 +00:00
mattgilbride
fc67e19bff VoiceInteraction - call PermissionEnforcer helper on methods annotated with @EnforcePermission
Migrates all existing java methods annotated with @EnforcePermission
such that they call the super.<methodName>_enforcePermission
method provided by PermissionEnforcer.

This required by the @EnforcePermission annotation, but is currently a no-op, and will be switched on with ag/20325484.

Bug: 234083358
Test: TH
Change-Id: Ib2a5f22cb4558a325cb7f11dd35c453afdb887d2
2022-11-03 14:05:31 +00:00
Alex Dadukin
c398da3964 SoundTriggerLogger replaced with utils.EventLogger
The class was replaced with EventLogger for deduplication purposes

Bug: b/254234346
Test: I don't think there are any tests for soundtrigger
Change-Id: I1e80a3b31696d010aca8d267af713a9e7ff6a6e6
2022-11-02 15:08:29 +00:00
Peter Li
eedc06b463 Inform Assistant visible activity when the stage of activity lifecycle is invoked.
By the original design, we register the activity event in the
ActivityManagerService. After getting the activity event, we will
query current visible activities and report them to Assistant.
Assistant will start to get direct actions of those visible
activities. But sometimes they can not get the direct actions
due to the stage of activity lifecycle before onStart().

We change the logic to make sure that the stage of visible
activity that we reported to the Assistant is after onStart().

Bug: 235296082
Test: atest VoiceInteractionSessionVisibleActivityTest
Test: atest android.app.activity.ActivityThreadClientTest
Test: atest android.view.DisplayTest
Test: atest android.window.ConfigurationHelperTest
Test: atest android.window.SizeConfigurationBucketsTest
Change-Id: Ie439ff3706dab35e875c1eb995a67fa73aec4d76
(cherry picked from commit 29bb3a3428)
Merged-In: Ie439ff3706dab35e875c1eb995a67fa73aec4d76
2022-11-01 09:19:51 +00:00
Mark Punzalan
924ea41799 Copy data in HotwordAudioStream ParcelFileDescriptors
Bug: 244595867
Test: TODO - Manual E2E test for now, CTS tests later
Change-Id: I02050cc39146e93e9dca1f3db6e0b5b894e85dd6
2022-10-31 22:01:38 +00:00
lpeter
d7f17038f3 Correct VALIDATION_TIMEOUT_MILLIS value to 3000 ms
By trusted hotword design doc, the VALIDATION_TIMEOUT_MILLIS value
should be 3000 ms. We correct the VALIDATION_TIMEOUT_MILLIS.

Test: atest CtsVoiceInteractionTestCases
Bug: 193232191
Change-Id: I4e8f3fbaeb305373e4b964a45e5e26b3e3684bd5
2022-10-25 13:21:16 +00:00
lpeter
cfc66c9342 Rename the methods to easier understand what they do
Because it is not clear to understand what these two methods do,
we rename them.
(1)updateVisibleActivitiesLocked()
(2)updateVisibleActivitiesChangedLocked

Bug: 235296082
Test: atest VoiceInteractionSessionVisibleActivityTest
Change-Id: Id7db3a0dc9c2a17276ae213223fa3dd6ae572b9f
(cherry picked from commit 0d7aa31d35)
Merged-In: Id7db3a0dc9c2a17276ae213223fa3dd6ae572b9f
2022-10-25 08:00:41 +00:00
Felipe Leme
9790553c7d Merge "Further fixes on VIMS.onPreCreatedUserConversion()" into tm-qpr-dev 2022-10-21 19:28:57 +00:00
lpeter
ec669ddecd Refactor updateState method for trusted hotword
Test: atest CtsVoiceInteractionTestCases
Bug: 193232191
Change-Id: I781f9595e9c5016ba81e478e7f550d805699f7fb
2022-10-12 17:55:32 +08:00
Peter Li
29bb3a3428 Inform Assistant visible activity when the stage of activity lifecycle is invoked.
By the original design, we register the activity event in the
ActivityManagerService. After getting the activity event, we will
query current visible activities and report them to Assistant.
Assistant will start to get direct actions of those visible
activities. But sometimes they can not get the direct actions
due to the stage of activity lifecycle before onStart().

We change the logic to make sure that the stage of visible
activity that we reported to the Assistant is after onStart().

Bug: 235296082
Test: atest VoiceInteractionSessionVisibleActivityTest
Test: atest android.app.activity.ActivityThreadClientTest
Test: atest android.view.DisplayTest
Test: atest android.window.ConfigurationHelperTest
Test: atest android.window.SizeConfigurationBucketsTest
Change-Id: Ie439ff3706dab35e875c1eb995a67fa73aec4d76
2022-09-29 15:20:10 +00:00
Felipe Leme
8d5cf40e2b Further fixes on VIMS.onPreCreatedUserConversion()
Previously, when onRoleHoldersChanged() was called in a pre-created
user, VoiceInteractionManagerService (A.K.A. VIMS) would store that
user id and call the method again when the pre-converted user is
converted to a real user (on onPreCreatedUserConversion()), as the
assistant role holders is not available for pre-created users.

But if the system restarts between the user pre-creation and
conversion, onPreCreatedUserConversion() would log a warning and
do nothing.

So, this CL gets rids of the "save the user id" part, and simply
re-call onRoleHoldersChanged() whenever a pre-created user is
converted.

Test: manual verification on automotive builds
Fixes: 242254421

Merged-In: Id933b2bc4f887da8b2f4959955bd174ed5879a47
Change-Id: Id933b2bc4f887da8b2f4959955bd174ed5879a47
(cherry picked from commit 63da68c191)
2022-09-28 00:51:52 +00:00
Felipe Leme
32edbf20cc Merge "Further fixes on VIMS.onPreCreatedUserConversion()" 2022-09-28 00:45:11 +00:00
Felipe Leme
63da68c191 Further fixes on VIMS.onPreCreatedUserConversion()
Previously, when onRoleHoldersChanged() was called in a pre-created
user, VoiceInteractionManagerService (A.K.A. VIMS) would store that
user id and call the method again when the pre-converted user is
converted to a real user (on onPreCreatedUserConversion()), as the
assistant role holders is not available for pre-created users.

But if the system restarts between the user pre-creation and
conversion, onPreCreatedUserConversion() would log a warning and
do nothing.

So, this CL gets rids of the "save the user id" part, and simply
re-call onRoleHoldersChanged() whenever a pre-created user is
converted.

Test: manual verification on automotive builds
Bug: 242254421

Change-Id: Id933b2bc4f887da8b2f4959955bd174ed5879a47
2022-09-27 05:46:50 +00:00
Daniel Kim
c03340cbcb Merge "Disable proximity result for hotword" into tm-qpr-dev am: 4e528edd31 am: c031c0feb2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20001718

Change-Id: I02e1d839409d3f00d1ad07f094d5b637af3904e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-26 08:43:35 +00:00
Daniel Kim
4e528edd31 Merge "Disable proximity result for hotword" into tm-qpr-dev 2022-09-26 08:12:46 +00:00
TreeHugger Robot
e1b8f01e2b Merge "Add Logging of the UI Latency for hotword invocation" into tm-qpr-dev am: 7ca15df236 am: cc6597d2d1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20021705

Change-Id: I79c45f77d1ac9c97eaa8f6a8f9318b1d73d40060
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-24 05:16:51 +00:00
Nicholas Ambur
0cf35e854e Add Logging of the UI Latency for hotword invocation
Log the UI latency with UIActionLatencyReported atom. We plan to
calulate the latency from when the SoundTrigger HAL emits an event to
when the VoiceInteraction system UI view is shown.

Test: device_config put latency_tracker enabled true; verify traces
and latency is logged in WW.
Bug: 247879896

Change-Id: I3edb91691e81f8f23660c0823a6388338fe926ad
2022-09-23 18:13:14 -07:00
Daniel
4dd69f2ebb Disable proximity result for hotword
Introducing a flag to gate the Attention Service usage by Hotword
Detection Service. The Attention Service will be disabled by default.

Bug: 247890608
Test: atest CtsVoiceInteractionTestCases
Change-Id: Ic8a6a11b2a0843a96f135b360f10f7fef5fce274
2022-09-22 22:55:09 +00:00
TreeHugger Robot
765a65bf37 Merge "Call enforceCallingPermission instead of annotation EnforcePermission" 2022-09-19 11:05:16 +00:00
lpeter
3cc7d7d5a5 Call enforceCallingPermission instead of annotation EnforcePermission
These test cases failed after this change (ag/19194476).
It uses @android.annotation.EnforcePermission instead
of calling enforceCallingPermission.

When using @android.annotation.EnforcePermission, it
will trigger noteOP, so we can’t use the noteOp
mechanism to fix this bug.

After reverting back to use enforceCallingPermission,
the test cases will pass.

Bug: 242103120
Test: atest HotwordDetectionServiceBasicTest
Change-Id: I5cb6a2a33a3fadd2bcbfc6edece80da743684398
2022-09-12 16:20:49 +08:00
lpeter
0d7aa31d35 Rename the methods to easier understand what they do
Because it is not clear to understand what these two methods do,
we rename them.
(1)updateVisibleActivitiesLocked()
(2)updateVisibleActivitiesChangedLocked

Bug: 235296082
Test: atest VoiceInteractionSessionVisibleActivityTest
Change-Id: Id7db3a0dc9c2a17276ae213223fa3dd6ae572b9f
2022-09-01 08:07:41 +00:00
Daniel Kim
dda0c6d0a5 Revert "Revert "Refactor ProximityUpdateCallbackInternal to inte..."
Revert submission 19600381-revert-17936037-hotword_proximity-ZZIDPDULZP

Test: atest CtsVoiceInteractionTestCases, atest CtsVoiceInteractionTestCases:android.voiceinteraction.cts.AlwaysOnHotwordDetectorTest#testAlwaysOnHotwordDetector_startRecognitionWithData -- --abi x86_64
Reason for revert: Including the fix for broken tests
Reverted Changes:
Ibfc659015:Revert "Refactor ProximityUpdateCallbackInternal t...
I1a03c21d5:Revert "Verify that proximity key is added to the ...
I6b79d9400:Revert "Add proximity state to the HotwordDetected...

Change-Id: Iee6ab086ccc3f27b95ee601d6be11231f300170c
Merged-In: Iee6ab086ccc3f27b95ee601d6be11231f300170c
2022-08-15 22:46:52 +00:00
Daniel Kim
aa972f2c88 Revert^2 "Add proximity state to the HotwordDetectedResult"
Reverting the previous revert commit which was merged to resolve the
broken tests. Adding a fix to the broken tests by surrounding
mAttentionManagerInternal with null checks.

dbe5ad1a72

Test: atest CtsVoiceInteractionTestCases, atest CtsVoiceInteractionTestCases:android.voiceinteraction.cts.AlwaysOnHotwordDetectorTest#testAlwaysOnHotwordDetector_startRecognitionWithData -- --abi x86_64
Change-Id: Ife5fb9220518a32a89494217f56932f290cce5f3
Merged-In: Ife5fb9220518a32a89494217f56932f290cce5f3
2022-08-15 22:45:55 +00:00
Daniel Kim
6529080276 Revert "Revert "Refactor ProximityUpdateCallbackInternal to inte..."
Revert submission 19600381-revert-17936037-hotword_proximity-ZZIDPDULZP

Test: atest CtsVoiceInteractionTestCases, atest CtsVoiceInteractionTestCases:android.voiceinteraction.cts.AlwaysOnHotwordDetectorTest#testAlwaysOnHotwordDetector_startRecognitionWithData -- --abi x86_64
Reason for revert: Including the fix for broken tests
Reverted Changes:
Ibfc659015:Revert "Refactor ProximityUpdateCallbackInternal t...
I1a03c21d5:Revert "Verify that proximity key is added to the ...
I6b79d9400:Revert "Add proximity state to the HotwordDetected...

Change-Id: Iee6ab086ccc3f27b95ee601d6be11231f300170c
2022-08-13 00:59:42 +00:00
Daniel Kim
e601349c0f Revert^2 "Add proximity state to the HotwordDetectedResult"
Reverting the previous revert commit which was merged to resolve the
broken tests. Adding a fix to the broken tests by surrounding
mAttentionManagerInternal with null checks.

dbe5ad1a72

Test: atest CtsVoiceInteractionTestCases, atest CtsVoiceInteractionTestCases:android.voiceinteraction.cts.AlwaysOnHotwordDetectorTest#testAlwaysOnHotwordDetector_startRecognitionWithData -- --abi x86_64
Change-Id: Ife5fb9220518a32a89494217f56932f290cce5f3
2022-08-13 00:59:42 +00:00
Daniel Kim
dbe5ad1a72 Revert "Add proximity state to the HotwordDetectedResult"
Revert submission 17936037-hotword_proximity

Reason for revert: https://buganizer.corp.google.com/issues/242223069
Reverted Changes:
If8c23a9c6:Refactor ProximityUpdateCallbackInternal to interf...
Ib0ad1da25:Verify that proximity key is added to the hotword ...
I71e9d3da9:Add proximity state to the HotwordDetectedResult

Change-Id: I6b79d9400671362dd63be1e2a0d05280003587d3
2022-08-11 22:00:59 +00:00
Daniel Kim
584eccfe95 Revert "Refactor ProximityUpdateCallbackInternal to interface"
Revert submission 17936037-hotword_proximity

Reason for revert: https://buganizer.corp.google.com/issues/242223069
Reverted Changes:
If8c23a9c6:Refactor ProximityUpdateCallbackInternal to interf...
Ib0ad1da25:Verify that proximity key is added to the hotword ...
I71e9d3da9:Add proximity state to the HotwordDetectedResult

Change-Id: Ibfc65901547d74d6fcfafc257653f49a17a98662
2022-08-11 22:00:59 +00:00
Daniel
ce62280d4b Refactor ProximityUpdateCallbackInternal to interface
Refactor ProximityUpdateCallbackInternal to interface. Also making sure
that the service unbinding happens when clear Attention Service command
is received.

Bug: 214395649
Test: atest CtsVoiceInteractionTestCases, atest CtsAttentionServiceDeviceTestCases
Change-Id: If8c23a9c68952e323fcb8eeb681e86b0e6119b18
2022-08-08 22:42:24 +00:00
Daniel
2bd78dee3a Add proximity state to the HotwordDetectedResult
HotwordDetectionConnection will interact with AttentionService to
receive updated proximity state. Then it will fill the
HotwordDetectedResult returned from Hotword service to set
proximity state.

Bug: 214395649
Test: atest CtsVoiceInteractionTestCases
Change-Id: I71e9d3da999cda2d9b17e3abc900fa42e4364c90
2022-08-08 22:42:23 +00:00
Felipe Leme
88f2307219 Fixed VIMS to postpone ASSISTANT rule change on pre-created users.
RoleService should not be calling onRoleHoldersChanged() on
pre-created users, but that behavior cannot be changed because its
implemented by a system app, and pre-created users APIs are hidden.

To test it:

$ adb shell pm create-user --pre-create-only  --guest
Success: created user id 12

$ adb shell pm create-user --guest ElGuesto
Success: created user id 12

$ adb shell cmd user list --all -v
4 users:

0: id=0, name=Driver, type=system.HEADLESS, flags=ADMIN|INITIALIZED|PRIMARY|SYSTEM (running)
1: id=10, name=Driver, type=full.SECONDARY, flags=ADMIN|FULL|INITIALIZED (running) (current)
2: id=11, name=null, type=full.SECONDARY, flags=FULL|INITIALIZED (pre-created)
3: id=12, name=ElGuesto, type=full.GUEST, flags=EPHEMERAL|FULL|GUEST|INITIALIZED (converted)

$ adb shell am switch-user 12

$ adb shell dumpsys voiceinteraction |egrep '(mBound|implementation)'
  mBound=true mService=android.service.voice.IVoiceInteractionService$Stub$Proxy@77da1bc

$ adb shell cmd voiceinteraction show

Test: see bove
Bug: 216141085
Bug: 226201975

Merged-In: I12d9bb32e144ecf91ee4b452affea0dcea546127
Change-Id: I12d9bb32e144ecf91ee4b452affea0dcea546127
(cherry picked from commit 39acca1d72)
2022-08-03 16:03:02 +00:00
Ivan Chiang
6c8dafdd06 Merge "Use noteOpNoThrow instead of checkOpNoThrow in AssistDataRequester" 2022-08-03 07:13:55 +00:00
Felipe Leme
39acca1d72 Fixed VIMS to postpone ASSISTANT rule change on pre-created users.
RoleService should not be calling onRoleHoldersChanged() on
pre-created users, but that behavior cannot be changed because its
implemented by a system app, and pre-created users APIs are hidden.

To test it:

$ adb shell pm create-user --pre-create-only  --guest
Success: created user id 12

$ adb shell pm create-user --guest ElGuesto
Success: created user id 12

$ adb shell cmd user list --all -v
4 users:

0: id=0, name=Driver, type=system.HEADLESS, flags=ADMIN|INITIALIZED|PRIMARY|SYSTEM (running)
1: id=10, name=Driver, type=full.SECONDARY, flags=ADMIN|FULL|INITIALIZED (running) (current)
2: id=11, name=null, type=full.SECONDARY, flags=FULL|INITIALIZED (pre-created)
3: id=12, name=ElGuesto, type=full.GUEST, flags=EPHEMERAL|FULL|GUEST|INITIALIZED (converted)

$ adb shell am switch-user 12

$ adb shell dumpsys voiceinteraction |egrep '(mBound|implementation)'
  mBound=true mService=android.service.voice.IVoiceInteractionService$Stub$Proxy@77da1bc

$ adb shell cmd voiceinteraction show

Test: see bove
Bug: 216141085
Bug: 226201975

Change-Id: I12d9bb32e144ecf91ee4b452affea0dcea546127
2022-08-02 12:57:59 -07:00