std::remove_if will only move elements around within the range it was
handed. In order to have the elements actually removed from the vector,
we need to erase() them.
Caught by clang-tidy:
/buildbot/src/googleplex-android/rvc-release/frameworks/av/media/codec2/vndk/util/C2InterfaceUtils.cpp:219:9:
warning: the value returned by this function should be used
[bugprone-unused-return-value]
(and 3 others)
Bug: 154665437
Test: TreeHugger
Change-Id: I9244baf7d6f46cce4c2d8f66fcf57b19c19d32ab
Merged-In: I9244baf7d6f46cce4c2d8f66fcf57b19c19d32ab
If an optional ID3v2.4 extended header was present, it would be
treated as a frame, causing parse errors. Fix by doing ID3v2.4
per-frame unsynchronization after skipping over the extended
header.
Bug: 154357105
Bug: 151448144
Test: CTS, manual w/ temporary additional logging.
Change-Id: Iaeb8cab866b98dcf97f81d3ade4a1c8d26add3a5
Call various functions after calling AAudioStream_release().
Bug: 154274446
Bug: 154274027
Test: this is a test
Change-Id: Ia0938362502b15a4ae5608f0619e0bc5ce78ca22
Free the AudioEndpoint and check for nullptr to
prevent accessing shared memory that had been freed.
This is to protect against calls to the stream after
AAudioStream_release() has been called.
Bug: 154274446
Bug: 154274027
Test: libaaudio/tests/test_various.cpp
Change-Id: I194d502fd48c4d31602ffce76aca6b28753ad7d2
Do not allow changing volume on an output when
the specified device is not supported by the
corresponding output profile.
There is a similar sanity check in setOutputDevices()
but there was none in AudioOutputDescriptor::setvolume().
Bug: 153411189
Test: atest AudioManagerTest
Test: manual audio smoke tests
Change-Id: I539697c54d70c442ba1ce38d212b43cd3ef0138c
This can prevent some loud noises during unit tests.
Also use std::unique_ptr
Bug: 154342174
Test: libaaudio/tests/test_various.cpp
Change-Id: I1c1dc0f4a6a29cf7d7a656392a81a325847de22d
The list of possible paths for the audio configuration
files is now retrieved using audio_get_configuration_paths()
function. All duplicated lists of known configuration
directories have been removed.
Bug: 153680356
Test: test audio on built image working
atest VtsHalAudioV6_0TargetTest VtsHalAudioPolicyV6_0TargetTest
Change-Id: I8c369442f5ca7baa17df95e6a001396fc9de5681
Merged-In: I8c369442f5ca7baa17df95e6a001396fc9de5681
Use listManifestByInterface in v1.2 servicemanager to list all
instances of drm service from the manifest. If it's lazy hal, the
service will be started as lazy hal service in getService.
Test: Play secure video in ExoPlayer
Bug: 153636761
Change-Id: Ifda4c9c433cfc1cd38980b10b8641f1db4460773
Do not systematically request a stream disconnect upon
EVENT_NEW_IAUDIOTRACK received AudioTrack but only if the new
audio Track properties have changed in such a way that the initial
contract is broken.
Bug: 139763500
Test: OboeTester TEST DISCONNECT
Test: OboeTester TEST OUTPUT while enabling/disabling Live Caption
Change-Id: I3b43275a888e23471fcd1ce20725f5731a77a255
Bug: 147894326
Test: build
Exempt-From-Owner-Approval: This CL only changes build config, but not
the test logic.
Change-Id: I5f2e6db3ebff48cd53be07c49c24c58c9b116306
With HAL1-camera2 legacy implementation, the getCameraCharacteristics
may be called without camera permission. So the cameraserver's Uid is
used in that case.
AppOpsManager returns MODE_IGNORED when the cameraserver's Uid is passed.
Do not treat this as an error case.
Bug: 153511543
Test: On Pixel 2 device, run "adb root; adb shell setprop
persist.camera.HAL3.enabled 0; adb reboot", then "atest
cts/tests/camera/CaptureRequestTest"
Change-Id: I29aaa2045b14233537c737bf0738fbc32422540e
Based on some usecase, outputing in float is not an option.
Should allow a property to select the behavior
Bug: 140952553
Test: NativeDecoderTest#testExtractor
Test: MediaExtractorTest#testFlacIdentity
Change-Id: Idf2bf382f50d12c00a85aa7bb5582fb0439c6ea1
Signed-off-by: Jean-Baptiste Théou <jb@essential.com>
Because callbacks are called from a looper thread, if the subscriber
unsubscribes and frees the callback, invalid memory access may occur from the
looper thread.
Address this by draining all pending callbacks at the time of listener
unregistration.
NOTE: There is rare chance that the wait on the condition times out,
still resulting in the original NPE issue. We intensionally allow that
to avoid deadlock, in case the application uses the same mutex lock for
callbacks and unregister functions.
Test: for i in {1..10}; do atest -it NativeImageReaderTest; done
Test: ACameraNdkVendorTest
Bug: 148976953
Change-Id: I92f5a02a4e3e63f2e72e8043ff4f4ac16c1eec5d
Duplicating outputs do not have an associated IOProfile and
getPolicyAudioPort() returns null.
Add a method to AudioIODescriptorInterface to query if the
input or output descriptor corresponds to MMAP IO profile or not.
Bug: 153849965
Test: repro steps in the bug
Change-Id: I300356880198f1785e3a5e1359ffd393c6ae4190
Scenario: startAudioSource (SW bridge) started, then stopped.
AF patch is released, so PlaybackThread has empty patch.
Next playback using the same sink will not recreate any patch
on AF as same device (and output desc has still valid patch handle)
Hence, ioconfichanged will get PORT NONE as sink device, no
onAudioDeviceUpdate cb can be fired.
This CL fixes this issue by reset of patch handle on the output
Bug: 136121584
Test: startAudioSource / stopAudioSource then playback on the same
sink. Ensure onAudioDeviceUpdate is fired
Test: atest RoutingTest
Signed-off-by: Francois Gaffie <francois.gaffie@renault.com>
Change-Id: Ia9c2570f687166f38335ed7efae28920f7acc474
With b/152655547, all aidl_interface modules are considered as stable
unless it is explicitly with "unstable: true". This change marks the
aidl_interface that are not used across updatable module bounraries
as unstable, so that the build system does not run the API
dumping/checking on them.
Bug: 152655547
Test: m
Change-Id: I5597f7d3fa0e2196dbfcf7ab9a33c71c15a33806
The internals of AData do exactly the type casting that upsets CFI
sanitizers, so disable CFI for those routines.
Bug: 153739236
Test: atest sf_foundation_test
Change-Id: I69ac7f064a8d3c874d7587598b450af657c4ba59
Add error checks for invalid number of coupled streams and channel
mapping values
Bug: 148771305
Test: test in bug
Change-Id: I0d8fcbaa514dfe55a94246f8f847be9a14be7a60