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
Issue #21816660: More app standby abuse prevention
We now apply the same rules for deciding when an app has counted
as active when the screen is on as when the screen is off; the only
change this really means is that we don't immediately count foreground
services as making an app active both screen on as well as the
existing behavior for screen off.
Also small fix to how we switch into voice interaction mode that
guarantees we immediately switch to the screen on state.
Issue #20882522 VI: voice interactor service not restarted
This fixes some problems in the framework, allowing it to be
correctly restarted (and rolled by to the default voice interactor
if appropriate). There are still some problems in system UI that
leave things broken in some cases.
Also small fix to how we switch into voice interaction mode that
guarantees we immediately switch to the screen on state.
Change-Id: Ie4fd098a2f5174a2c94f36d30427fb2a9db3d835
VoiceInteractionManagerService.SettingsObserver has been used
to monitor per-user settings hence we have to take care of
multiuser scenario.
In the case of VoiceInteractionManagerService, monitoring
changes from all the users is OK because event handlers will
read settins from the current user anyway.
Bug: 21766395
Change-Id: I357fe2a7e2a5645355e696c6fbaae762f54ca029
Start moving Assist* stuff to android.app.assist.
Clean up some more of the VoiceInteractionSession APIs.
Clearly document that finish() is not the same as hide(),
always call hide() instead, and fix the finish() path to
also always do a hide to make sure everything is cleaned
up correctly.
Change-Id: I962d4069fcb34fe89547a95d395ae1b9fa3b4148
Also rework how we transfer AssistContent and AssistStructure
to the assistant, so they are delivered as completely separate
objects rather than the kludgy bundling them in the assist
data thing.
Change-Id: Ib40cc3b152bafeb358fd3adec564a7dda3a0dd1d
Ensure any active voice interaction session is canceled when the
voice interaction service is shutdown. This ensures that the UI window
is closed when a user switches accounts.
Bug: 20501283
Change-Id: I9f3dae5afc4048482f6bedaed36dbae3c0823ebd
* commit '782def772adacaf029d7d9850605923066665424':
Add config_forceVoiceInteractionServicePackage to allow a device to config its VoiceInteractionService package and ignore the regular setting.
A possibility was introduced to launch voice assist over
the lockscreen using the left keyguard affordance.
Change-Id: Ic4618d24256b65441a50d77d0ef59b0ec99b6ead
Now that we have a separate foreground service proc state
(above a sleeping top app), update various system services
to put their bindings into this state when appropriate.
There are two new bind flags for this -- one that just always
makes it a foreground service, another that only does it when
the device is awake (useful for things like the wallpaper).
And with all of that, tweak network policy manager to only
include apps that are at least foreground service state when
in power save and device idle modes. This will allow us to
further reduce the set of apps that have network access
(in particular not giving access to the current top app when
the screen is off), hopefully leading to even better battery
life.
Change-Id: I91d85a5c5ed64e856149e9a5d94a634a7925ec7f