It used to be there to hide from API list, and since it's been addressed
in PlayerBase, this pseudo override is no longer needed.
Bug: 126702177
Test: make system-api-stubs-docs-update-current-api
Change-Id: I8caa75410d1ffb2b0e690a82396ac978b03a2844
This opens the door to the same consistent logic being shared by
anyone across the OS who wants to enforce storage permissions.
Bug: 126788266
Test: atest --test-mapping packages/apps/MediaProvider
Exempted-From-Owner-Approval: Trivial permissions refactoring
Change-Id: I3107425f8dafa6ba05918bb67c3c0cb5d3899657
We're now enforcing the public API schema, so clients like MTP need
to query specific collections when asking for properties that are
specific to those media types.
Also refactor MediaScanner calls to go through MediaProvider, so
they can be handled by ModernMediaScanner. We no longer directly
try inserting items, and instead rely completely on the scanner.
Bug: 127625964, 122263824
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ic86982766606a619afafe725f9c60013a5671840
The platform media scanner has served faithfully for many years, but
it's become tedious to test and maintain, mainly due to the way it
weaves obscurely between managed and native code.
Bug: 128243527
Test: none
Change-Id: I44c5e9840acc0afde4aeaf9a44a21e0f8939b44b
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>
AudioAttributes can influence offload support, add them in
method to check for support
Bug: 86837964
Test: cts-tradefed run cts -m CtsMediaTestCases -t android.media.cts.AudioTrackOffloadTest#testAudioTrackOffload
Change-Id: If4037d0611ec1264d23d1779b9ac6efd9fd1244c
(Note there is no @TestApi for @SystemApi, so rely
on javadoc to document that the new method is
for testing purposes only)
Add method to flag a focus policy as a test policy for
devices that run their own focus policy to customize
audio focus management. When a test policy is installed
it will replace the current one, and will restore it
when it is unregistered.
Add nullability annotations in Builder.
Bug: 123717363
Test: make system-api-stubs-docs-update-current-api
Test: gts-tradefed run gts --skip-device-info --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -m GtsGmscoreHostTestCases -t 'com.google.android.gts.audiopolicy.AudioPolicyHostTest#testFocusPolicy'
Change-Id: I572487bb53f85aade22da8529db9491a542ef0db
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>
That would lead to NullPointerException as some fields of
AudioMixMatchCriterion are null in some type but not others.
When first registering a UID rule, the register criterion had a null
mAttr. If a USAGE criterion was then added, it would be compared to the
exsting rule as if it was an USAGE rule. As mAttr was null, a
NullPointerException was thrown.
Test: first register a UID rule, then a USAGE rule.
Test: atest android.media.cts.AudioPlaybackCaptureTest#testCaptureMediaUsage
Bug: 111453086
Change-Id: Iece913b87a627171c0a1f872aa57c5125d0ba782
Signed-off-by: Kevin Rocard <krocard@google.com>
The query will go to AudioService in case the app itself does not have
the permission to access the files.
Test: test with files (not) containing haptic channels.
Bug: 128012181
Change-Id: I0a3410161e9718197276dc9d6abecada81cf0ee4