Commit Graph

7691 Commits

Author SHA1 Message Date
Eric Laurent
e6243996ef Revert "Mute haptic channels by default."
This reverts commit 48af5aeeba.

No idea on how this simple CL can cause this problem but A/B tests
and bisection show that the problem disabpears when reverted.

Bug: 129721367
Test: no repro on build with revert.
Change-Id: I13e3d788d255c4b6e873bb1e9ce2cf92d2a18e41
2019-04-02 18:59:12 -07:00
TreeHugger Robot
bb261a3caf Merge "Fix ringtone null pointer exception" 2019-04-02 20:23:35 +00:00
Youming Ye
33c666d955 Fix ringtone null pointer exception
Bug: 128468578
Test: Build
Change-Id: If65f0194712c8358fdbd88e7d04478f8395a012b
2019-04-02 19:53:15 +00:00
TreeHugger Robot
2118cc3042 Merge "Mute haptic channels by default." 2019-03-31 22:52:58 +00:00
jiabin
48af5aeeba Mute haptic channels by default.
In case the apps start vibration while playing asserts containing haptic
channels, it will be safer to mute haptic channels by default. Apps will
need to explicitly enable haptic channels if they want haptic via audio.

Bug: 129544270
Test: play with/without enabling haptic channels.
Change-Id: Id35d25c2be1c0b26053389f0b277b1ce321ad29e
2019-03-29 11:05:47 -07:00
TreeHugger Robot
dcb8edfc4d Merge "MediaRecorder: Add IntDef to setAudioSource" 2019-03-28 20:14:17 +00:00
TreeHugger Robot
20309bb9c3 Merge "Remove deprecateStreamTypeForPlayback from HwAudioSource" 2019-03-28 19:38:19 +00:00
TreeHugger Robot
9ad0766f16 Merge "Add application wide capture policy" 2019-03-28 19:37:13 +00:00
Hongwei Wang
50b1abc246 Merge changes from topic "renault-non-api-change"
* changes:
  Get volume indexes from Audio Policy Service
  Use AudioProductStrategies within AudioAttributes
2019-03-28 08:21:59 +00:00
Kevin Rocard
cba4b211e5 Merge "Introduce a system APC with its corresponding opt-out" 2019-03-27 20:41:06 +00:00
TreeHugger Robot
49cf94e9d4 Merge "media: rename KEY_MAX_BFRAMES to KEY_MAX_B_FRAMES" 2019-03-27 20:30:47 +00:00
Hongwei Wang
ace9250688 Remove deprecateStreamTypeForPlayback from HwAudioSource
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
2019-03-27 11:24:34 -07:00
Wonsik Kim
d18e1f34fe media: rename KEY_MAX_BFRAMES to KEY_MAX_B_FRAMES
Rename it to be consistent with use of I_FRAME.

Bug: 129344870
Test: builds
Change-Id: I816439074837452cdbd9ed2a734ea237517ad26f
2019-03-27 08:49:58 -07:00
Hyundo Moon
4e953bb406 Merge "Remove ControllerCallbackLink" 2019-03-27 00:20:14 +00:00
Jeff Sharkey
02aefee533 Merge "Unify media permissions enforcement in framework." 2019-03-26 23:54:22 +00:00
Jeff Sharkey
859856d8d6 Unify media permissions enforcement in framework.
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
2019-03-26 23:54:08 +00:00
Hyundo Moon
4e4459b403 Remove ControllerCallbackLink
Bug: 129323028
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: I5b1fedc70cee7311364925562ad253a68b2bfe6e
2019-03-26 20:05:29 +09:00
Kyunglyul Hyun
2d70f04a1d Merge "Media: Add MediaRouterManager to control media route of other apps" 2019-03-25 23:39:34 +00:00
Jeff Sharkey
ff200957fd Query specific collections for properties.
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
2019-03-24 14:21:01 -06:00
Hyundo Moon
2809f8fe1e Merge "Remove SessionCallbackLink" 2019-03-24 12:15:07 +00:00
Jeff Sharkey
ae80b5417b Merge changes from topic "mar22z"
* changes:
  Point people towards ModernMediaScanner.
  Translate paths before leaving app sandbox.
2019-03-23 17:59:03 +00:00
Eric Laurent
aff8c04b25 MediaRecorder: Add IntDef to setAudioSource
Bug: 128414080
Test: make
Change-Id: I1f0b5c75becf89e995fb33f85a79c834d5fa9625
2019-03-22 18:04:50 -07:00
Michael Wright
f0ae16b7d0 Merge "Add self to OWNERS for MediaProjection." am: 00ccf23ebd am: 187bd825b8
am: 12683c7d9d

Change-Id: I716cf4f93ca453a69e054f3b455cc4ba62be8941
2019-03-22 17:36:20 -07:00
Michael Wright
12683c7d9d Merge "Add self to OWNERS for MediaProjection." am: 00ccf23ebd
am: 187bd825b8

Change-Id: Ic59abd88618d5b06dedf5f618a428f8ab1c4f022
2019-03-22 17:26:57 -07:00
Michael Wright
187bd825b8 Merge "Add self to OWNERS for MediaProjection."
am: 00ccf23ebd

Change-Id: I34369b2d81c8fea7c56000e305ee8f82a18135de
2019-03-22 17:14:39 -07:00
Treehugger Robot
00ccf23ebd Merge "Add self to OWNERS for MediaProjection." 2019-03-22 23:48:31 +00:00
Jeff Sharkey
13d02b5925 Point people towards ModernMediaScanner.
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
2019-03-22 17:30:48 -06:00
TreeHugger Robot
3330585f06 Merge "Add status for license starting in the future" 2019-03-22 22:59:19 +00:00
Kevin Rocard
7919c2acc9 Add application wide capture policy
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>
2019-03-22 15:28:51 -07:00
Kevin Rocard
a3a4bbba98 Introduce a system APC with its corresponding opt-out
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>
2019-03-22 15:28:51 -07:00
Jeff Tinker
22f157713f Add status for license starting in the future
bug:116738851
Change-Id: Ifd38733f2f5704fbc93d23e6b53994430736dd17
2019-03-22 10:12:00 -07:00
Eric Laurent
b8d4c59b08 Merge "API changes in MicrophoneDirection" 2019-03-22 15:57:49 +00:00
TreeHugger Robot
3d97b27ce0 Merge "Offloaded playback: use AudioAttributes in support check" 2019-03-22 09:20:17 +00:00
Hyundo Moon
7969f77f95 Remove SessionCallbackLink
Bug: 129037153
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: I79cd69854fce2448544fd517c1af7d7321df6a79
2019-03-22 15:22:17 +09:00
Hyundo Moon
34cfe56bdc Merge "Remove MediaSessionEngine" 2019-03-22 05:30:13 +00:00
Jean-Michel Trivi
f3fd84adfe Offloaded playback: use AudioAttributes in support check
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
2019-03-21 21:21:23 -07:00
TreeHugger Robot
643ba1862d Merge "Resolve feedback from API review: MediaDrm" 2019-03-22 01:57:35 +00:00
TreeHugger Robot
701077f51c Merge "AudioPolicy: add test flagging for focus policy tests" 2019-03-22 01:34:34 +00:00
Jeff Tinker
f11261ba88 Resolve feedback from API review: MediaDrm
bug:123939401
test:media playback test
Change-Id: I8166535fe537a633a0ddac917217a5ac627f4ca8
2019-03-21 23:38:07 +00:00
TreeHugger Robot
1930893edc Merge changes from topic "APIForQueryingHapticsExist"
* changes:
  Add API in RingtoneManager to query if files contain haptic channels.
  Add key for haptic channel count.
2019-03-21 23:33:25 +00:00
Jean-Michel Trivi
ee7d2456e1 AudioPolicy: add test flagging for focus policy tests
(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
2019-03-21 10:29:59 -07:00
Wonsik Kim
33b6db9d76 Merge "media: add MediaFormat.KEY_PREPEND_HEADERS_TO_SYNC_FRAMES" 2019-03-21 16:29:26 +00:00
TreeHugger Robot
34e53cf69e Merge "Add getter to AudioPlaybackCaptureConfiguration" 2019-03-21 13:41:27 +00:00
Kevin Rocard
048c3888bc Add getter to AudioPlaybackCaptureConfiguration
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>
2019-03-21 05:50:48 +00:00
Kevin Rocard
a7aafac2cf AudioMix: Do not compare rules of different types
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>
2019-03-21 05:49:06 +00:00
TreeHugger Robot
8653514450 Merge "Improve Audio Playback Capture API" 2019-03-21 05:48:40 +00:00
Dongwon Kang
455756633c Merge "Address feedback on MediaTimestamp, SubtitleData and TimeMetadata" 2019-03-21 03:37:05 +00:00
Lajos Molnar
5e8dc2c87c Merge "media: refine MediaCodecInfo video PerformancePoints" 2019-03-21 02:51:48 +00:00
jiabin
ad225205f5 Add API in RingtoneManager to query if files contain haptic channels.
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
2019-03-20 18:11:16 -07:00
Dongwon Kang
b911907651 Address feedback on MediaTimestamp, SubtitleData and TimeMetadata
Test: MediaTimestampTest, SubtitleDataTest, TimeMetadataTest
Bug: 128547839, Bug: 128460405
Change-Id: I9f2b0e10b6fecbf7b0338586974ab8a720ab77b7
2019-03-21 00:33:15 +00:00