Commit Graph

9934 Commits

Author SHA1 Message Date
Nate Myren
d86bbd1b4f Merge "Clarify AudioRecord.Builder.setContext documentation" into sc-dev am: c3d290dcec
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13901977

Change-Id: I41a9ed517b6d12c838ac9c5e72c11f35a490e889
2021-03-19 20:15:52 +00:00
Nate Myren
c3d290dcec Merge "Clarify AudioRecord.Builder.setContext documentation" into sc-dev 2021-03-19 19:42:31 +00:00
Andy Hung
faba8616eb Merge "AudioTrack: get/setStartThresholdInFrames" into sc-dev am: 45d9b3b7fb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13902345

Change-Id: I94629f9533435f6ecdb3a6dd3b2b4c0a4c858918
2021-03-19 07:25:18 +00:00
Andy Hung
45d9b3b7fb Merge "AudioTrack: get/setStartThresholdInFrames" into sc-dev 2021-03-19 07:07:25 +00:00
TreeHugger Robot
091c99c0df Merge "Add MediaRecorder.SystemSource." into sc-dev am: ef1688ac1a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13856195

Change-Id: Ifff7661c200b38f0f3b7b0a12e1a6effe9474fae
2021-03-18 23:22:36 +00:00
TreeHugger Robot
ef1688ac1a Merge "Add MediaRecorder.SystemSource." into sc-dev 2021-03-18 23:06:41 +00:00
Andy Hung
1c34209969 AudioTrack: get/setStartThresholdInFrames
setStartThresholdInFrames is used to set the start threshold
in frames for streaming AudioTrack playback.
Normally this is the entire buffer capacity in frames
but may be reduced for low latency playback,
compressed formats, and direct tracks.

See CTS test AudioTrackTest#testStartThresholdInFrames
for example calling details and behavior.

Test: atest AudioTrackTest#testStartThresholdInFrames
Test: atest AudioTrackTest#testStartThresholdInFramesExceptions
Bug: 183003720
Change-Id: I5064d04961e48b530c49071ff84c2e0d2065f41b
2021-03-18 11:20:02 -07:00
Kholoud Mohamed
380d831b94 Merge "Created a new testAPI isFullVolumeDevice in AudioManager" into sc-dev am: 0039406fa3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13877106

Change-Id: I5dd8d73082cf9646a7259f28ec46ef9c6781fd07
2021-03-18 10:35:43 +00:00
Kholoud Mohamed
0039406fa3 Merge "Created a new testAPI isFullVolumeDevice in AudioManager" into sc-dev 2021-03-18 10:14:32 +00:00
Jean-Michel Trivi
34e2c14ff3 Merge "MediaFormat: new MIME types for MPEG-H audio" into sc-dev am: f06d4de3f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13902806

Change-Id: I29e085b051e515a4c74b048b13c266b135a31481
2021-03-17 22:06:41 +00:00
Jean-Michel Trivi
bb9e2099fe MediaFormat: new MIME types for MPEG-H audio
Add new MIME types for MPEG-H audio

Bug: 178619392
Test: atest android.media.cts.MediaFormatTest
Change-Id: I6b0026e6b5b979b6c3e3ca0b1c675e890662c0df
2021-03-17 10:07:39 -07:00
Nate Myren
076ab7300b Clarify AudioRecord.Builder.setContext documentation
Fixes: 182945070
Test: none
Change-Id: I127b3633f2deac03116321a115adfa50583a00be
2021-03-17 08:55:05 -07:00
kholoud mohamed
3783921323 Created a new testAPI isFullVolumeDevice in AudioManager
* Created isFullVolumeDevice to replace usage of dumpsys audio in cts
tests.
* Added a new permission QUERY_AUDIO_STATE to the newly created API and
the existing API that it depends on:
- getDevicesForAttributes
- getDeviceVolumeBehavior

Test: The new API is accessible from cts tests
Bug: 182260585
Change-Id: I9d6bd24695ae306930b2518b1b12288aca46ebe9
2021-03-17 15:39:50 +00:00
Hyundo Moon
87efd95aef Merge "System MR2: Set clientPackageName on system routing session" into sc-dev am: a85407a4cb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13886929

Change-Id: I63e5b037c4c4065368becb8b590ea7ac13a24076
2021-03-17 07:02:46 +00:00
Hyundo Moon
a85407a4cb Merge "System MR2: Set clientPackageName on system routing session" into sc-dev 2021-03-17 06:29:55 +00:00
Shuzhen Wang
8c4c6d4eaa Merge "ImageWriter: Fix a minor documentation error" into sc-dev am: eb4aacc2c3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13537203

Change-Id: I24c90cc013ccf30f13d78d2184e2dde56d2ae18c
2021-03-16 21:37:25 +00:00
Shuzhen Wang
eb4aacc2c3 Merge "ImageWriter: Fix a minor documentation error" into sc-dev 2021-03-16 21:10:30 +00:00
Paul Mclean
2b46c544dc Merge "Enabling testing of VolumeGroup APIs" 2021-03-16 20:36:34 +00:00
Christian Frank
dfd0271083 Merge "Add attribution context for MusicRecognitionManager attribution." into sc-dev 2021-03-16 17:04:46 +00:00
Hyundo Moon
6d5d002195 System MR2: Set clientPackageName on system routing session
Bug: 181122201
Test: Passed SystemMediaRouter2Test and MediaRouter2Test
Change-Id: I18c47a02ac4292f45816903709a7919182691d2d
2021-03-17 00:42:49 +09:00
Hyundo Moon
0fdea7d73a Merge "System MR2: Fix bug on onTransfer and on getting initial routes" into sc-dev am: 9505f1d4b2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13877249

Change-Id: Icf93e51c839130109eee3a67478280c186982468
2021-03-16 13:06:00 +00:00
Hyundo Moon
1a8a029f68 System MR2: Fix bug on onTransfer and on getting initial routes
System MR2 should be able to get the routes right after creation,
if the app's router has already set the preference.

Bug: 181122201
Test: Test passed on transferTo.
Change-Id: I671d17b33ee43a939a02aee130333aef801d5789
2021-03-16 15:28:20 +09:00
Hyundo Moon
f15c005a10 Merge "System MediaRouter2: Add Transfer/ControllerCallback functionality" into sc-dev am: 2b4ee6faaf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13838650

Change-Id: I6063b69b92f4b8db8b8d463c0a00e873f7061c77
2021-03-15 19:02:41 +00:00
Hyundo Moon
2b4ee6faaf Merge "System MediaRouter2: Add Transfer/ControllerCallback functionality" into sc-dev 2021-03-15 19:00:08 +00:00
Robert Shih
afb5d57f76 Merge "Unhide MediaDrm#getPlaybackComponent" into sc-dev am: e0519c10e4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13835091

Change-Id: I6bd7f10c3c18a739646e7d9f0d56fc43f25df84c
2021-03-15 17:44:44 +00:00
Robert Shih
e0519c10e4 Merge "Unhide MediaDrm#getPlaybackComponent" into sc-dev 2021-03-15 17:00:32 +00:00
Hyundo Moon
ccb4075ff2 System MediaRouter2: Add Transfer/ControllerCallback functionality
This CL makes the system MediaRouter2 can receive transfer-related
events for the client application.

Also adds:
 - startScan/stopScan
 - setRouteVolume
 - RouteCallback#onPreferredFeaturesChanged
 - RoutingController methods' functionality

Also, this CL marks the system APIs as @SystemApi.

Bug: 181122201
Test: Passed tests locally. More test CLs are being added.
Change-Id: I0f733efb82faf2c4b0488a79335a97d4f7f7b466
2021-03-15 21:55:56 +09:00
jiabin
958faf9a25 Add MediaRecorder.SystemSource.
Add an IntDef named MediaRecorder.SystemSource, which includes all
audio source that is defined in MediaRecorder.AudioSource. It can be
used for preferred device for capture preset APIs.

Test: atest AudioServiceHostTest
Bug: 180395563
Change-Id: If80a2875b64544c1e7e60999bad6dafdba712333
2021-03-12 20:03:42 +00:00
Nate Myren
aae438df79 Merge "Add attributionTag to audio-recordings" into sc-dev am: d63065cb6f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13537125

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1b880886f44a13d573c5f08d0ae1a0b32f46b36c
2021-03-12 04:19:25 +00:00
Nate Myren
d63065cb6f Merge "Add attributionTag to audio-recordings" into sc-dev 2021-03-11 23:48:44 +00:00
Eric Laurent
1fd7336942 Merge "AudioManager: update javadoc for setCommunicationDevice" into sc-dev am: 5bcb005a76
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13815794

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic90569abae897b919c4e9a51d9de335820c27f3d
2021-03-11 17:15:57 +00:00
Eric Laurent
5bcb005a76 Merge "AudioManager: update javadoc for setCommunicationDevice" into sc-dev 2021-03-11 17:02:17 +00:00
Philip P. Moltmann
fece2436d4 Add attributionTag to audio-recordings
... by switching from packageName/uid/pid to the Identity class.

This allows up to track which parts of the app trigger audio-recordings.

Test: atest CtsAppOpsTestCases
            CtsNativeMediaAAudioTestCases
Fixes: 160150145
Change-Id: I0913a336a862e4a1cb38b9d967cfbdc490513ab0
2021-03-11 08:40:40 -08:00
Hyundo Moon
a566130af1 Merge "System MediaRouter2: Add RouteCallback functionality" into sc-dev am: 72522b92b4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13824392

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8fe895e3ac4a5e6356857a2e91abc382f4b2aa1c
2021-03-11 10:24:58 +00:00
Kriti Dang
230167e2b7 Merge "Split getSurroundSound method in 2 methods." into sc-dev am: bc80405a5e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13738815

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I617def1231959144a6fdbcf88a4d87a200d29957
2021-03-11 10:24:36 +00:00
Hyundo Moon
72522b92b4 Merge "System MediaRouter2: Add RouteCallback functionality" into sc-dev 2021-03-11 10:16:26 +00:00
Kriti Dang
bc80405a5e Merge "Split getSurroundSound method in 2 methods." into sc-dev 2021-03-11 10:12:28 +00:00
Hyundo Moon
3e241ceb4f System MediaRouter2: Add RouteCallback functionality
This CL makes the system MediaRouter2 can receive route related
events for the client application.

Bug: 181122201
Test: Locally tested. Test code will be added when the system APIs
      are actually makred as @SystemApi.
Change-Id: I516d90c725b6a72ba323b30c4c8a013edd737483
2021-03-11 08:54:50 +00:00
Robert Shih
a7f3187943 Unhide MediaDrm#getPlaybackComponent
Bug: 159337195
Bug: 168341163
CTS-Coverage-Bug: 168341163
Test: atest MediaDrmTest#testSetPlaybackId
Change-Id: I1362db29ddcd511df9aa8f0ae55adfff0aeaafe7
2021-03-11 05:58:52 +00:00
Shubang Lu
be137fd387 Merge "Fix NPE of extras in media metrics" into sc-dev am: f931dcaaa8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13819424

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ica68991412007090ceff915ff5c60158f00af097
2021-03-11 02:04:00 +00:00
Paul McLean
f345749b74 Enabling testing of VolumeGroup APIs
Bug: 160239034
Bug: 182169438
Test: atest GtsGmscoreHostTestCases:AudioServiceHostTest#testAudioVolumeBehavior
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.audioservice.AudioServiceHostTest#testAudioVolumeGroups'

Change-Id: Ia14a2db33174149d84da3c276d0168765f2e38d9
2021-03-10 09:15:08 -07:00
shubang
af960d008e Fix NPE of extras in media metrics
Bug: 182186519
Bug: 182104911
Test: CTS
Change-Id: I114763499b62eb62aa9d770e6b1e1f98ce6a8eaf
2021-03-09 15:56:00 -08:00
TreeHugger Robot
5603f7bd83 Merge "Camera: Don't switch image callbacks during extension sessions" into sc-dev am: 5ef41d061b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13702245

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idc5133f1e04f4c583deba207dea2eab7e4e41e0e
2021-03-09 21:22:24 +00:00
TreeHugger Robot
5ef41d061b Merge "Camera: Don't switch image callbacks during extension sessions" into sc-dev 2021-03-09 21:16:39 +00:00
Eric Laurent
9a40448628 AudioManager: update javadoc for setCommunicationDevice
Remove exception handling from example code for setCommunicationDevice.

Bug: 179709789
Test: make
Change-Id: I4f3285b128825ffba683ce32ffce4066878100b9
2021-03-09 19:58:39 +01:00
Christian Frank
f6848802cb Add attribution context for MusicRecognitionManager attribution.
In addition:
  1) Use attribution tag specified in the MusicRecognitionService's manifest.
  2) Explicitly check for RECORD_AUDIO permission of receiving service.

Example audio attribution from dumpsys:
  RECORD_AUDIO (allow):
    MusicRecognitionDoneByServiceX=[
      Access: [fg-tpd] 2021-02-23 18:21:01.753 (-14s877ms) duration=+8s250ms proxy[uid=1000, pkg=android, attributionTag=MusicRecognitionManagerService]
    ]

Test: atest and manual inspection of attributions with dumpsys.
Change-Id: Ie415104580a1814b0b74f2d5b489bf8247d9238d
Bug: 178174412
Bug: 169403302
2021-03-09 17:01:17 +00:00
Christian Frank
9250826e01 Merge "Add attribution context for MusicRecognitionManager attribution." 2021-03-09 16:36:54 +00:00
Hyundo Moon
a0623bc2cd Merge "Add basic functionality of MR2Manager in MR2" into sc-dev am: 36ce69616d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13775015

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5b3fd619958468fa7d9ea0ebf556ecdf168514e8
2021-03-09 10:06:34 +00:00
Hyundo Moon
36ce69616d Merge "Add basic functionality of MR2Manager in MR2" into sc-dev 2021-03-09 09:55:02 +00:00
Hyundo Moon
dd4780eba1 Add basic functionality of MR2Manager in MR2
As a first step of adding MR2Manager functionality in MR2,
this CL makes MR2 able to:
 - get routes for specific package
 - make transfer / stop

For now, the future system APIs are not marked as @SystemApi yet.
They will be opened with adding CTS tests,
once the implementation is complete.

Bug: 181122201
Test: Manually tested transfer/stop using Support7Demos.
      Test code will be added when MR2Manager's callback functionality
      is implemented.
Change-Id: I71bea98b0ff3e42d193cf04c1b1735fe50c7d673
2021-03-09 15:35:40 +09:00