• Home
  • History
  • Annotate
  • only in /frameworks/base/tests/VoiceInteraction/src/
History log of /frameworks/base/tests/VoiceInteraction/src/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0d723a2a4d83db5f01aa5a21f3cbd9d2b608bced 14-Apr-2016 Amith Yamasani <yamasani@google.com> Merge "Multi-window assist callback" into nyc-dev
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
om/android/test/voiceinteraction/MainInteractionSession.java
331ebfa7751a99a9e740d125c5ac4381a0151090 13-Apr-2016 Dianne Hackborn <hackbod@google.com> (Test only) A little more debug output for voice interaction test

Seeing the font size and stuff is useful.

Change-Id: I6fac69db97c0b81c09546be644d0784650b6f8ca
om/android/test/voiceinteraction/AssistVisualizer.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
om/android/test/voiceinteraction/MainInteractionSession.java
om/android/test/voiceinteraction/StartVoiceInteractionActivity.java
fb81d09d359480f9e43bbf300877b60de05f4816 04-Aug-2015 Dianne Hackborn <hackbod@google.com> Fix issue #22860466: viapi security bug - rubber stamping in nested VIs

Add new Activity.isVoiceInteractionRoot() API that an activity can use
to determine whether it is the root activity of a voice interaction
session started by the user's designated voice interaction service.

This is a special new API that apps must explicitly check, because as
with visual activities the model behind an activity should usually be
that it accomplishes its task by interacting with the user (implicitly
getting their approval) rather than trusting that whoever invoked it
is telling it to do what the user once. In the voice world, however,
there are some cases where quick interactions want to allow for immediate
execution without further user involvement, so this API allows for that
without opening up security holes from other applications.

Change-Id: Ie02d2458f16cb0b12af825641bcf8beaf086931b
om/android/test/voiceinteraction/TestInteractionActivity.java
afb308d6519c56cf2b8001b33dade35e682ab241 31-Jul-2015 Dianne Hackborn <hackbod@google.com> Fix issue #21895842: Add is_assist_blocked to assist.ViewNode.NodeProperties

Change-Id: I928882d42d0546cc6a12e803d96131beaba76d4e
om/android/test/voiceinteraction/VoiceInteractionMain.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
om/android/test/voiceinteraction/MainInteractionSession.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
om/android/test/voiceinteraction/MainInteractionService.java
om/android/test/voiceinteraction/MainInteractionSession.java
om/android/test/voiceinteraction/TestInteractionActivity.java
om/android/test/voiceinteraction/VoiceInteractionMain.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
om/android/test/voiceinteraction/MainInteractionSession.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
om/android/test/voiceinteraction/TestInteractionActivity.java
6f0fdc4167ad906fc7409856e86cd0cc601c3b53 07-Jul-2015 Dianne Hackborn <hackbod@google.com> Implement better handling of text in assist.

TextView is now much smarter about the text it reports, limiting it
to what is visible (plus a bit more). Also add a facility for it to
report where the lines of text are, both as offsets in the text string
and their baselines on screen.

Part of fixing issue #22328792: Fix scalability issues in AssistStructure

Change-Id: Idddb8c3a3331355f381e2d4af06d520fe7c7ce8e
om/android/test/voiceinteraction/AssistVisualizer.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
om/android/test/voiceinteraction/MainInteractionService.java
om/android/test/voiceinteraction/MainInteractionSession.java
om/android/test/voiceinteraction/TestInteractionActivity.java
70d8be7616a450e9b7ef09c8bda5a8b25936a29a 23-Jun-2015 Dianne Hackborn <hackbod@google.com> Fix issue #22013372: Assist should take translationX and friends...

...into account when calculating the position information

Actually what we need here is the full transformation matrix, if it
is available. And that means actually computing the location of
views on the screen requires doing this all through transformations,
so the AssistVisualizer has been changed to do this (while still
also keeping the old mechanism for comparison to verify that things
are working correctly).

Also added new properties for elevation and alpha.

And optimized the parcelling of AssistStructure to not write things
that aren't needed; this reduces the parcelled size by about half.

Change-Id: I50b0dd2e6599c74701a5d188617a3eff64b07d03
om/android/test/voiceinteraction/AssistVisualizer.java
om/android/test/voiceinteraction/MainInteractionSession.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
om/android/test/voiceinteraction/AssistVisualizer.java
om/android/test/voiceinteraction/MainInteractionSession.java
om/android/test/voiceinteraction/TestInteractionActivity.java
a3acdb33df7c7be7ff3d9f376ff833e4b0c1d897 09-Jun-2015 Dianne Hackborn <hackbod@google.com> Fix issue #21621920: VI: need mechanism to get current request

Add new APIs to associate a Request with a name, get all active
requests, and get active request by name.

Also add a new Activity.onProvideReferrer() which will allow
applications to propagate referrer information to the assistant
(and other apps they launch) in a consistent way.

Change-Id: I4ef74b5ed07447da9303a74a1bdf42e4966df363
om/android/test/voiceinteraction/MainInteractionSession.java
om/android/test/voiceinteraction/TestInteractionActivity.java
om/android/test/voiceinteraction/VoiceInteractionMain.java
dd231d466faa3102d59e458a6726ff3004e6b1c7 08-Jun-2015 James Cook <jamescook@google.com> Use VoiceInteractor.Prompt in VoiceInteraction test app

The framework API that takes a CharSequence as a prompt is now
deprecated, so update the test code to use the new API.

Bug: 21695917
Change-Id: Ic4b7afa6c547a9885a900ed092910f3c6bdd1dd4
om/android/test/voiceinteraction/TestInteractionActivity.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
om/android/test/voiceinteraction/MainInteractionSession.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
om/android/test/voiceinteraction/MainInteractionService.java
om/android/test/voiceinteraction/MainInteractionSession.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
om/android/test/voiceinteraction/MainInteractionSession.java
49b043f37d7231b1544cb72e1bfb616e5a00688d 07-May-2015 Dianne Hackborn <hackbod@google.com> Fix issue #20655182: API Review: ViewAssistStructure

Fix the various view assist related APIs.

Also remove the blockAssist view attribute, and instead use
the window's FLAG_SECURE to drive blocking of the entire
hierarchy (which is semantically correct, and will protect
existing apps that have already indicated they need it).

Change-Id: I6beebc86b202809cba0a356cae9607d8d0fb5e78
om/android/test/voiceinteraction/AsyncStructure.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
om/android/test/voiceinteraction/MainInteractionSession.java
om/android/test/voiceinteraction/TestInteractionActivity.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
om/android/test/voiceinteraction/AssistVisualizer.java
om/android/test/voiceinteraction/AsyncStructure.java
6251f0d42be7da54d7f1bc8f570a44883b7d9052 02-Apr-2015 Dianne Hackborn <hackbod@google.com> Rework assist to walk down the view hierarchy.

Instead of collecting all of the data directly in AssistStructure,
we now have a dispatch mechanism down the hierarchy to do so.
While doing this, also added the ability to automatically collect
assist data from AccessibilityNodeProviders attached to views
(so now we see all of the data in for example Calendar).

This is a first step needed towards being able to asynchronously
populate assist data.

Change-Id: I59ee1ea104ca8207bad8df7a38195d93da1adea7
om/android/test/voiceinteraction/AssistVisualizer.java
om/android/test/voiceinteraction/MainInteractionSession.java
0b071a08d8dec3e68937590938199273f3b123cc 20-Mar-2015 Dianne Hackborn <hackbod@google.com> Add view ID, rework assist API.

Add view ID information to the assist structure.

Also rework the API to simplify how it works by removing
the ViewNode wrapper around ViewNodeImpl -- these are now
just the same thing. And then add complexity by introducing
a formal WindowNode object that contains the top-level window
information (so I can add in some more window-specific info
in the future).

Change-Id: I5d525cf61ab6a73193e5cceb4c09d2d21cc27bae
om/android/test/voiceinteraction/AssistVisualizer.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
om/android/test/voiceinteraction/AssistVisualizer.java
om/android/test/voiceinteraction/MainInteractionService.java
om/android/test/voiceinteraction/MainInteractionSession.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
om/android/test/voiceinteraction/MainInteractionSession.java
om/android/test/voiceinteraction/TestInteractionActivity.java
a83ce1dd2ad3a6b71e90ff4845afc1299fe17b9d 11-Mar-2015 Dianne Hackborn <hackbod@google.com> More work on collecting assist data.

Optimize parceling of AssistData (which is now renamed to
AssistStructure) by pooling duplicated class name strings.

Change text associated with a view node to a CharSequence,
so styling information comes along.

Include global text attributes -- size, colors, etc.

Introduce a new AssistContent structure, which allows us
to propagate information about the intent and data the
activity is looking at. This further allows us to propagate
permission grants, so the assistant can dig in to that data.
The default implementation propagates the base intent of an
activity, so if for example you bring up the assistant while
doing a share the assistant itself has the same information
and access that was given to the share activity (so it could
for example share it in another way if it wanted to).

Did some optimization of loading PersistableBundle from xml,
to avoid duplicating hash maps and such.

Changed how we dispatch ACTION_ASSIST to no longer include
the more detailed AssistStructure (and new AssistContent)
data when launching; now the example code that intercepts
that needs to be sure to ask for assist data when it starts
its session. This is more like it will finally be, and allows
us to get to the UI more quickly.

Change-Id: I88420a55761bf48d34ce3013e81bd96a0e087637
om/android/test/voiceinteraction/AssistProxyActivity.java
om/android/test/voiceinteraction/AssistVisualizer.java
om/android/test/voiceinteraction/MainInteractionService.java
om/android/test/voiceinteraction/MainInteractionSession.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
om/android/test/voiceinteraction/AssistProxyActivity.java
om/android/test/voiceinteraction/AssistVisualizer.java
om/android/test/voiceinteraction/MainInteractionSession.java
om/android/test/voiceinteraction/TestInteractionActivity.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
om/android/test/voiceinteraction/AssistProxyActivity.java
om/android/test/voiceinteraction/AssistVisualizer.java
om/android/test/voiceinteraction/MainInteractionService.java
om/android/test/voiceinteraction/MainInteractionSession.java
om/android/test/voiceinteraction/TestInteractionActivity.java
140616a89c0ecadd22758e42fbca99c74773db84 05-Sep-2014 Dharmesh Mokani <mokani@google.com> am 6feba6b6: am 0b230ea6: am efd4ea01: Merge "Address API review comment:AlwaysOnHotwordDetector" into lmp-dev

* commit '6feba6b61ecddcb93a2b33a2ea52daad6cf70bd5':
Address API review comment:AlwaysOnHotwordDetector
ae686a51288031271685861436f7c67201791d09 04-Sep-2014 Dharmesh Mokani <mokani@google.com> Address API review comment:AlwaysOnHotwordDetector

- Methods creating an Intent should be named createFooIntent

Bug: 17389896
Change-Id: Icb9c9f9ca3a41fca09f79ff22b99988a1ded331f
om/android/test/voiceinteraction/MainInteractionService.java
7f31f82432b4d5a63b7f0a993a786250187c0a74 29-Aug-2014 Sandeep Siddhartha <sansid@google.com> am 601d017c: am efe6c903: am cffbcb8a: Merge "Address API review comments" into lmp-dev

* commit '601d017c2209f0a7930503a0bc97b4e762e4e8a1':
Address API review comments
ee16bdc33d32e923032073919ded1f2efe9677e1 25-Aug-2014 Sandeep Siddhartha <sansid@google.com> Address API review comments

- Make Callback an abstract class
- Split manage intents into 3 different methods
- Remove RECOGNITION_FLAGS_NONE

Bug: 17255602
Change-Id: I1329f889bb2ab35938f42d2ecfe755d2b17ec542
om/android/test/voiceinteraction/MainInteractionService.java
7395be68292437b73c434aefcdd2d5a1b0101695 25-Aug-2014 Sandeep Siddhartha <sansid@google.com> am c95d61e1: am b6943e7b: am fe3a5e88: Merge "Fix conversion of locale from BCP47 language tag" into lmp-dev

* commit 'c95d61e15c33519225e2d89af58aeb9843776e2f':
Fix conversion of locale from BCP47 language tag
539207b99174e16149973c4aedeefa3be0331abc 25-Aug-2014 Sandeep Siddhartha <sansid@google.com> am 68f133b4: am a8d8e4c4: am e829259d: Merge "Fix the Locale story in the hotword API" into lmp-dev

* commit '68f133b422733f89c9e226c636ce6153d4e86f1c':
Fix the Locale story in the hotword API
fb30d6936a4793a3369fbf8bf51fa526b8a77272 24-Aug-2014 Sandeep Siddhartha <sansid@google.com> Fix conversion of locale from BCP47 language tag

Bug: 17187528
Change-Id: Ifcf707c9be736885f3fc79f3c36087ecf9092971
om/android/test/voiceinteraction/MainInteractionService.java
dcf3068fcb55f101680e70a8a6f84f3b2c9cb1e3 23-Aug-2014 Sandeep Siddhartha <sansid@google.com> Fix the Locale story in the hotword API

Tighten the API by taking in a locale rather than a string tag.
Tighten the checks when reading the enrollment metadata, bail out if any
attribute is missing or invalid.
Add missing recycle call for a TypedArray

Stop recognition when sound model(s) change. This is needed during
un-enrollment/re-enrollment.

Bug: 17187528
Bug: 17205230
Change-Id: Idb00b51ef8c4ea0a8f8993decea582223181fa3d
om/android/test/voiceinteraction/MainInteractionService.java
aa6983e9329d9702d78f74522778ade60ddd9d96 11-Aug-2014 Barnaby James <bjames@google.com> am 69d4c16b: am fc5a45fd: am 57ab4478: Merge "Make Test Voice Interactor support new requirements." into lmp-dev

* commit '69d4c16bd7fe2530f8fd35f04b87cb3034d8bafe':
Make Test Voice Interactor support new requirements.
0134fd8139611964cb8f58198c7b7a923d62161d 09-Aug-2014 Barnaby James <bjames@google.com> Make Test Voice Interactor support new requirements.

Add settings activity and stub RecognizerService to voice interactor test.

Change-Id: I3c3dda7d2c30eac5e0b889c0c7305dc8f4dfbcb9
om/android/test/voiceinteraction/MainRecognitionService.java
om/android/test/voiceinteraction/SettingsActivity.java
140dd87333c7ddc9604a338d7647f664403c7d95 08-Aug-2014 Sandeep Siddhartha <sansid@google.com> am 22a3c9e6: am 9ac2891f: am 53f4a335: Merge "Handle microphone contention/Phone calls while recognition is active" into lmp-dev

* commit '22a3c9e6d899197f772837dabb810a539d3782ac':
Handle microphone contention/Phone calls while recognition is active
a8054cfe3cf8ba033ab33767f39231c2a0af20cb 08-Aug-2014 Sandeep Siddhartha <sansid@google.com> am 73d5dc67: am 969edb82: am 5885981a: Merge "Fix build break" into lmp-dev

* commit '73d5dc67665778a5cf01dc0cb0d586e57834c991':
Fix build break
cb4e81c7fe1ec843d80f7604a688c71086c23685 06-Aug-2014 Sandeep Siddhartha <sansid@google.com> Handle microphone contention/Phone calls while recognition is active

Internally we pause the recognition when:
- a phone call is active/off-hook/ringing
- or some other application grabs the microphone

we auto-resume when the condition that caused us to pause reverses.

Both these events are notified to the client via callbacks so that they can choose to display on their UI,
that the recognition is paused for some reason.

Bug: 16515468
Bug: 16740806
Bug: 16514535
Change-Id: Ib274d68522c8cf37d42402c875b16159957657f0
om/android/test/voiceinteraction/MainInteractionService.java
db92e35211d875eab75787c593eea2988c8a560f 07-Aug-2014 Sandeep Siddhartha <sansid@google.com> Fix build break

Change-Id: I7af700671f1a2e910b6e08498381c8adb40631f8
om/android/test/voiceinteraction/MainInteractionService.java
cb188253572f0b07325c2c6e2c2d7ec7e3d2c7c6 06-Aug-2014 Barnaby James <bjames@google.com> Fix VoiceInteractionService.isActiveService.

Small fix + added to the test application.

Change-Id: I05ad84c32064fc98d3bb90eff921702af9855a66
om/android/test/voiceinteraction/TestInteractionActivity.java
2c0273e50a3162595e9a54030166f2369b039a5a 01-Aug-2014 Sandeep Siddhartha <sansid@google.com> Add a flag for multiple triggers with same recognition session

Also annotate the flags with @IntDef to make things clearer and safer

Add more debug logging

Revert to start/stop being synchronous since telephony and microphone will
need to be handled internally.

Bug: 16731586
Bug: 16514535
Bug: 16549061
Change-Id: I83695d52e9547269c95d443e4d921c9238b7401e
om/android/test/voiceinteraction/MainInteractionService.java
668327d0286591324fa7592ee9b39255076e2165 29-Jul-2014 Sandeep Siddhartha <sansid@google.com> Tighten the checks around a detector being invalidated

Don't call back for a detector being marked invalid because
that happens when someone else obtains a detector or VIS shuts down,
in either case we don't want a loop where two entities keep creating new detectors
and being invalidated.

Don't call back on an invalid detector for availability change/detected/started and stopped
only propagate errors.

This helps us with cases where a callback for the previous VIS may get called and then crash because it
tries to make calls without being the current VIS.

In the new scheme of things, if the VIS changes, or the current VIS obtains a new AlwaysOnHotwordDetector,
the previous one is shutdown and internally marked as invalid and all calls to it fail with an IllegalStateException.

Bug: 16629417
Change-Id: I74417bf76ba80916ebc21b042c18b3467857733e
om/android/test/voiceinteraction/MainInteractionService.java
1ed12ddb8c46193cc4d790b9c7d6a5d61afb3311 29-Jul-2014 Sandeep Siddhartha <sansid@google.com> Make startRecognition async

- This is needed for telephony and audio integration which should happen via async callbacks
that'll end up starting/stopping recognition.

e.g. if a startRecognition happens when in a phone call - the onDetectionStarted will get called once the phone
call ends.

For now the transient stoppages due to internal reasons will not be propagated back to the client.

Bug: 16514535
Bug: 16515468
Change-Id: I1b2b8edd28f5c5e67c453f66c23e1a67a626114e
om/android/test/voiceinteraction/MainInteractionService.java
f63bc523eadbe01ce0a5ad52868a5dccb3d5f6dd 22-Jul-2014 Sandeep Siddhartha <sansid@google.com> Make hotword availability a callback

This helps us make the list sound models operation an async one, it also helps us
with the case where a detector is invalidated, so the client doesn't have to keep checking the
state.

Synchronize DatabaseHelper methods on its instance so that other VoiceInteractionManagerService
calls aren't blocked on db writes/reads.
It's still possible for the list operation to be blocked on update and vice-versa

Change-Id: Ib8ec4ac5056b62d443038560ce31d0641b4627b0
om/android/test/voiceinteraction/MainInteractionService.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
om/android/test/voiceinteraction/MainInteractionService.java
110f569b47bc21fb38ec25b6110ee302ce137e06 20-Jul-2014 Sandeep Siddhartha <sansid@google.com> Fix synchronization issues in AlwaysOnHotwordDetector

- Remove unnecessary recognition status from AlwaysOnHotwordDetector

- Remove unnecessary recognition started callback from IRecognitionStatusCallback

- Fix a bug around the fact that we weren't picking up enrollment at runtime because
we were storing the availability at instantiation time.

- Handle 0-length arrays in SoundTrigger classes while parceling/unparceling

- Fix issue in SoundTrigger helper where we were not comparing binders for start/stop calls

- Unload the previous model when starting a new recognition

- Add more debug logging

Change-Id: Icc56d7f3dd1ffa49a8cfeea49080e3ab4d342c32
om/android/test/voiceinteraction/MainInteractionService.java
7444c906faef1f7a9a6e6f7a443ba156f1e856be 17-Jul-2014 Sandeep Siddhartha <sansid@google.com> Test hotword flow

- Also fix a few StrictMode violations in DatabaseHelper

Change-Id: I93f27407dae34cc0dca5e9f891d4ca718d6010a5
om/android/test/voiceinteraction/MainInteractionService.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
om/android/test/voiceinteraction/MainInteractionService.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
om/android/test/voiceinteraction/MainInteractionSession.java
om/android/test/voiceinteraction/TestInteractionActivity.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
om/android/test/voiceinteraction/MainInteractionService.java
22968950b814e66a6aa119ea92ae648884cbe0d9 10-Jun-2014 Sandeep Siddhartha <sansid@google.com> Activity for enrollment

- Make the enrollment attrs public
- Add a dummy activity for enrollment

- Manually tested that the meta-data is correctly read by the
VoiceInteractionService when the enrollment application is under
/system/priv-app

Change-Id: I36676ed8ffc919109031c26bac047d0c51a77e13
om/android/test/voiceinteraction/MainInteractionService.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
om/android/test/voiceinteraction/MainInteractionSession.java
om/android/test/voiceinteraction/TestInteractionActivity.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
om/android/test/voiceinteraction/TestInteractionActivity.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
om/android/test/voiceinteraction/MainInteractionService.java
om/android/test/voiceinteraction/MainInteractionSession.java
om/android/test/voiceinteraction/MainInteractionSessionService.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
om/android/test/voiceinteraction/MainInteractionService.java
om/android/test/voiceinteraction/MainInteractionSession.java
om/android/test/voiceinteraction/MainInteractionSessionService.java
om/android/test/voiceinteraction/TestInteractionActivity.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
om/android/test/voiceinteraction/MainInteractionService.java
om/android/test/voiceinteraction/MainInteractionSession.java
om/android/test/voiceinteraction/TestInteractionActivity.java
om/android/test/voiceinteraction/VoiceInteractionMain.java