This reverts commit f105c93c4a.
Reason for revert: b/132974796#23 the offloaded thread will be holding a lock for a noticeable period of time and cause contention.
Bug: 132974796
Change-Id: Ic81a2e3ee7226266c8f97b606fc1a2834240f689
This limitation is being added to increase privacy protection.
Bug: 70619678
Bug: 117213117
Test: built android
Change-Id: Ic6ceed60a9687204fc7bf440becaa344a42d8e74
Make the get actions API async. Also fix a potenrial
memory leak when exchaning callbacks.
Test: atest CtsVoiceInteractionTestCases
bug:129705716
Change-Id: I91f1beb3dc7a395c6c6307ca4601fe7b7097f6e3
DirectActions are abstract actions defined by an Activtiy. The
actual definition of these actions will be available through
the support lib.
This API provides a secure channel for system or assistant to
interact with a running app using these Actions.
Test: atest CtsVoiceInteractionTestCases
Test: added android.voiceinteraction.cts.DirectActionsTest
Bug: 129705716
Change-Id: I0ce568e0d8f41e0fe46306052016a74c7b394efa
Wallpapers and Input Methods are bound by the system
and are only brought up to BFGS, which is insufficient
for getting foreground location. Add the required
flag to the bindService call to allow the bound process
to reach FGSL when visible.
Same for VoiceInteractionServices
Bug: 117494189
Test: Manually enable a wallpaper that needs location and
verify it gets location.
atest CtsAppTestCases:ActivityManagerProcessStateTest
Change-Id: I6767e1f480e5b3d6e33864dabd9cb167df4846f5
- Trigger the role changed callback manually when initializing the
voice interaction manager in case the role handler changed prior to
registering the listener. In addition, ensure that we query for all
packages regardless of current locked state.
Bug: 130126913
Test: Wipe device, restart and ensure that the assistant setting is set
(adb shell setting get secure assistant)
Change-Id: I170189d9fd5177108c62c486e93b35a3a32af48c
Updated logic to allow HotWord detection while phone is ringing (still
not off-hook).
Test: Manual Testing
Bug: 124762676
Change-Id: Idce6d39a5589aee6d5baa4e5bcd8d98b3e13b239
and the mechanism to use it
Since both starts and bindings might be contributing to the service
being whitelisted, track the state in ServiceRecord and update
the parent process accordingly when changes happen.
While we're at it, add that flag for bindings to accessibility
services, voice interaction services and QSTiles.
Also, make the timeout constant configurable for start-based
whitelisting.
Bug: 124298522
Bug: 123495976 (accessibility services)
Bug: 123337181 (paying via NFC, like Google Pay)
Bug: 122887611 (binding to InCallService)
Bug: 127774234 (binding to QSTile)
Bug: 124288681 (binding to voice interaction services)
Test: atest WmTests:ActivityStarterTests
Test: atest AccessibilityServiceConnectionTest
Test: manual with:
1) notifications from calendar and dynamite to test service starts
whitelisting
2) enabling talkback and livetranscribe to test service bindings
whitelisting
3) adding the LastPass QSTile and clicking on it
Change-Id: I8b6f23f999683920411ca40ab5b25c688a4f7055
Continuation of ag/6226654; edits made per Svetoslav's last comments.
Bug: 122740752
Bug: 123080754
Test: blueline-userdebug build completes successfully.
Change-Id: I3e43137eb6e0d8cae77e14d331150d5a05ede07c
- Extract current code for checking caller into a private method
- Replace occurrences of that code with a call to the private method
- Add method call to setTranscription/clearTranscription/setVoiceState
Test: Verified Milford can't call setTranscription/clearTranscription
when it is no longer the active service.
Bug: b/123412646
Change-Id: I2c428c6c65b62f6a83264286df4f44fb5d1c249e
events.
This change should have been part of ag/5933708
Test: manual test with NowPlaying app on p19 device
Change-Id: I42ed7c17ebdd2cb75055122b8d45302e28c510b6
- Register a role observer in VoiceInteractionManagerService. Once the
role is changes map the new role setting onto the old settings.
- As the assistant role is now always set, there is no need to have code
in AssistUtil for the case the assistant setting is not set
- Remove old config option for the default assistant. The default
assistant is not configured via the roles config
Bug: 110557011
Test: - Set, unset and swtiched assistant via the settings UI
- for voice interaction service
- for assist activity
- Booted from freshly wiped device and saw assitant to be set to
default
Change-Id: I8596f49c6f6496e8b70cf3236aaa7d7557443a93
Voice state as well as voice transcription can be provided by the
VoiceInteractionService. These get proxied to the AssistManager which
can update the system UI to reflect the state & transcription.
Test: TBD
Bug: 122740752
Bug: 123080754
Change-Id: I79cac1d89fe0123bf25a05d551cb4ef40ae1368e
The top-level framework overlay already says this should (by default) be
skipped if the device is low-ram (leaving the device able to turn it
back on again without committing to a specific voice recognizer at build
time):
<feature name="android.software.voice_recognizers" notLowRam="true" />
The form factor-specific overlay for tablets does override this back to
a state where the feature is always enabled regardless of low-ram:
<feature name="android.software.voice_recognizers" />
But this is probably a mistake as the code before this change ignored
the feature flag anyway in case of a low-ram device, using a hardcoded
check.
Lets Android TVs have voice recognisers working on all devices by
default without needing to set katniss' package as a force override.
Bug: 117630721
Test: flashall ; adb logcat | grep VoiceInteractionService
Change-Id: I7816bebbc363ae0751b097fe1b6cdc2a646b20e0
as regular recogntion events
The application will differentiate between DSP and app triggered
regcognition events.
Test: manual test with STTA and NowPlaying app on p19
Bug: 119386757
Change-Id: I4a3eb4da6ee6be35084fec8aaa3c495423d74033
If you have a legacy assist app (launched through ACTION_ASSIST, not
implementing a VoiceInteractionService) then we kept the Google app
as the current speech recognizer. Thus if you force stopped the
Google app, we saw that as one of the active parts of the interactor
or recognizer and reset all of the state.
Now we handle the "only recognizer" case separately, only resettting
the recognizer state in that case.
Bug: 121104681
Test: manual
Change-Id: Icc007bdf2352548d58be997fae77d9e5aba842f3
Add @GuardedBy for simple functions that require locks and have a name in
one of the frameworks naming styles for locks ("^.*(Locked|LPw|LPr|L[a-zA-Z]|UL|AL|NL)$").
Derived by errorprone.
Bug: 73000847
Test: m
Change-Id: If70bb03313388af34d547efca20fb5115de95bf1
Allows for other services like window manager to call uri grants without
holding AM service lock.
Bug: 80414790
Test: Existing tests pass.
Change-Id: Ie5b4ddb19a2cedff09332dbeb56bcd9292fd18ac
Moved more stuff related to activities out of the current service to the new one.
Bug: 80414790
Fixes: 110988007
Test: Existing tests pass.
Change-Id: Iceed1da8a7441a26d11efebc6d9f692fd053bc7f
One heavy dependence between the current AMS service and activities
is process management which is heavy affected by activities and their
current state. We introduce WindowProcessController and WindowProcessListener
objects as a structured way for the process changes in AM package to
be communicated to the WM package and WindowProcessListner for activity
changes in the WM package to the communicated back to the AM package.
The ProcessRecord object in AM will own the WindowProcessController object
and also implement the WindowProcessListener.
Test: Existing tests pass
Test: go/wm-smoke-auto
Bug: 80414790
Change-Id: I9e96e841b0f95e99a597cb4629fa5d2fe45760b6
Moved more stuff related to activities out of the current service to the new one.
Test: Existing tests pass
Test: go/wm-smoke-auto
Bug: 80414790
Change-Id: I16863dd977bf09136cc23b0ab3aa197c613879ea
Objects that contain or represent activities like ActivityRecord can
no longer rely on ActivityManagerService as it is going to be in a
different package.
Test: Existing tests pass
Test: go/wm-smoke-auto
Bug: 80414790
Change-Id: I7eabc9b80e494367d79ff7452c88ba82ff216bcd
3rd step in unifying the window hierarchy that is currently split
within AM and WM packages. We separate the the internal interface used
to communicate within system server dealing with activities and their
containers (tasks, stack, display) from the rest of AM internal
interface.
Test: Existing tests pass
Test: go/wm-smoke-auto
Bug: 80414790
Change-Id: Idad77721c1fe10621b9be5dced42a0a11f0183e5
Second step in unifying the window hierarchy that is currently split
within AM and WM packages. We move some of the API implementation for
activities from ActivityManagerService.java to
ActivityTaskManagerService.java.
Test: Existing tests pass
Test: go/wm-smoke-auto
Bug: 80414790
Change-Id: I23dcd924493d8ad1e0b6e3a55386fd72b0146605