History log of /frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
57dd737443a174379eb638450e4888500d8e4a23 28-Jul-2015 Dianne Hackborn <hackbod@google.com> Work on issue #21516866: Implement voice interaction in ResolverActivity

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
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
20df62345910ad390a3bb321990987757db0831d 22-Jul-2015 Jorim Jaggi <jjaggi@google.com> Merge "Add callback to voice interaction session for lockscreen shown" into mnc-dev
19695d97118d74aa7f54ba09b178e65378825cc0 21-Jul-2015 Jorim Jaggi <jjaggi@google.com> Add callback to voice interaction session for lockscreen shown

Bug: 22402726
Change-Id: Iaf83e2f2b0389d74b6ecf480aa91a34443803f7b
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
1b4447f728eab763beb2da28d3cf64574729c556 20-Jul-2015 Dianne Hackborn <hackbod@google.com> Fix issue #22564918: Request is inactive

Add Request.isActive() API. Also improve documentation to tell
people what things cause it to become inactive. And fix a race
where we were modifying the active list from outside the main
thread without locking it.

Change-Id: I9248e014126cb121612edbe595108ace753456e2
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
17f693520da8977c4a60f5b4be3be035cba7146c 18-Jul-2015 Dianne Hackborn <hackbod@google.com> Fix issue #22531747: Assist info should declare if user has disabled...

...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
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
f6586cbde7d4612963eb2e8a2413235630676b83 16-Jul-2015 Dianne Hackborn <hackbod@google.com> Merge "Implement issue #22403908: Enable assistant to refuse context sharing" into mnc-dev
1de1186d28f0ca7c0b6298edfa8ae497e651ba87 15-Jul-2015 Dianne Hackborn <hackbod@google.com> Implement issue #22403908: Enable assistant to refuse context sharing

New APIs allow the voice interaction service to set/retrieve a filter
for which of the show flags are allowed.

Change-Id: I588cbe55afee0548ad3afa22d3a7d3bc43cb54a6
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
d0a159025a06a7400ab3dfca1d754494947092e0 15-Jul-2015 Dianne Hackborn <hackbod@google.com> Fix issue #22124996: VI: Command Request not Active

This stupid thing wasn't even completely implemented
in HandlerCaller! D'oh!

Change-Id: I0dac42c208fa0f08a6e20a6cb17b072f51efcaa7
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
782d49826862cbdc9d020fc9d85f8a6f64675dcb 09-Jul-2015 Dianne Hackborn <hackbod@google.com> Fix issue #22328792: Fix scalability issues in AssistStructure

We can now stream the AssistStructure across processes, avoiding
IPC size limitations for large structures. There is also a new
API that gets called on the VoiceInteractionSession if there is
a failure retrieving the assist data.

Also fix issue #22351981: Runtime restart due to ANR in system server,
getting rid of a deadlock.

And also tweak object lifecycles to try to avoid keeping around
in an app the previous AssistStructure after we request a new one.

Change-Id: Ifb136a0d31a14e56a8db6b90768d9fc65557a17f
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
4e88bcd39918197c78b148afe40a08b6adcace1e 01-Jul-2015 Dianne Hackborn <hackbod@google.com> Fix issue #20672970: Notifications are not dismissed on hot word detection

Add new VoiceInteractionSession.closeSystemDialogs() API that closes
everything except the session itself.

Change-Id: If45f1e120d8ca095b6c8055b6485acb5e710820e
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
593334ab70a8341c7d24d71a377ab5617e3f4ab7 30-Jun-2015 Dianne Hackborn <hackbod@google.com> Fix issue #22124996: VI: Command Request not Active

Just forgot to add the request to the active set.

Also eradicate a bunch of old cruft that has been replaced
by the final APIs, and improve voice interaction test to
sit fully on top of the final APIs and have a test for
command request.

Change-Id: Ieff7a6165ebf2a4c5fb80c1ebd020511a2ae63ee
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
16036f26847f3f1a88a093fb776bf081008ff8d8 22-Jun-2015 Dianne Hackborn <hackbod@google.com> Fix issue #20654534: API Review: android.app.assist

Remove the old classes.

Change-Id: I949350cadc5fc304e2651d7db0ffd38e45db9b6e
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
0925136b22d4fcc69ed8b13675861e2386f3a341 18-Jun-2015 Stefan Kuhne <skuhne@google.com> Merge "Fixing voice panel centering issues in landscape on phone" into mnc-dev
2f280d06396d7b8234197a3b1a35d5319f7d6951 18-Jun-2015 Stefan Kuhne <skuhne@google.com> Fixing voice panel centering issues in landscape on phone

The new assist panel (long press on home) was not centered in landscape
mode on phones. This was caused by ignoring the stable insets in the
PhoneWindowManager.

bug: 21708971
Change-Id: I97a968a41c2966b09eba496fbe57c840affdf9ec
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
40359f73b189fc8547dd91e6b75a4243b23553ef 18-Jun-2015 Adam Powell <adamp@google.com> Merge "Request application of WindowInsets when setting a content view" into mnc-dev
41607d5a2b8cc4a3fde4a2f75e33a00e8d957b1d 17-Jun-2015 Adam Powell <adamp@google.com> Request application of WindowInsets when setting a content view

For both PhoneWindow and VoiceInteractionSession, call
requestApplyInsets when the content view(s) change. This is generally
what the developer expects if the new view tree responds to insets in
any way.

Bug 21620924

Change-Id: I60a88af55bf85217c3587aa37f03fdc3fdce686d
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
216f5c33472bf4014cb1951deeb2b7c09f4cae37 17-Jun-2015 Dianne Hackborn <hackbod@google.com> Bring back screenshot API.

Change-Id: Ia6bdfa300398d39119239f6a88c9992673edb3e0
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
6cf397508eb7edef13baefad942a59b058ed450b 04-Jun-2015 James Cook <jamescook@google.com> Allow different visual and voice assist prompts

* Introduce VoiceInteractor.Prompt, holding multiple voice prompts
("What genre?", "What genre of music?", "What genre of music, for
example classical?") as well as a different visual prompt to show
on screen ("Choose genre").
* Migrate framework voice interactor code from a CharSequence prompt
to Prompt.

Bug: 21024958
Change-Id: Ib595fbdb2801cc558085e9b8366d619ff1d4d656
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
69c6adc96eecfde74ceb83cf9177428dc08b6067 02-Jun-2015 Dianne Hackborn <hackbod@google.com> More API changes.

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
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
2ee5c368f844bc0f6ce55ff6d5cf3d5604cad5d8 30-May-2015 Dianne Hackborn <hackbod@google.com> Update VoiceInteractionService from API review.

This may even manage to retain compatibility with existing
binaries! (For now.)

Change-Id: I3b1386287a6b9b20b57ac2e2444fd6f458837277
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
09d57fe9b357495b7bc62be39a8befa00d9d7ffb 28-May-2015 Dianne Hackborn <hackbod@google.com> Add new API to set URI on AssistContent.

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
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
38a499edf5542fbd0948a02b77ecd84c0d62a846 19-May-2015 Dianne Hackborn <hackbod@google.com> Remove screenshot APIs.

Change-Id: I1efdb7945bd52f5f43c7103480be3d7dac60018b
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
1e38382b542f5cef9957a89692b02c55a3dd351c 10-Apr-2015 Dianne Hackborn <hackbod@google.com> Fixes to idle alarm scheduling, package importance.

- Add new API to ask the activity manager what the current
importance of a particular package name is (along with a few
new useful importance levels).

- Fix my last alarm manager change to actually execute the
alarms we have now decided should run even while we are idle.

Change-Id: I1f14712b4e390770d53b185c96a1b36f6aadd687
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
d59a5d59df920d743723521a2afed9de1da3373b 04-Apr-2015 Dianne Hackborn <hackbod@google.com> Various fixes and improvements...

Issue #19912529: VI: VoiceInteractor callback ClassCastException

Fix to use correct argument.

Issue #19912636: VI: Documentation for VoiceInteractionSession.onBackPressed

Added documentation.

Issue #19912703: VI: VoiceInteractionSession NPE on Abort Request

Maybe fix this -- don't crash if there is no active session.

Issue #19953731: VI: Add value index to...
...android.app.VoiceInteractor.PickOptionRequest.Option

There is now an optional index integer that can be associated with
every Option object.

Issue #19912635: VI: Behavior of startActivity when in voice...
...interaction is unexpected

We now forcibly finish the current voice interaction task whenever
another activity takes focus from it.

Issue #20066569: Add API to request heap dumps

New ActivityManager API to set the pss limit to generate heap
dumps.

Also added app ops for assist receiving structure and screenshot
data, so that we can track when it does these things.

Change-Id: I688d4ff8f0bd0b8b9e3390a32375b4bb7875c1a1
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
64e71cd6cce5c65548a570204f6cc8641ef1eddb 03-Apr-2015 Jorim Jaggi <jjaggi@google.com> Merge changes from topic 'assist'

* changes:
Add test assist to implement motion study
Implement new assist gesture and motion
Add flag to voice interactor for supporting assist gesture
Add more internal API's for assist
Add ability to start voice interaction session directly
225d3b5449d29b43e619d8538d024305f6e81ba9 01-Apr-2015 Jorim Jaggi <jjaggi@google.com> Add more internal API's for assist

- When starting a voice interaction session from SysUI, a callback
can be passed to know when voice interaction has successfully started
- Add a new window type for the voice interaction starting window,
which resides behind the voice interaction layer.
- SystemUI now also inspects the voice interaction service to get the
logo asset for the starting window.
- Make VoiceInteractionSession window fullscreen, to accomodate for
the visuals.

Change-Id: If8c3c445e8b39841f48e8d153e6d1ba81e447286
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
5688b03f7f4fafd671451ff73103be0f2388b32e 03-Apr-2015 Dianne Hackborn <hackbod@google.com> Add quick and dirty async AssistStructure building.

New APIs on ViewAssistStructure all the app to request to
build a sub-tree asynchronously and indicate when it is done
with that. The overall AssistStructure is now only flattened
and transfered on-demand, when the app receiving it requests
its data -- and at that point we can wait for any asynchronous
building to complete.

New AsyncStructure view is a very simple example of using this
to asynchronously build a child view.

Change-Id: I14f9199bee64915ad3dc80b2190916ec874308af
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
2d3455993e857b0da029abe9ce8dd88801319d07 28-Mar-2015 Andreas Gampe <agampe@google.com> am 1bca3532: am 0e6b4da5: am 5a15bf69: Merge "Frameworks/base: Fix request removal in VoiceInteractionSession"

* commit '1bca3532687675d81dea805b12577a6c3a00b4c3':
Frameworks/base: Fix request removal in VoiceInteractionSession
8ef92bd311e6faf602c9705db663abd451590fff 18-Mar-2015 Andreas Gampe <agampe@google.com> Frameworks/base: Fix request removal in VoiceInteractionSession

Fix and simplify removeRequest.

Bug: 19797138
Change-Id: I0eca877e3109c9f39cebd4c888f166ce334fcc0e
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
27eac1d58fe0b7ca3a2e27f5ed64eff232745f45 17-Mar-2015 Dianne Hackborn <hackbod@google.com> Add ability to get a screenshot for assist.

New flag you pass in to startSession() to say you want it,
new callback on VoiceInteractionSession to receive it.

Change-Id: I61fdcfdee41a60d46036a2ef16681a9b4181115a
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
3d07c94c393831091958fe6a98811843db8973bd 14-Mar-2015 Dianne Hackborn <hackbod@google.com> Add new voice request for picking from a list.

Also add API for voice interaction service to control
whether the system should hold a wake lock while it is
working with an activity (and actually *do* hold a wake
lock while doing so, duh!).

And while in there, clean up the launching wake lock to
correctly give blame to the app that is launching.

Change-Id: I7cc4d566b80f59fe0a9ac51ae9bbb7188a01f433
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
ffeecb1bfb9b71f4b62c9ef1fbf7b58a7a63f655 25-Feb-2015 Dianne Hackborn <hackbod@google.com> Rework voice interaction session lifecycle.

We now have a formal concept of the session being shown and
hidden, with it being able to continue running while hidden
as long as there is enough RAM.

This changes the flow that a VoiceInteractionSession will
see: onCreate() is when it is first created, onCreateContentView()
is when its UI first needs to be built, onShow() is called each
time it needs to be shown and has the arguments given when the
show request was made (which has been renamed from startSession to
showSession), and then onHide() will be called when the UI is
no longer shown.

The methods show() and hide() now allow a VoiceInteractionSession
subclass to control when it is shown and hidden, working with the
shown state being maintained by the system.

Change-Id: Ic4a430ec7e8bf76a5441fd0425e2932806170fcc
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
ae6688b09649447e57468b3e7935691bc09ec9b9 12-Feb-2015 Dianne Hackborn <hackbod@google.com> Update voice interaction layer for new UI design.

Can switch from a pure overlay at the top of the screen,
to interactive mode with the voice UI drawing at the bottom
and pushing its target activity up like an IME.

Add mechanism to get assist data to the voice interaction UI.

Add some basic visualization of the assist data, outlining
where on the screen we have text.

Add a test ACTION_ASSIST handler, which can propagate the
assist data it gets to the voice interaction session so
you can see what kind of data we are getting from different
apps.

Change-Id: I18312fe1601d7926d1fb96a817638d60f6263771
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
4e106cedfecd1f6026a79870c2e427853cba7491 15-Jan-2015 Dianne Hackborn <hackbod@google.com> Bring back voice interaction APIs.

Change-Id: I6039d7c0b188ac342441c56f7d19994b9a80ba17
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
d7c0395d26694c594c3e64b16ab647c971aeb422 30-Aug-2014 Dianne Hackborn <hackbod@google.com> Hide the interaction part of VoiceInteractionService.

Also the ability to start voice activities is turned off,
though for testing purposes it can be turned back on with a system
property.

Change-Id: I867704d32c53beeb851ceea9b45c28bf5c01ef61
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
9a35d78cad1a4cf9639053c24139147e658ec055 07-Aug-2014 Dianne Hackborn <hackbod@google.com> Fix to call VoiceInteractionSession.onDestroy().

Change-Id: I2b4f19538700c691dac3a83aadfa0959ef1fe458
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
d3fdb8bed8e836786253f9cd5ab640c7c5ed8501 07-Jul-2014 Barnaby James <bjames@google.com> Add VoiceInteraction request type for successful actions.

Add CompleteVoiceRequest to VoiceInteractor to allow apps to indicate when a voice interaction was successfully completed.

Change-Id: I1481cfe96e9e2495d88a7a4fb62263bdd1e03c54
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
a2c076d54048258cf88ab14551ce5fdf5a09c6e8 31-May-2014 Dianne Hackborn <hackbod@google.com> Clean up voice API.

Add various java docs.

Switch to CharSequence where appropriate.

Add new request for canceling voice interaction.

Also update test app to follow API changes and be more better.

Change-Id: If27eeba53cf6444660adb7d37ea2ce0557c6c91f
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
20d94749043d0851f1da10c7749fd7eb13a35081 30-May-2014 Dianne Hackborn <hackbod@google.com> More work on voice interaction visuals.

There is now a special theme for voice interaction activities
to use, so they can be a panel that is better intergrated with
the rest of the voice interaction experience. This is still
not completely working, I have some hacks in the demo app to
get it right; I'll fix that in a future change.

Also improve VoiceInteractor to be retained across activity
instances, for things like rotation.

And bump up the number of concurrent broadcasts that are allowed
on non-svelte devices, since they can handle more and this makes
the boot experience better when dispatching BOOT_COMPLETED.

Change-Id: Ie86b5fd09b928da20d645ec2200577dee3e6889d
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
e30e02f5d9a9141c9ee70c712d4f9d52c88ea969 28-May-2014 Dianne Hackborn <hackbod@google.com> Add system layer for voice interaction services.

New window layer that voice interaction service windows
go in to. Includes a new voice-specific content rectangle
that voice activities are placed in to.

Add specific animations for this layer, sliding down from
the top (though this can be customized by the voice interaction
service).

Also add the concept of activities running for voice interaction
services for purposes of adjusting the animation used for them,
again sliding from the top, but not (yet?) customizable by the
voice interaction service.

Change-Id: Ic9e0e8c843c2e2972d6abb4087dce0019326155d
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
c03c9167c2d9a1e22fb2b176b00a0524177fb037 02-May-2014 Dianne Hackborn <hackbod@google.com> Further work on voice interaction services.

This makes VoiceInteractionSession a more first-class
concept. Now the flow is that a VoiceInteractionService
calls startSession() when it wants to begin a session.
This will result in a new VoiceInteractionSession via the
VoiceInteractionSessionService containing it, and the
session at that point an decide what to do. It can now
show UI, and it is what has access to the startVoiceActivity
API.

Change-Id: Ie2b85b3020ef1206d3f44b335b128d064e8f9935
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
18f0d357f9693fe787a3e3777d8fdf01357a6e3f 26-Apr-2014 Dianne Hackborn <hackbod@google.com> Rework some of the voice interaction APIs.

On the app side, requests are now composed by subclassing
from various types of Request objects.

On the service side, starting a voice interaction session
involves starting another service that will then manage the
session. This leads the service design much more to what
we want, where the long-running main service is very tiny
and all the heavy-weight transient session work is elsewhere
in another process.

Change-Id: I46c074c6fe27b6c1cf2583c6d216aed1de2f1143
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java
91097de49b0f683b00e26a75dbc0ac6082344137 05-Apr-2014 Dianne Hackborn <hackbod@google.com> Initial implementation of new voice interaction API.

This gives a basic working implementation of a persist
running service that can start a voice interaction when
it wants, with the target activity(s) able to go through
the protocol to interact with it. It may even work when
the screen is off by putting the activity manager in the
correct state to act like the screen is on.

Includes a sample app that is a voice interation service
and also has an activity it can launch.

Now that I have this initial implementation, I think I
want to rework some aspects of the API.

Change-Id: I7646d0af8fb4ac768c63a18fe3de43f8091f60e9
/frameworks/base/core/java/android/service/voice/VoiceInteractionSession.java