Add a public API to get a HW A/V sync ID for a given
audio session.
Bug: 161929047
Test: atest AudioManagerTest#testGetAudioHwSyncForSession
Change-Id: I71d838adb7cd1b655f8daa9c1594f9f83cb89f6b
WRITE usage flag.
Since some producers rely on these buffers being unchanged (eg. for
partial rendering), this feature should be used with caution. A warning
to this effect was added in the Javadoc.
Bug: 162287616
Test: built emulator, confirmed no SIGSEGV anymore (b/162287616 fixed).
Change-Id: Ia1f8b8754b0d6ae75a2af33147645e744d593d82
Enable registering/unregistering an AudioPolicy, and then
registering it again later.
Doing so was failing before as when a policy was re-registered,
its mix count didn't restart at 0 on the client side, causing
the mix to have an invalid registration string not in sync with
the policy configuration on the server side.
Bug: 161491896
Test: atest AudioHostTest#testAudioPolicyReuse
Change-Id: I51fc41c46817791de4ce3a4f9d36c38d9466602e
MediaProvider added a restriction in R for apps targeting SDK 30 to
not allow .tmp files in image file directories such as "Pictures" and
"DCIM". This CL renames the temp file to avoid this restriction.
Also added test to check for writing to FileDescriptor instances.
Bug: 160874777
Test: atest CtsMediaTestCases:android.media.cts.ExifInterfaceTest
Also tested with an image file inside /Pictures
Change-Id: Iedb548651c0048b0aecc4b34e9c94f778cf5d1e0
SimpleDateFormat will use the default locale value if not explicitly
set. If the default locale is Arabic, SimpleDateFormat#format will
return a string that does not conform to the given pattern.
In ExifInterface, if setDateTime is called on a device with an Arabic
locale, it will write a string value that will not follow the EXIF
standard "YYYY:MM:DD HH:MM:SS" format. Thus, we need to set the
locale to Locale.US at all times.
Bug: 160674042
Test: N/A
Change-Id: I2ad42f73742fd8ceeeeae47eafea69015f50814d
It removes onLoadChildren because onLoadChildren is not used anymore
that is identical to onLoadChildrenWithOptions with null options. It
also renames onLoadChildrenWithOptions to onLoadChildren for simpler
name.
Test: atest CtsMediaTestCases:android.media.cts.MediaBrowserTest \
CtsMediaTestCases:android.media.cts.MediaBrowserServiceTest
Change-Id: I6aebd812249cd3a717aa6d2f48e4a40601ef1063
The repo hook complains about unused imports because MediaController is
not used in code but javadoc.
Test: m offline-sdk-docs
Change-Id: I0dc6a99a77f344e326c4bbe0c216c4f0f44be696
Add HapticGenertor, which is an audio effect that can generate haptic
data from audio data.
Bug: 136490803
Test: atest HapticGeneratorTest
Change-Id: Ib677f0ad82ae4a164546300c7a86760cdb6a52b4
Code copied from aosp/1148409 and aosp/1236647 with some minor
changes.
Original commit message:
Added code and test for WebP files
1) with EXIF data
2) without EXIF data but with other extra data
Added code and test for saving EXIF to WebP files without EXIF data
1) and have lossy encoding
2) and have lossless encoding
Also refactored test method names for better readability.
Bug: 138786288
Test: atest CtsMediaTestCases:android.media.cts.ExifInterfaceTest
Change-Id: Ib6319e1b7b6711b071542d94ebfdc4a9f80e9c16
SUBMIX type can be returned by routing query APIs such as
MediaPlayer.getRoutedDevice(), make it public.
Bug: 160819170
Test: atest AudioHostTest#testTwoChannelCapturingCheckSubmixDevice
Change-Id: Ie5854ad86464c40137d0a1b10420116bc5cc270e
A metrics for audio mode changes and failure to release IN_COMMUNICATION
mode when inactive.
Bug: 153934174
Bug: 161444687
Test: repro steps in Bug and verify logs and metrics
Change-Id: Ib3beab2e8b64e7354ff1a32f04561e7b95f61855
TRM is checking input parameters and won't allow null executor.
Use context main executor to call Tuner Resource Manager (TRM)
Also fix ConcurrentModificationException when use HashMap.forEach to free element in hashmap.
Test: atest MediaCasTest
bug: 161391585
Change-Id: Ie5111b46b5b601f0a5b56e5828d79771e153a210
Replace with SystemServiceRegistry.registerContextAwareService,
which is a @SystemApi. See ag/9734296 for reference.
Bug: 160380016
Test: atest
CtsMediaTestCases:android.media.cts.MediaSessionManagerTest
Change-Id: I9b6da97e0e0f5181ce8681a399ca090e67f6fd4e
MediaSessionManager calls ServiceManager#getService(string) to get
ISessionManager, but it is a hidden API that will not be made into
@SystemApi (ag/6329675).
Instead, create a wrapper class that can only retrieve specified
media service binders. (ag/10123575 for reference)
Bug: 159955826
Test: atest
CtsMediaTestCases:android.media.cts.MediaSessionManagerTest
Change-Id: I1ab89d1217e8e3d071b38da772ee96889e9859b1