Calling release on a policy from mAudioPolicies removes a key from the
map, causing a ConcurrentHashException.
Defer releases till after iteration completes.
Test: Compiles
Bug: 240314224
Change-Id: I83fa969204d8a9c6ac7bae40f5be57a92813f6be
(cherry picked from commit 6f837517a2a9106deac7bb076db1cf78f72e0438)
Merged-In: I83fa969204d8a9c6ac7bae40f5be57a92813f6be
The current design makes the caller can pass any package name,
but in fact, stopVpnRunnerAndNotifyAppLocked() only cares about
the current prepared package. So if the caller pass a package
name which is not the current prepared, the method will not
work. Remove the parameter and use mPackage directly to prevent
the caller misuses this method.
Bug: 236409954
Test: atest FrameworksNetTests:VpnTest
Change-Id: I9297bf97fdcd7cef8ab0dadff3e6c05bf77fc667
This value needs to be explicitly set to false to prevent re-using a
stale "true" value.
Fixes: 245965753
Test: CTS SensorHeadTrackerTest#testDiscontinuity (pending upload)
Change-Id: Icd018e0cab9e30b0677970760a38a390d9dd2a3c
It will cause NullPointerException if the system app set the wallpaper
before the third-party app set the wallpaper.
Change-Id: I7e68cf3f89b690c7b114fa087d1fd1203d8eb4d6
Fixes the general transaural and
binaural equivalence of different devices.
Prior to this fix only speaker and true 3.5mm wired headphones
could be enabled.
Now all SADevices will have a canonical device type.
Test: Plug in USB headset, verify spatializer works.
Bug: 239081163
Merged-In: I904a299556f1cccb9d8d69a23245e387f7a5d35e
Change-Id: I904a299556f1cccb9d8d69a23245e387f7a5d35e
* changes:
Use explicit aidl versions for audio hal and soundtrigger dependencies.
Add AudioAttributes and AudioFlag for use in HAL interface for engine configuration.
Define new property to indicate whether head tracking for spatial
audio is enabled by default.
Read property in AudioService and pass it to SpatializerHeper
which will use the defalut value every time a new device connects.
Fix unit test to account for recent hardening of device
compatibility management. Add initialiation test method in
SpatializerHelper to ensure we can test settings with devices
for binaural and transaural modes.
Bug: 242620201
Test: pair BT headset, observe head tracking toggle in UI
Test: atest SpatializerHelper
Merged-In: Ie3af7a13537d114cb603d3c83e9ca2ba86cd7f67
Change-Id: Ie3af7a13537d114cb603d3c83e9ca2ba86cd7f67
Check for null on current device for media.
Bug: 242213248
Test: check cluster
Merged-In: I263b55565c3c30ee999b7d8513263e0d2e7e76fb
Change-Id: I263b55565c3c30ee999b7d8513263e0d2e7e76fb
Force reinitializing the sensors if the headtracking is enabled
for a given device and headtracker is not available.
Bug: 244430716
Test: repro steps in bug
Change-Id: Ic16f5be105ae5a95217bf55c2b454fbbbea54893
Do not consider BT SCO devices as compatible with spatial audio.
This is justified because SCO is mono by nature. It also fixes the
problem of having two devices with the same mac address but conflicting
spatial audio settings.
Bug: 242777739
Test: verify head tracking still works after a phone call
Merged-In: I1918f8ec82e1d79416804a6ec47df7181b0d79eb
Change-Id: I1918f8ec82e1d79416804a6ec47df7181b0d79eb
Fix state update in onRoutingUpdated() in case of failure to
communicate to the native spatializer: this can cause an exception later
in setDispatchFeatureEnabledState(). Instead, try to recover by
triggering a reset.
Fix other places where exceptions are thrown instead of just logging an
error or triggering a reset.
Bug: 241018866
Test: make
Merged-In: I2ca01b76d701e7f5db7ba08d159bba843b145e4e
Change-Id: I2ca01b76d701e7f5db7ba08d159bba843b145e4e
Fix SpatializerHelper.setSpatializerEnabledInt() to
avoid overriding the enable state computed by onRoutingUpdated()
when spatial audio is enabled.
Bug: 238378679
Test: repro steps in the bug
Merged-In: I2e77945c889c1db093832f780c632a626e979e7c
Change-Id: I2e77945c889c1db093832f780c632a626e979e7c
Treating warnings as failures avoids unexpected issues at build and
runtime, particularly for missing class references. Unblock this by
adding explicit top-level references to several stub classes, and
suppressing a warning for optional jacococ class references (guarded
by a runtime check in CoverageService).
Test: m services (also w/ EMMA_INSTRUMENT(_FRAMEWORK)=true)
Bug: 242088131
Change-Id: Iee02a30eeccdcf785e90438d1557867ffda659e7