Previously, we generally required fully qualified names for referring
to inner class constructors (like #Notification.Builder()) despite that
not being valid javadoc. Now, we properly support #Builder() syntax and
the old syntax will error.
Bug: 6963924
Test: make doc-comment-check-docs
Change-Id: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.
To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
- worked around by fully qualifying the constructor
Bug: 6963924
Test: make doc-comment-check-docs
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Removed recently added user id based routing for audio playback capture.
The original goal of the user id based routing was for the routing to be
controlled by audio policy and to controll where audio from a user
could play. The audio playback capture was added to match similar API
provided for audio playback capture based on application's uid.
Currently, there is no appropiate use case for capturing based on user
id. While this could prove useful in the future the appropiate use case
research must be completed. Updated comments for audio policy user id
based routing.
Bug: 149419551
Test: atest AudioPlaybackCaptureTest
Test: atest
com.google.android.gts.audio.AudioHostTest#testUserIdDeviceAffinity
Change-Id: I174cba618c4f66d11185e7ab5630094b4a8cb35b
Added Android user id based routing. Added API to defined and removed
user id based routing. The APIs are based on the applications uid based
routing. The logic for user id based routing also largely resembles the
application's uid based routing.
Bug: 139365417
Test: atest
com.google.android.gts.audio.AudioHostTest#testUserIdDeviceAffinity
Test: atest AudioPlaybackCaptureTest
Change-Id: I1f458680c96439f047829d5b2a5d1f0d37be60bd
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>
Apps were previously forced to set their allowed capture policy from
either their manifest which is not flexible or from each track which is
a very fine grain but difficult when using libraries like exoplayer.
Thus add an application level policy set with AudioManager.
Test: atest android.media.cts.AudioPlaybackCaptureTest#testCaptureMediaUsage
Bug: 111453086
Change-Id: Id360f1c3f3157c60694c039e51ff16e71d8f93cd
Signed-off-by: Kevin Rocard <krocard@google.com>
For system application with the new permission CAPTURE_MEDIA_OUTPUT, or
CAPTURE_AUDIO_OUTPUT, allow to capture the audio of playing apps that
allow it.
Test: adb shell audiorecorder --target /data/file1.raw
Test: atest android.media.cts.AudioPlaybackCaptureTest
Bug: 111453086
Change-Id: I5bfca51e48992234508897c595a076d066db26b2
Signed-off-by: Kevin Rocard <krocard@google.com>
As requested by the API concil.
Test: atest android.media.cts.AudioPlaybackCaptureTest
Bug: 128454287
Change-Id: I205fe03d1d23d67ecf3e4590b62bde24f56e4e83
Signed-off-by: Kevin Rocard <krocard@google.com>
The API too closely resembled the underlying system API, in forcing the
client to construct a full AudioAttribute when only the usage was
useful.
Test: atest android.media.cts.AudioPlaybackCaptureTest#testCaptureMediaUsage
Bug: 111453086
Change-Id: Ic3944120ab4d5dc7b85e5baf7718a39a171a4333
Signed-off-by: Kevin Rocard <krocard@google.com>
That allows better integration with tools and Kotlin.
Test: atest android.media.cts.AudioPlaybackCaptureTest
Bug: 126700282
Change-Id: I921d0b5580ad861c732f7b076142968e4da9989c
Signed-off-by: Kevin Rocard <krocard@google.com>
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>
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>
This API allows an app to record what other apps are playing
with some privacy restrictions.
Test: CTS
Bug: 111453086
Change-Id: I98ed789afb792acf90876499aa5eb8a47359b265