summaryrefslogtreecommitdiffstats
path: root/services/voiceinteraction
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Don't call StopRecognition when recognition was aborted." into mnc-dr-devChris Thornton2015-10-151-4/+11
|\
| * Don't call StopRecognition when recognition was aborted.Chris Thornton2015-10-071-4/+11
| | | | | | | | | | | | | | | | | | | | | | 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
* | Fix issue #24743380: VoiceInteractionManagerService doesn't use current...Dianne Hackborn2015-10-092-4/+14
|/ | | | | | | | | | | | ...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
* add metrics to assistantChris Wren2015-08-061-0/+3
| | | | | | | | | long press screenshot enabled context enabled Bug: 22949579 Change-Id: Iac178207fa7149cda03c9a817a0d1450e46e1c59
* Merge "Work on issue #21516866: Implement voice interaction in ↵Dianne Hackborn2015-07-281-1/+1
|\ | | | | | | ResolverActivity" into mnc-dev
| * Work on issue #21516866: Implement voice interaction in ResolverActivityDianne Hackborn2015-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Don't use screenshot if structure is disabled (1/2)Jorim Jaggi2015-07-271-1/+1
|/ | | | | Bug: 22674955 Change-Id: I694bb8dbb578da9d729414c7f2947ba4c15651e3
* Add callback to voice interaction session for lockscreen shownJorim Jaggi2015-07-211-0/+22
| | | | | Bug: 22402726 Change-Id: Iaf83e2f2b0389d74b6ecf480aa91a34443803f7b
* Fix issue #22531747: Assist info should declare if user has disabled...Dianne Hackborn2015-07-203-44/+77
| | | | | | | | | | | | | | | ...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
* Implement issue #22403908: Enable assistant to refuse context sharingDianne Hackborn2015-07-153-6/+69
| | | | | | | New APIs allow the voice interaction service to set/retrieve a filter for which of the show flags are allowed. Change-Id: I588cbe55afee0548ad3afa22d3a7d3bc43cb54a6
* Fix assist for hardware long-pressJorim Jaggi2015-07-081-2/+3
| | | | | | | | | 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
* Fix issue #20672970: Notifications are not dismissed on hot word detectionDianne Hackborn2015-07-012-5/+40
| | | | | | | Add new VoiceInteractionSession.closeSystemDialogs() API that closes everything except the session itself. Change-Id: If45f1e120d8ca095b6c8055b6485acb5e710820e
* Add setting to disable screenshot separately (1/2)Jorim Jaggi2015-06-291-4/+7
| | | | | Bug: 22063668 Change-Id: Ief704004a8ab0a65d34753f9098003ba695726df
* Merge "Block assist when screenshots are disabled by policy" into mnc-devBenjamin Franz2015-06-291-2/+8
|\
| * Block assist when screenshots are disabled by policyBenjamin Franz2015-06-261-2/+8
| | | | | | | | | | | | | | | | 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
* | Also reset assist setting when force stopping assistJorim Jaggi2015-06-261-0/+6
|/ | | | | Bug: 20882522 Change-Id: I57725586ab5ff203b378a1e6d2e5e77a47fd2448
* Merge "Only grant runtime permissions to special components." into mnc-devSvet Ganov2015-06-191-0/+17
|\
| * Only grant runtime permissions to special components.Svet Ganov2015-06-191-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Assist disclosureAdrian Roos2015-06-192-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Bring back screenshot API.Dianne Hackborn2015-06-161-9/+5
|/ | | | Change-Id: Ia6bdfa300398d39119239f6a88c9992673edb3e0
* Fix issue #21816660 (app standby), work on issue #20882522 (voice interact)Dianne Hackborn2015-06-151-38/+71
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Make VIMS.SettingsObserver multiuser-aware.Yohei Yukawa2015-06-101-1/+2
| | | | | | | | | | | | | 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
* Close assist when launching intents from notification shadeJorim Jaggi2015-06-092-4/+25
| | | | | Bug: 21035363 Change-Id: I51a6dbe5f0d93aaf81a38d1f1afacaaeaf7732e2
* More API changes.Dianne Hackborn2015-06-022-37/+38
| | | | | | | | | | | | | 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
* Update VoiceInteractionService from API review.Dianne Hackborn2015-06-012-6/+8
| | | | | | | This may even manage to retain compatibility with existing binaries! (For now.) Change-Id: I3b1386287a6b9b20b57ac2e2444fd6f458837277
* Add new API to set URI on AssistContent.Dianne Hackborn2015-05-281-20/+25
| | | | | | | | | 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
* Cancel voice assist session on user switchJames Cook2015-05-221-0/+6
| | | | | | | | | 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
* am 782def77: am 80cf2210: Add config_forceVoiceInteractionServicePackage to ↵Cedric Ho2015-05-201-6/+24
|\ | | | | | | | | | | | | allow a device to config its VoiceInteractionService package and ignore the regular setting. * commit '782def772adacaf029d7d9850605923066665424': Add config_forceVoiceInteractionServicePackage to allow a device to config its VoiceInteractionService package and ignore the regular setting.
| * Add config_forceVoiceInteractionServicePackage to allow a device to config ↵Cedric Ho2015-05-201-7/+24
| | | | | | | | | | | | its VoiceInteractionService package and ignore the regular setting. Change-Id: Ic40d90f1a7a9942f5e82080668552239bbed9b03
* | Merge "Add setting to disable assist data (1/2)" into mnc-devJorim Jaggi2015-05-191-1/+8
|\ \
| * | Add setting to disable assist data (1/2)Jorim Jaggi2015-05-181-1/+8
| | | | | | | | | | | | | | | Bug: 20944446 Change-Id: I8050df3177b6d540829c3f0989a4e4b1381c87ec
* | | Remove screenshot APIs.Dianne Hackborn2015-05-181-0/+2
|/ / | | | | | | Change-Id: I1efdb7945bd52f5f43c7103480be3d7dac60018b
* | Fixed a bug with svelte and voice assistSelim Cinek2015-05-081-2/+3
| | | | | | | | | | | | | | Handling the case that no info is around. Bug: 20925281 Change-Id: Id5a4c4373877909a898c8852891a854eacbc1f6c
* | The voice assist may now be launched above the lockscreenSelim Cinek2015-05-052-1/+39
| | | | | | | | | | | | | | A possibility was introduced to launch voice assist over the lockscreen using the left keyguard affordance. Change-Id: Ic4618d24256b65441a50d77d0ef59b0ec99b6ead
* | Rename supportsAssistGesture to supportsAssistJorim Jaggi2015-05-011-2/+2
| | | | | | | | | | Bug: 20642759 Change-Id: Idddc786980244cc94570d04fd414540bbad60448
* | Update use of procstate for services.Dianne Hackborn2015-04-292-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | resolved conflicts for merge of 0af3af03 to mnc-devCedric Ho2015-04-271-6/+19
|\ \ | |/ | | | | Change-Id: I38f423be6dcef216cf813aa0f747be38f0ad792f
| * Enable VoiceInteractionService on watch.Cedric Ho2015-04-241-6/+19
| | | | | | | | Change-Id: I1d23ba55a98f6d68942cc344b4a564ab62285656
* | Fix VoiceInteraction permission issuesJorim Jaggi2015-04-153-21/+9
| | | | | | | | Change-Id: Id3796066353a6d7799ae983d18e6adc38c8cef52
* | More work on device idle mode and other power stuff.Dianne Hackborn2015-04-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add idle mode support to the alarm manager. Introduce a new concept of flags associated with alarms to tell the alarm manager how to treat the alarm -- they allow everything from the alarm that will bring us out of idle mode, to alarms that are allowed when idle or should also bring us out of idle. The standalone boolean is now also a flag. (Note there is currently no protection from user space setting the flags however it wants; I will be working on that in a follow-up change.) When in idle mode, the alarm manager pushes all alarms that shouldn't execute during that time over to a separate list that is not executed until out of idle. To help with this, I reworked a bit how Alarm objects are managed, so that when rebatching or moving between lists we don't have to allocated new objects but can just use the same existing instance. Also tweaked the sync manager to deal with idle mode, which currently just means doing the same thing as when low on storage -- turning off sync. Add new ACTION_CHARGING and ACTION_DISCHARGING broadcasts that apps can listen for to know when the device is actively charging and discharging. These are better than the old POWER_CONNECTED and POWER_DISCONNECTED ones because we only report charging when we actually see that there is enough power being provided to charge the battery (and will report discharging if there is not enough power). The job controller uses these new actions for scheduling jobs that want to run while plugged in. Removed the "stable charging" stuff while doing so, since the new charging state serves as an even better signal for that. Introduced two new process states: FOREGROUND_SERVICE and TOP_SLEEPING. This will allow us to treat foreground services specially (such as still allowing network access to them for background music playback) while not mixing them together with whatever happens to be the top activity while the device is asleep. Also some other small cleanup here and there. Change-Id: I7a9808b578bad6f50deb8e1baf919298512a0d3a
* | Various fixes and improvements...Dianne Hackborn2015-04-042-9/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Add flag to voice interactor for supporting assist gestureJorim Jaggi2015-04-031-56/+23
| | | | | | | | | | | | | | | | | | Add an additional flag to the voice-interaction-service declaration so it can indicate whether it is able to handle the assist gesture. Use that information in SystemUI so it only starts the voice interaction session if the service is able to support it. Change-Id: I62b035ce4f4cf06ee6e7eb0ddc4bf5edbc0e6737
* | Add more internal API's for assistJorim Jaggi2015-04-033-9/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | Add ability to start voice interaction session directlyJorim Jaggi2015-04-031-0/+54
| | | | | | | | | | | | | | | | | | Add internal API's for SystemUI to start a voice interaction session directly, without using an intent. Make the assist gesture use that ability, if available. Change-Id: I88ce3c7514714eb45666884847193585a07417a9
* | Add ability to get a screenshot for assist.Dianne Hackborn2015-03-171-35/+65
| | | | | | | | | | | | | | New flag you pass in to startSession() to say you want it, new callback on VoiceInteractionSession to receive it. Change-Id: I61fdcfdee41a60d46036a2ef16681a9b4181115a
* | Add new voice request for picking from a list.Dianne Hackborn2015-03-162-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | More work on collecting assist data.Dianne Hackborn2015-03-121-18/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Rework voice interaction session lifecycle.Dianne Hackborn2015-02-253-139/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Update voice interaction layer for new UI design.Dianne Hackborn2015-02-132-12/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Bring back voice interaction APIs.Dianne Hackborn2015-01-211-4/+0
|/ | | | Change-Id: I6039d7c0b188ac342441c56f7d19994b9a80ba17