We need to figure out the default voice interactor to give
it default permissions. This happens before the user has
been unlocked and if the voice interactor is not direct
boot aware we fail to find it, hence no permissions are
granted. Now we query the package manager for both direct
boot aware and unaware components. This is fine as we
don't interact with the assistant until the user is
unlocked.
bug:28963642
Change-Id: Ide5471fa1798e868c6e3a4b5e87570a5556e2d3f
This is to fix an incorrect unregister() that was crashing
the system server. The only way it could be happening is
because of incorrect locking. So, hopefully this fixes it.
Bug: 28813750
Change-Id: Ie3c47ffa3024a0c533e12db0d2d021df8fc0367a
When multiple activities within the same process
try to handle requests for AssistStructure, the
singleton mLastAssistStructure tends to trash
the old structure when a second window's request
comes in.
This change passes in a sessionId so that the
cache is only cleared if the session id changes.
Bug: 28348867
Change-Id: I07efcd933db7e48aefd25a1c95493b71bbcffe4b
When the VIMS changes the implementation or has its implementation force
stopped, it used to stop all the recognitions that were in the
SoundTriggerService (without letting those clients know that they've
been stopped). Instead, the VIMS should just unload the keyphrases that
it loaded, so the other clients are not perturbed.
Bug:28518547
Change-Id: Ia70e8576f43cb8a8521c947ff7fc56f63cfbad54
The STH just needs to log the fact that a model has been stopped when it
is aborted. We also need to allow models to be stopped even if the
service is unavailable.
Bug:28474708
Change-Id: I2d618ae9c7c87311223f7d75b8ded7678252d11c
During stopAllRecognitions(), the internal state of a sound model was
being cleared (which made it look like the model was being unloaded).
However, the model was still loaded, so subsequent calls to load a 'new'
model would break.
Bug:28432002
Change-Id: I7090bf52704c6e46e3bb6d495d8fe4b8a1d9e2ad
Fixes: 28293783
CTS: DisableContextTest#testContextAndScreenshotOff failure
When assist context is disabled, make sure that the handleAssist() is
still called with no data.
Change-Id: I569dd9f6de503e62fb04c590214df0f2ce3aa4f3
Fixes the incomplete initialization on FBE devices when
voice interaction service is not available before unlock.
Change-Id: I397237e4554453d29da643aee59384e289fa3654
Fixes: 28183380
Introduced new error codes so that Instrumentation can
include the correct message in the exception.
Bug: 28216630
Change-Id: I93ee77153cdad11fa208c74c28c6790db27c9753
This CL adds the ability in STH to manage multiple voice models indexed by
keyphrase ID, which is an integer.
Bug: 28104190
Change-Id: I8e10cca05ed8b4b8414cae7fffc26c132d4b7cbd
Introducing a new callback in VoiceInteractionSession to
provide assist data for additional activities in the
foreground in a multiwindow setup.
PIP, docked windows and free-form windows (top-most)
will be queried for assist data and passed through the
new API to the Voice Interaction service.
Bug: 27718385
Change-Id: Ib4427c304611b75c2078dcb54f1f7e47ae7d9cfa
This CL redesigns and cleans up a lot of the core logic in STH.
Major changes include:
- Adds Tron logging based counters.
- Common startRecognition(), stopRecognition() and updateRecognition()
routines that work on both Keyphrase and Generic sound models.
- Common streamlined logic for when recognition is aborted, requested and
paused due to phone call/power save etc, for both keyphrase and generic
models.
- Special handling of the singleton nature of keyphrase models in
startRecognition().
- Moves all Keyphrase model state to the common ModelData structure.
- Adds Recognition pause/resume() for generic sound models so that they react
to power save, call state, recognition aborted due to service unavailable
etc.
Bug: 27972641
Change-Id: I96a7f567d2a4973facec556892a163ca74176bbf
Parcelables don't work well with inheritance. So changed the
IRecognitionStatusCallback to have onKeyphraseDetected() and
onGenericSoundTriggerDetected() for those respective events.
Made corresponding changes to AlwaysOnHotwordDetector and SoundTriggerDetector.
Bug: 27250528
Change-Id: Ic08a431e7cc4248c688b05c865348170246de576
When delete is called, now the STH unloads the corresponding models.
Fix bug with keyphrase where a delete call didn't unload (or stop)
the keyphrase model.
Bug: 27279380
Change-Id: Ia34f713d2aecef4102c0f0ccc57b8d2e5febe4bb
- Fix issue when multiple starts cause multiple spurious loads to be sent to
the native layer.
- Fix scrolling issue in the native app.
Bug: 27222043
Change-Id: Iddf36a8b68637f478dc23b001ecbde352db3a5f0
- Refactoring SoundTriggerHelper to handle generic sound models.
- Ability to store multiple models, callback and state information.
- Separate out initialization to be done per voice model, per any model
and per generic model.
- Minor change to the API exposed -- removing the Handler from the
createSoundTriggerDetector call.
- Added callback processing for onRecognitionEvent().
- Added logic for stopAll().
- Changes to the SoundTriggerTestApp to start/stop recognition.
- Multiple models (3).
- Ability to start/stop/load/unload individual models.
Bug: 22860713
Bug: 27222043
Change-Id: Ie5d811babb956bead653fb560a43f1e549ed11bd
This CL implements the SoundTrigger API improvements as given in b/22860713. Only the java-level
parts are implemented in this CL.
Key changes include:
* Addition of a SoundTriggerManager/SoundTriggerDetector system API to manage
the sound-trigger based sound models.
* Addition of a SoundTriggerService service that manages all sound models
including voice (keyphrase) and sound-trigger based models.
* Includes logic to write sound-trigger based models to the database.
* VoiceInteractionManager service now uses SoundTriggerService instead of
SoundTriggerHelper.
Bug: 22860713
Change-Id: I7b5c0ed80702527c4460372efeb5e542d3693a69
This allows an app to show a voice search button
and invoke a voice interaction session for use
within the activity. Once the activity exits, the
session is stopped.
Test application has a new activity that
demonstrates it with the test voice interaction
service.
This initial version is functional enough for
an integration test, with some more tests
and improvements to come later.
Bug: 22791070
Change-Id: Ib1e5bc8cae1fde40570c999b9cf4bb29efe4916d
Right now this is just for the BOOT_COMPLETED broadcast to allow
all apps to receive it.
Also clean up the dumpsys of the broadcast queue to not have
every little detail of ResolveInfo+ActivityInfo+ApplicationInfo,
which is just not useful and makes reading the broadcast queue
debug output a lot harder because of so much noise there is.
And rename the package shell query-intent-* commands to a
shorter query-* form.
Change-Id: I0d01565babb87e68b840c9756a2ea730d699efc7
Add granular StorageManager APIs for key creation/destruction and
unlocking/locking. Start passing through an opaque token as part
of the unlock command, but leave it empty for now. We now have a
separate "prepare" method that sanity checks that user directories
are correctly setup.
Define a handful of system properties used for marking devices that
should be operating in FBE mode, and if they're emulating FBE. Wire
a command to "sm", but persisting will come later.
Start using new "encryptionAware" flag on apps previously marked with
coreApp flag, which were apps running in the legacy CryptKeeper
model. Small tweaks to handle non-encryptionAware voice interaction
services. Switch PackageManager to consult StorageManager about the
unlocked state of a user.
Bug: 22358539
Change-Id: Ic2865f9b81c10ea39369c441422f7427a3c3c3d6
...user for service info
Now it does.
The actual change is basically one line, passing in the current user
when building the service info. The rest is more debugging output to
be able to see what is going on.
Change-Id: I451884e0780aac6ee92fd2cd520071894afdf586
If recognition has been aborted, then the call to the sound trigger
device stop recognition has already occurred. The sound trigger helper
would then try to stop it again, which generates an error code for a
stop without a corresponding start event.
BUG=24677430
Change-Id: Ibf5d1da1a8eb06b677e428f047905d15fd5cf21f
The main change here is to not allow the dialog to go in to its "focus
on the last app the user selected" when running in voice interaction mode,
instead just always giving a simple list.
This also fixes some problems with cleaning up active commands when
an activity finishes and not forcing the current session to go away
when the screen is turned off.
Also added some debug help, having activity print the state of the
voice interactor.
Change-Id: Ifebee9c74d78398a730a280bb4970f47789dadf5
...context and/or screenshot
Added new API to find out what contextual data has been globally disabled.
Also updated various documentation to make it clear what kind of contextual
data you will get (and when it will be null).
Also added a new Activity.showAssist() API because... well, I was already
in there, it was easy to do, it is safe, and maybe people will build cool
things with it.
Change-Id: Ia553d6bcdd098dc0fce4b9237fbfaca9652fc74b
New APIs allow the voice interaction service to set/retrieve a filter
for which of the show flags are allowed.
Change-Id: I588cbe55afee0548ad3afa22d3a7d3bc43cb54a6
Activating the assistant will now route through SysUI, so
we have the logic whether to start an activity or to start a voice
interaction session in one single place.
Bug: 22201770
Change-Id: I0f4699533aea2a1e595ee25a844434c82f548c01
Add new VoiceInteractionSession.closeSystemDialogs() API that closes
everything except the session itself.
Change-Id: If45f1e120d8ca095b6c8055b6485acb5e710820e
When a device or profile owner disables screen capture, we also want to
block context data being collected for the assist structure.
Bug: 21797707
Change-Id: Ib8716c6dd71d538a027c04e1e907c87e2afa0ac8
Now runtime permissions are granted only to components that are
part of the system or perform special system operations. For
exmple, the shell UID gets its runtime permissions granted by
default and the default phone app gets the phone permissions
granted by default.
bug:21764803
Change-Id: If8b8cadbd1980ffe7a6fc15bbb5f54a425f6e8f9
Add an animation that discloses delivery
of contextual data to the assist component.
Also fixes a bug where contextual data was
delivered to legacy assist activities even
though the user explicitly disabled context.
Bug: 21568059
Change-Id: I27dfaa36e2f677b0d73acfa4730f0f4ea3486919