Clients must unregister themselves when client-side AudioRecord
goes away. This allows removing the tracking record sooner than
the client app goes away.
"DEATH" event has been renamed to "RELEASE". Client death is handled
the same way as regular release.
Bug: 123312504
Test: start and stop audio recording, check "dumpsys audio"
Change-Id: I6a9578b29ab3c41bac2bf4c823224276efbe1beb
If audioRecord.release() is called explicitly, APC DP is released.
When the AudioRecord.finalizer() is called by the JVM, the APC DP would
be released again, leading to misleading error message.
Bug: 131064451
Test: call AudioRecord release and check that the finalizer do not log a
release failure
Change-Id: Ia7092274ea8ac8e0a6754dfe2541f823f650384d
Signed-off-by: Kevin Rocard <krocard@google.com>
Client port ID must not be anonymized as it is used by
AudioRecord class to filter out the corresponding
recording configuration.
Bug: 123312504
Bug: 131756086
Test: atest CtsMediaTestCases:AudioRecordTest#testAudioRecordInfoCallback
atest CtsMediaTestCases:AudioRecordTest#testGetActiveRecordingConfiguration
Change-Id: I3e32395e9df107db76cfc940fecda8d066c05d97
Reproduced the failing case, even without thread pool changes.
Since RingtoneManager was blocking on the call anyways, changing it
to use the synchronous scanFile method directly should be fine.
Bug: 131882699
Test: manual add MP3 with RingtonePickerActivity
Change-Id: I53b49ed17403cda93ecfefb6985133b161a96983
This CL also makes throw IllegalArgumentException when controller
tries to set the speed to zero.
Bug: 131873534
Test: atest CtsMediaTestCases:android.media.cts.MediaSessionTest;
atest CtsMediaTestCases:android.media.cts.MediaControllerTest;
atest CtsMediaTestCases:android.media.cts.MediaBrowserTest;
atest CtsMediaTestCases:android.media.cts.MediaSessionManagerTest;
Change-Id: I78f775df369de48b1ebda66fdb6e251b6e0865c1
Make sure that the content type is always properly set from
legacy stream type in the case where the product strategy matching
this legacy stream type does not specify it.
Bug: 129506383
Test: playback with Youtube and check content type with audio service
dumpsys
Change-Id: Ibaac0edc21bc44a56c632fb420b94deee710869d
Platform may support lower or higher sample rate but
it's limited with the fixed value.
This change makes it possible to configure min/max
limit by system properties.
Bug: 30483830
Test: Use MediaCodecInfo for the codec which has higher
sampling rate.
Change-Id: Ifb6da86d21b530fb908e68bdb71474aee4d1b581
- When MediaMetadataRetriever can't create the thumbnail of some
HEIF files, attempt decoding it from ExifInterface.
- ImageDecoder can't create the thumbnail with getThumbnailBytes
from ExifInterface in some cases. It will occur DecodeException:
Failed to create image decoder with message 'unimplemented'Input
contained an error. Attempt to decoding the full image in these
cases.
- Use orientation from ExifInterface to transform the thumbnail to
right orientation.
Test: manual
Test: atest ThumbnailUtilsTest
Bug: 130775874
Fix: 130446058
Change-Id: Icd0726ec49fe85651150736199c3caa184fa1a3f
Allows public apps to detect if playback have opted-out of being
capture.
Bug: 129948989
Test: atest AudioPlaybackConfigurationTest
Change-Id: Id2c2ad195e5fdeba89926dcdbbe9fa22c2d25891
Signed-off-by: Kevin Rocard <krocard@google.com>
Update RecordActivityMonitor to use events sent from clients
about their recording activity and coalesce them with
configuration update events sent from audioserver (APM). This
allows providing a high-level view on the recording
configurations consistent with client expectations.
For recorders that are managed entrirely on the server side
(AAudio MMAP) all events do contain configs. These recorders
do not have an associated death handler and need to be cleared
on audioserver restart.
Clearing client-managed trackers on audioserver restart is not
needed anymore. Clients will either continue
recording (AudioRecord handles IAudioRecord re-instantation) or
stop recording and notify AudioService about that.
Bug: 123312504
Test: android.media.cts.AudioRecordingConfigurationTest
AudioRecordTest#testAudioRecordInfoCallback
MediaRecorderTest#testAudioRecordInfoCallback
manual testing using Oboe and Solo test apps
Change-Id: I4718f983c2d90e9c3e7480719a24bd187df7f80a
A regression was introduced by commit @6d69bde which caused a new
Builder instance to be created when using setLegacyStreamType(),
instead of returning the current one.
Bug: 130274354
Test: atest android.media.cts.AudioAttributesTest#testSetLegacyStreamOnBuilder
Change-Id: Ib66a0beb5f0f4489a6003cb9be6b8313b3318eac
The MediaStore.VOLUME_EXTERNAL volume is a merged view of all storage
devices, and clients working on a specific volume need to focus on
the volume they're interested in.
Bug: 129840030
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I91cee6a96d7f9360e6a93a9a3c389b097b6b9967
For get/set APIs, FLAG_MUTE_HAPTIC is known as a boolean value instead
of a flag. In that case, it should not be changed when calling set flags
API to modify the flags. By doing this, it helps the FLAG_MUTE_HAPTIC is
set correctly.
Bug: 130670988
Test: Manually
Change-Id: I6a507d1f6f82e5ea6520f83279f73f851605c93f
Offload support check now supports passing AudioAttributes.
Do not require AudioTrack usage to be USAGE_MEDIA, check of use
case will be done in AudioSystem.isOffloadSupported().
Bug: 129133576
Test: use offload for USAGE_ASSISTANT
Change-Id: I00065fb936600cfcdf29bc019173699db7ec5a2f
Unfortunately AudioMixingRule being in a different package,
some of its members had to be made public @hide to be used
by AudioPlaybackCaptureConfiguration.
Bug: 129948989
Test: atest AudioAttributesTest
Change-Id: Ie8cdf67aee9ff7cf9144a66d47c301712516cf87
Signed-off-by: Kevin Rocard <krocard@google.com>