When the application uses VoiceInteractionService to create a
SoftwareHotwordDetector, we need to report the HotwordDetectionService
status to the application, but we pass null callback into the
updateStateLocked function, it means that we will not receive the
HotwordDetectionService status.
In this change, we implement IHotwordRecognitionStatusCallback and
pass the callback into updateStateLocked function. When we receive
the HotwordDetectionService status, we will pass the status to the
application.
Bug: 183239093
Test: atest CtsVoiceInteractionTestCases
Test: atest CtsVoiceInteractionTestCases --instant
Change-Id: I1a1b8abe5c7e82eddaa2f0a83f54110df74d1efb
For DSP-based detection, stopRecognition() disables detection at the
sound trigger layer. For software detection, the HotwordDetectionService
must be notified so it can stop detection.
Bug: 189236104
CTS-Coverage-Bug: 183425641
Test: atest CtsVoiceInteractionTestCases
Change-Id: I220d2255e5e500c22723f6e2fbc34860a529f216
This is the P0 feature we found 10 minutes ago from the client team:
there is currently no way to create HotwordRejectedResult.
Bug: 189189762
CTS-Coverage-Bug: 183425641
Test: atest CtsVoiceInteractionTestCases
Change-Id: I6260a43dda89ba812ac1a6d6b5486145d6777f84
Asked for API exception in b/168305377#comment49.
Bug: 168305377
CTS-Coverage-Bug: 183425641
Test: atest CtsVoiceInteractionTestCases
Change-Id: I50c39c430950f21950210feffc287203b49780c6
The problem is that the assistant doesn't draw its own
UI in some cases so even though it's in the background the user
considers it as a foreground app. We can check if the app trying to
access the microphone currently has a voice interaction session which
should be a good indicator that the user intends to user the app.
Test: Use the assistant, observe dialog
Bug: 178243539
Change-Id: Ie17f6e47a002e75467cce23fd74f5fcbc92aa577
If an application caches an ApplicationInfo and uses it to call
Context#createApplicationContext, the app will not get the most recent
version of the overlays for that application. To make things worse, the
LoadedApk stored in ActivityThread#mResourcePackages is updated using
the old ApplicationInfo causing further uses of the cached LoadedApk to
return outdated information.
Deprecate Context#createApplicationContext, convert all internal uses
to Context#createPackageContext(String packageName, ...) and log
whenever any one calls Context#createApplicationContext with an
outdated ApplicationInfo to detect debug issues in using old infos.
Bug: 188059515
Test: change wallpaper and observe widgets get reloaded with most
recent overlays
Change-Id: I2aeefa8c0e66264859109975a54c4f73f76ad710
Added a getter instead of getting the interval between requests data
from the xml file. This was in response to API council feedback
Test: DisplayHashManagerTest
Fixes: 184890915
Change-Id: I8f903cada26b6fc4cd8c12a5c97089705bc821e3
Quick access wallet settings has moved, and need to listen to the
changes in order to show the affordance on the lockscreen.
Fixes: 183025745
Test: atest NotificationPanelViewControllerTest
Change-Id: I711b51a7ed10c4d95e4aa6bc4fc7273657c06c8e
* Make the Hotword*Result payloads NonNull. HotwordDetectedResult on the
VoiceInteraction side is still @Nullable since the EventPayload is
used for other result types too.
* Remove @NonNull for a primitive return type.
Bug: 184962614
Test: atest CtsVoiceInteractionTestCases
Change-Id: Ib57368dab442f80805233864dc8fd86249f677cf
By API review feedback, it would be better to use a range
of numbers for OEM errors instead of just defining
CUSTOM_ERROR_1 / CUSTOM_ERROR_2 in HotwordDetectionService.
Bug: 184962614
Test: atest CtsVoiceInteractionTestCases
Test: atest CtsVoiceInteractionTestCases --instant
Change-Id: Id1e3a29e37ef566a1d8e30c703b7f2c4ae138f82
Before, it tried to access WindowManager from a non-visual context. Now,
it should use a window context.
Bug: 187644235
Test: manual
Change-Id: I3994d7b86fd28598d375c1c8033d72bbc9a9fdcf
- setMediaSyncEvent does not need to accept any @Nullable param.
- getMediaSyncEvent return @Nullable.
This CL manually define the getter to allow for the @Nullable/@NotNull
and doc asymmetry.
Bug: 186469575
Fix: 186469575
Test: CtsVoiceInteractionTestCases
Change-Id: Icc0b6282e6ee13c8fcaa7dea763a39c430e66644