History log of /frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
fc3ec4c5e689e4d64f0c24d42a3b4b31ee4621c4 02-Jun-2017 Winson Chung <winsonc@google.com> Prevent showing voice session when it is already queued to be hidden.

- It is possible for the session to be requested to be hidden before it
gets the message to be shown and completes showing. This leads to an
inconsistency where the voice interaction service implementation will be
in a different state than the system for the session. Instead, we can
cancel any pending show messages, and also clean up the pending show
callback list immediately when the session is hidden.
- Also fixing up some error message codes when starting the assistant
activity.

Bug: 38379130
Test: android.server.cts.ActivityManagerAssistantStackTests
Test: CtsVoiceInteractionTestCases
Test: CtsAlarmClockTestCases
Change-Id: I0d0e9c024367a47bda82d6a29ca89e18b7d69527
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
8347163dbb64fb61012c0393163283106a0a351e 13-Dec-2016 Winson Chung <winsonc@google.com> Create a new stack for the assistant activity.

- Add a new stack that is not resized with multiwindow, and
appears above the fullscreen and docked stacks, but below
the pinned stack
- Add a method on VoiceInteractionSession to allow the assistant
to launch activities into this new fullscreen stack.
- Also prevent any activities in the assist stack from the
fetching of the on screen assist data.

Bug: 30999386
Test: android.server.cts.ActivityManagerAssistantStackTests

Change-Id: I22ab7629b5f758cf1e66d7d1c26648af6bc887c9
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
dc589ac82b5fe2063f4cfd94c8ae26d43d5420a0 11-Nov-2016 Sudheer Shanka <sudheersai@google.com> Update usage of ActivityManagerNative.

- Remove references to ActivityManagerProxy.
- Add isSystemReady to ActivityManager.

Bug: 30977067
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test android.server.cts
adb shell am instrument -e class com.android.server.am.ActivityManagerTest,com.android.server.am.TaskStackChangedListenerTest \
-w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I07390b6124fb1515821f5c0b37baf6ae74adc8fa
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
d953ab6fdf788352f1524685ad8e608a87c299c0 07-Jul-2016 Annie Chin <afchin@google.com> Move voice interaction callback list to VoiceInteractionManagerService

Bug: 30005941

Change-Id: I23b3bba8b4525068b0f032d5ca908c0f1d181558
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
ecb9f3e9b810c6d59d31e8bdeff6cc174d170792 28-Jun-2016 Annie Chin <afchin@google.com> Add callbacks to VoiceInteractionManagerService

Bug: 29582254

Change-Id: I548d01bd1c7e261b2d2e0afd606d964e5553124e
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
42449786211591d097d0fbac72296534c4ab23b6 19-Apr-2016 Amith Yamasani <yamasani@google.com> Throw better exception when startVoiceActivity fails

Introduced new error codes so that Instrumentation can
include the correct message in the exception.

Bug: 28216630
Change-Id: I93ee77153cdad11fa208c74c28c6790db27c9753
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
e8222e551f8abd2d82ca4f77ddb275e2e509751e 09-Apr-2016 Amith Yamasani <yamasani@google.com> Multi-window assist callback

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
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
0af6fa7015cd9da08bf52c1efb13641d30fd6bd7 18-Jan-2016 Amith Yamasani <yamasani@google.com> Voice Interaction from within an Activity

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
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
6ac42aeed905181b484f97a53db57a17134ef7a8 09-Dec-2015 Dianne Hackborn <hackbod@google.com> Add a mechanism for broadcasts to control background dispatching.

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
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
c83189b5d6ab2fe5f1c38cbe22254f4995379c88 17-Nov-2015 Dianne Hackborn <hackbod@google.com> Fix issue #25673462: Shamu update from MMB29J -> 29K does not complete

The direct path to the package manager returns null on failure, oops!

Change-Id: Id33ea299b605a59b0703dab200bafb754dd66e78
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
958b9d2ecc0fabdd1d6d3e99b001f0fa57897da9 10-Oct-2015 Dianne Hackborn <hackbod@google.com> Fix issue #24743380: VoiceInteractionManagerService doesn't use current...

...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
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
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/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.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/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
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/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.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/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
4f43dc042bf76ec6c3b340b2297dec7c4cdd9098 18-Jun-2015 Adrian Roos <roosa@google.com> Assist disclosure

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
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
b835dd7641c60cd5d2b372331ffc19f7165244bd 08-Jun-2015 Jorim Jaggi <jjaggi@google.com> Close assist when launching intents from notification shade

Bug: 21035363
Change-Id: I51a6dbe5f0d93aaf81a38d1f1afacaaeaf7732e2
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.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/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
496767c142fbf8b412237f9ffc2f9af411a3d077 23-May-2015 James Cook <jamescook@google.com> Cancel voice assist session on user switch

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
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
e70d6535237d2e6f03adcd0bdc11e45ea714dc97 25-Apr-2015 Selim Cinek <cinek@google.com> The voice assist may now be launched above the lockscreen

A possibility was introduced to launch voice assist over
the lockscreen using the left keyguard affordance.

Change-Id: Ic4618d24256b65441a50d77d0ef59b0ec99b6ead
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
d69e4c1460017062e7c36be55801cb434ad19d97 24-Apr-2015 Dianne Hackborn <hackbod@google.com> Update use of procstate for services.

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
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
b09f8e29dd7d45b2044c3c75fa40e3b31c5d2cfa 16-Apr-2015 Jorim Jaggi <jjaggi@google.com> Fix VoiceInteraction permission issues

Change-Id: Id3796066353a6d7799ae983d18e6adc38c8cef52
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.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/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
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/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.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/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.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/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.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/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
1b012d302b56b4adf950035136d1d191a1936d5a 20-Aug-2014 Jeff Hao <jeffhao@google.com> Add sample profiling option to am.

Also bundles all profiling options into a class.

Bug: 17040932
Change-Id: I85d675ee1494bdc7308caffdf94145d27c996e9d
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
8ef360f34893771ee22a8ec7a1dc9c9aedc4b38c 29-Jul-2014 Sandeep Siddhartha <sansid@google.com> Notify VIS of shutdown before switching implementations

This lets the implementation cleanup before it's destroyed.

Bug: 16629417
Change-Id: Ia717d461677e9ca8fa66f02c030aacad1597692d
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
6daae9622672e0b38fc2efed29f68061d749cacc 21-Jul-2014 Sandeep Siddhartha <sansid@google.com> AlwaysOnHotwordDetector needs to reflect enrollment changes

Add a callback for when any sound model change happens. This helps the VIS
to re-check the availability and either enroll the user, or start/stop recognition.

Also shut down any active recognition when VIS dies, or a different hotword detector instance is obtained from VIS.

Change-Id: I03f94e78c6ee307afe822a84aebc7e74c64de7b4
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
fee756ff91ab4d8f0e09ddb050d22d88ebb66ae7 17-Jul-2014 Dianne Hackborn <hackbod@google.com> Implement issue #16330060: Inform ActivityManager about WebView...

...state changes.

Add a new API to tell the activity manager about a new dependency
one process has on another package. Start using it already for
when apps is Context.createPackageContext() to load code from another
app.

Also do some work on getting the monitoring of proc/uid states
in shape so it can be used by unundled code, along with an
AppImportanceMonitor class for doing so.

Some small fixes and additions to VoiceInteractionService.

Improve handling of unaccounted/overcounted battery use so that
they aren't shown to the user unless they are significant.

Change-Id: I22dd79a73f4e70103d3f8964494aebc8a31f971c
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
d7018200312e4e4dc3f67cf33dc90bf7ce585844 11-Jul-2014 Sandeep <sansid@google.com> Always on hotword changes

Add model management API skeleton to VoiceInteractionManagerService
Add an "interactor" for all always-on APIs

- The VoiceInteractionService will get an interactor for the given
keyphrase and locale.
- It can then check the availability and call methods to start and
stop recognition on this interactor.

- Add a common class to deal with SoundTrigger APIs

- Cleanup the keyphrase representation:
We now have separate representations for the keyphrase metadata and
a keyphrase being used for recognition.
This'll also help us to handle custom keyphrases in the
future easily.
This also ensures that for use within the framework,
we rely on the ID of the KeyphraseInfo rather than comparing the
text everytime.

Add a callback for the AlwaysOnHotwordDetector

This callback should be passed in by the VoiceInteractionService and is used to notify it
of recognition events.

Change-Id: I26252298773024f53a10cdd2af4404a4e6d74aae
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
6ea0d0a2592395b8980c24304733daec628e947e 03-Jul-2014 Dianne Hackborn <hackbod@google.com> Fix cleanup of voice sessions.

They would leave active voice activities lingering around.

Change-Id: I5b6716ab303636ebdf2f13c3172552a73dae3bb1
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.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/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.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/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.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/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.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/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java