See build/soong/README.md for more information.
Test: m checkbuild
Change-Id: I417409281c928ea667d937090d2a0d9d72a449a2
Merged-In: I417409281c928ea667d937090d2a0d9d72a449a2
Exempt-From-Owner-Approval: trivial conversion
(cherry-picked from commit e0b2ee52d2f274a2d46b2e6695e42d2764c39fa7)
...VOICE_RECOGNITION_SERVICE that is needed for SearchSpeechServices
System setup was incorrectly completely runing off
VoiceInteractionManagerService if the associated feature is not set,
but the service needs to always be running, and instead rely on
the existing logic of reducing functionality if it should not be
running full voice interaction services.
Test: manually booted and ran
Bug: 65055576
Change-Id: I9a83216d45689440c71d657ba2721faf0662b0ff
When invoking updateAllRecognitions, if a callback binder was determined
to have died, an internal function would go and remove it from
mModelDataMap. However, updateAllRecognitions was iterating over this
map, so it would then explode. By first making a copy of the model datas
before iterating over all of them, this problem is avoided.
(As part of trying to figure out what was happening, also updated all
the method names that implicitly assumed they had a lock, and double
checked that everything with a Locked suffix is actually locked)
Bug: 62487479
Test: Use the sound trigger test app to load and start two models, force
kill the app (so the dangling binders hang around), then enable power
save (which triggers the call to updateAllRecognitions)
Change-Id: I87b9dfc1b2af5e294050b146737916ccaad882c1
- 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
When the package that contains the current voice interaction service component
is changed, internal state of VoiceInteractionManagerService needs to
modified to correctly reflect that.
Bug: 36649034
Test: manual
Change-Id: I7e21ac25785b035711affd87f1b04efa717b13c4
This change introduces new methods on DumpUtils that can check if the
caller has DUMP and/or PACKAGE_USAGE_STATS access. It then moves all
existing dump() methods to use these checks so that we emit
consistent error messages.
Test: cts-tradefed run commandAndExit cts-dev -m CtsSecurityTestCases -t android.security.cts.ServicePermissionsTest
Bug: 32806790
Change-Id: Iaff6b9506818ee082b1e169c89ebe1001b3bfeca
If some process tries to start a recognition, the STH will now check to
see if there are any other models that have been loaded and either:
- Have a callback that's died (determined by pinging the binder)
- Don't have a callback at all (meaning they didn't clean up after the
last detection and didn't start it again).
If it finds such a model, it will be stopped and unloaded, freeing up
resources in the HAL.
Test: Manually load model/kill the process and make sure that it is
unloaded the next time some other model is loaded. Also made sure
running models aren't evicted.
Change-Id: Ia1139b47afe5f88102a3773d90f4f056ea3cdc92
If an app has died while being connected to the sound trigger helper/the
binder goes away, we should stop and unload the model since there's no
way to get a handle on it again (without reloading the same UUID at some
point).
Test: Force stop the SoundTriggerTestApp while it has a model started,
trigger the sound model, then watch it get unloaded when the helper
notices that the binder is dead.
Change-Id: Iddfaaa03482d56e71f23e5982d4bd579f386b51d
The BatterySaverPolicy is designed to consolidate all battery saver
knobs into a central location. Usually it is consistent to
mLowPowerModeEnabled unless it gets different data for specific
service. By adding these knobs, we can effectively tune the battery
saver.
This cl sets up the framework for BatterySaverPolicy and updates
following service to get battery saver data from BatterySaverPolicy
1. GnssLocationProvider
2. VibratorService
3. WindowManagerService
4. BackupManagerService
5. SoundTriggerService
6. NetworkPolicyManagerService
Screen brightness will come in a following cl.
Bug: 34693888
Test: FrameworksServicesTests
Change-Id: I6b040e93391614b44d136a485faa4a332c396e51
- 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
Window tokens can now only be on one display, so we now require clients
that want to add/remove window tokens to specify the display they would
like the token to be created on. This simplifies the token handling code
in WM and will be useful moving forward for clients that want to add
windows to external displays.
Test: Existing tests pass
Change-Id: I6b2d8d58a913b3624f1a9a7bebbb99315613f103
The public API for getting at KeyphraseSoundModels is based on the user,
locale, and keyphrase ID. However, the sound model database would allow
multiple models to be registered using the same values, as it has a
primary key on the model UUID. This can potentially lead to a scenario
where multiple models are enrolled for the same user, and the data that
is returned when querying models is arbitrary.
V6 of the sound model database now enforces a primary key over the user
ID, locale and keyphrase ID. When inserting a new model with the same
primary key, the old model will be removed and the new model will be
used instead.
When upgrading from V5 to V6, if there are any models that would violate
the primary key constraint, they are all dropped.
Bug: 32174118
Change-Id: I9597c6a994f01a426625c3be2c53e826f26f5156
...on removing the third pary search app
We weren't taking into account old style assistants when determining
whether something interesting had been removed.
Change-Id: I6b7b09cdf0781622924e10556d678565570dbd05
If the recognition was aborted due to the service state being set to
false, clients were not made aware that the model had been stopped (but
would get a resume event).
Bug: 30233664
Change-Id: I9f663362ff142eadfd5ef727c5f0c941f8e9e89d
We need to figure out the default voice interactor to give
it default permissions. This happens before the user has
been unlocked and if the voice interactor is not direct
boot aware we fail to find it, hence no permissions are
granted. Now we query the package manager for both direct
boot aware and unaware components. This is fine as we
don't interact with the assistant until the user is
unlocked.
bug:28963642
Change-Id: Ide5471fa1798e868c6e3a4b5e87570a5556e2d3f
This is to fix an incorrect unregister() that was crashing
the system server. The only way it could be happening is
because of incorrect locking. So, hopefully this fixes it.
Bug: 28813750
Change-Id: Ie3c47ffa3024a0c533e12db0d2d021df8fc0367a
When multiple activities within the same process
try to handle requests for AssistStructure, the
singleton mLastAssistStructure tends to trash
the old structure when a second window's request
comes in.
This change passes in a sessionId so that the
cache is only cleared if the session id changes.
Bug: 28348867
Change-Id: I07efcd933db7e48aefd25a1c95493b71bbcffe4b
When the VIMS changes the implementation or has its implementation force
stopped, it used to stop all the recognitions that were in the
SoundTriggerService (without letting those clients know that they've
been stopped). Instead, the VIMS should just unload the keyphrases that
it loaded, so the other clients are not perturbed.
Bug:28518547
Change-Id: Ia70e8576f43cb8a8521c947ff7fc56f63cfbad54
The STH just needs to log the fact that a model has been stopped when it
is aborted. We also need to allow models to be stopped even if the
service is unavailable.
Bug:28474708
Change-Id: I2d618ae9c7c87311223f7d75b8ded7678252d11c
During stopAllRecognitions(), the internal state of a sound model was
being cleared (which made it look like the model was being unloaded).
However, the model was still loaded, so subsequent calls to load a 'new'
model would break.
Bug:28432002
Change-Id: I7090bf52704c6e46e3bb6d495d8fe4b8a1d9e2ad
Fixes: 28293783
CTS: DisableContextTest#testContextAndScreenshotOff failure
When assist context is disabled, make sure that the handleAssist() is
still called with no data.
Change-Id: I569dd9f6de503e62fb04c590214df0f2ce3aa4f3
Fixes the incomplete initialization on FBE devices when
voice interaction service is not available before unlock.
Change-Id: I397237e4554453d29da643aee59384e289fa3654
Fixes: 28183380
Introduced new error codes so that Instrumentation can
include the correct message in the exception.
Bug: 28216630
Change-Id: I93ee77153cdad11fa208c74c28c6790db27c9753
This CL adds the ability in STH to manage multiple voice models indexed by
keyphrase ID, which is an integer.
Bug: 28104190
Change-Id: I8e10cca05ed8b4b8414cae7fffc26c132d4b7cbd