The method deprecateStreamTypeForPlayback() is inherited from
android.media.PlayerBase, which is hidden. This method was never
intended to be in the SDK, but somehow ended up in the public SDK.
Bug: 126701135
Bug: 126702126
Bug: 126702177
Test: make -j api-stubs-docs-update-current-api
Change-Id: Ibdd7898f18432c2179f81cd53b132164bcd4c670
If they were null, then the Parcelable would fail to work.
Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
- Added explanation when AudioPresentation.Builder needs to be
used.
- Add @NonNull to Builder.setLocale parameter.
- Complete parameters docs for Builder's methods.
- Use 'CharSequence' instead of 'String' in Builder.setLabels.
- Mark Builder class as final.
Bug: 125800702
Test: atest CtsMediaTestCases:AudioPresentationTest
Change-Id: Ib2c259439a0fde29612ce75b20f7f318d378d71f
* changes:
Allow to project audio from a Screen capture MediaProjection
Expose allowAudioPlaybackCapture to PackageManagerNative
Introduce playback capture application manifest flag
This patch adds in AudioSystem setter/getter of volume index
and also getter on index min and max according to the given
audio attributes.
Bug: 124767636
Test: dumpsys media.audio_policy
Change-Id: Ia20fcfbf5e20c98de5eb07551c299dc99d678fb8
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
-put in cache collection in AudioService
-add helper function in Strategies and volume groups
Bug: 124767636
Test: dumpsys media.audio_policy
Change-Id: I688abf79ce7dead927fbd021e48bf6460d6cdc85
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
This CL adds introspection APIs for Audio Volume group
and callback notification on group volume change.
It allows to keep the same level of service available today
in CarAudioManager and is a starting point to get rid of Stream Alias
hard coded in AudioServer.
Bug: 124767636
Test: dumpsys media.audio_policy
Change-Id: I48909df93c146f071acd24cd3ecc608cb98b4d7e
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
The policy was previously not registered. Resulting in a failure when
starting the recording.
Test: atest android.media.cts.AudioPlaybackCaptureTest#testCaptureMediaUsage
Bug: 111453086
Change-Id: Ib0bbdfefd644c2f8e389baafdc1fc3ad548dcc4c
Signed-off-by: Kevin Rocard <krocard@google.com>
For packages:
android.database
android.hardware
android.hardware.display
android.hardware.input
android.hardware.location
android.location
android.media
android.media.tv
android.media.projection
This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 110868826
Test: m
Change-Id: I570c08292f8a9f512c96f9dce13f5337718f112c
Allow apps to opt-out of their playback beeing recorded with an
application wide out-out.
Previously an application had to opt-out on each of its audio tracks.
Application targeting an SDK < Q are considered opt-out by default.
Application targeting an SDK >= Q are considered opt-in by default.
Test: adb shell audiorecorder --target /data/file1.raw &
adb shell am start -a android.intent.action.VIEW -d file:///system/media/audio/ringtones/Lollipop.ogg -t audio/ogg
adb dumpsys media.audio_policy # check playback is *not* recorded
# change packages/apps/Music manifest to allowPlaybackCapture=true
adb install out/target/product/walleye/system/product/app/Music/Music.apk
adb shell am start -a android.intent.action.VIEW -d file:///system/media/audio/ringtones/Lollipop.ogg -t audio/ogg
adb dumpsys media.audio_policy # check playback is recorded
kill %1
adb pull /data/file1.raw && sox -r 48000 -e signed -b 16 -c 2 file1.raw file.wav&& audacity file.wav
# check that the audio file contains first silence then the ringtone after the manifest flag was added
Bug: 111453086
Change-Id: Ie617b15f481a7f148b6e9fc9d64e61acaa5ce71d
Signed-off-by: Kevin Rocard <krocard@google.com>
In order to ensure only one matching algorithm is implemented in the
audio policy engine, we cannot use the list of audio product strategy
to let the client of this API inferring the product strategy to use.
It shall request the audio policy manager which product strategy shall be
followed by a given Audio Attributes.
Bug: 124767636
Test: dumpsys media.audio_policy
Change-Id: I372a47df4a35efd68a3ea327581af54823997dba
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
Do not hide default constructor for volume callback.
Use boolean to return status when only failure and success
can be returned.
Bug: 113857008
Bug: 125800502
Test: same as for feature
Change-Id: I421d5c9b4ea1aeba897bef8b30006261c7b61e78
Dead lock happens in notifyTrackData() and scheduleUpdate() of
TimeProvider. notifyTrackData() gets lock and calls SRTTrack.onData().
SRTTrack gets lock in addCue() but does not get lock in onData(). So
SRTTrack.setTimeProvider() can call before next addCue() is called.
When scheduleUpdate() is called from SRTTrack.setTimeProvider() in that
case, dead lock happens because following reason.
- TimeProvider is already gotten lock in notifyTrackData()
- scheduleUpdate() tries to get lock of TimeProvider but
notifyTrackData() is not finished because SRTTrack.onData() waits for
calling next addCue()
- SRTTrack waits for finishing setTimeProvider() to get lock
- setTimeProvider() is not finished because lock cannot be gotten in
scheduleUpdate()
This fix changes the looper for SubtitleController to the looper used
in TimeProvider$EventHandler not to interrupt a message by
SubtitleController while running notifyTrackData().
Bug: 122051638
Test: check if subtitle works correctly with MediaPlayer
Change-Id: Ib77144c5adb811676899a8d7e7681045663de0d2
For privacy, require the app wanting to capture other app audio to have
a valid MediaProjection.
Test: adb shell audiorecorder --target /data/file.raw
Bug: 111453086
Change-Id: I1323048fe308282d3719e38915818a0da17567de
Signed-off-by: Kevin Rocard <krocard@google.com>
Cas framework doesn't work with cas@1.0 hal after cas@1.1 hal was enabled.
Framework code should support all hal version with same major number.
Test: Manual
bug: 124132050
Change-Id: I24d4c87ec643702fd6e7bb3c347d7982a4d12f36
Tests and command line interfaces do not have context, which
artificially prevented them to use the Dynamic Audio Policy API.
Test: adb shell audiorecorder --target /data/file.raw
Bug: 111453086
Change-Id: I3f811f317f7de3282baca308bb5afa5334bf860b
Signed-off-by: Kevin Rocard <krocard@google.com>
Signed-off-by: Robert Berry <robertberry@google.com>
This API allows an app to record what other apps are playing
with some privacy restrictions.
Test: CTS
Bug: 111453086
Change-Id: I98ed789afb792acf90876499aa5eb8a47359b265