* changes:
System apps are not allowed to record better then 16kHz mono
Fix permission check when registering an audio policy
Refactor security checks to register policies
This privacy requirement was documented but was not implemented.
Test: atest android.media.cts.AudioPlaybackCaptureTest#testCaptureMediaUsage
Bug: 129948989
Change-Id: I256e6ed1965263416a893393d5462ec73099751e
Signed-off-by: Kevin Rocard <krocard@google.com>
- If we do full file decoding, we should not handle orientation by
ourselves.
- If we decode the thumbnail from ExifInterface.getThumbnailBytes()
or MediaMetadataRetriever, we should handle the orientation.
Change-Id: I632b0b0ed41710401192dfb12f407eaf74c480ba
Fix: 130446058
Test: manual
Comparing by constructing full Uris doesn't work when one of the
values has been canonicalized.
Bug: 132816653
Test: atest android.media.cts.RingtoneManagerTest#testAccessMethods
Change-Id: Id4b26820e76ec3d1d56ba6cf3c76375dafcf92c0
remove mBypassInterruptionPolicy unused since
app ops are managed by PlayerBase.
Bug: 131873101
Test: make
Change-Id: Ifb07fd0f4e5a14384b71ac010a35614969b9761e
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