Commit Graph

9840 Commits

Author SHA1 Message Date
TreeHugger Robot
9a5dfd3731 Merge "Remove invalid javadoc link to VideoView" into sc-dev 2021-03-22 21:41:53 +00:00
TreeHugger Robot
71cf0b48ce Merge "Add toString method to AudioProfile class" into sc-dev 2021-03-22 20:10:31 +00:00
Daniel Cardenas
9887b0f9ed Add toString method to AudioProfile class
Bug: 183425455
Test: TVTS
      ag/13404743
Change-Id: I47f22580484c453237756670b5197b007d43e44b
(cherry picked from commit f5c29ceccd)
2021-03-22 20:10:18 +00:00
Santiago Seifert
a1fe7ef57f Remove invalid javadoc link to VideoView
Before this change, the MediaPlayer javadoc referenced VideoView's
javadoc, even though it was not relevant. The link can be removed
because a correct link is provided further down in MediaPlayer's
javadoc to the MediaPlayer guide.

Bug: 182880215
Bug: 182798119
Change-Id: Ife353257e10f73ef319f1913c9e59046e4ec10ce
2021-03-22 18:54:06 +00:00
Shubang Lu
f505c5d215 Merge "Unhide media metrics APIs" into sc-dev 2021-03-22 01:27:07 +00:00
shubang
be0b58d62a Unhide media metrics APIs
1. playbackId class
2. metrics bundle for future backwards compatibility
3. new enums and fields

Bug: 167036690
Test: atest android.media.metrics.cts
Change-Id: I09889dfd247017ee43fb833d9df98420dccf54a6
2021-03-19 18:34:47 -07:00
Nate Myren
c3d290dcec Merge "Clarify AudioRecord.Builder.setContext documentation" into sc-dev 2021-03-19 19:42:31 +00:00
Andy Hung
45d9b3b7fb Merge "AudioTrack: get/setStartThresholdInFrames" into sc-dev 2021-03-19 07:07:25 +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
0039406fa3 Merge "Created a new testAPI isFullVolumeDevice in AudioManager" into sc-dev 2021-03-18 10:14:32 +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
a85407a4cb Merge "System MR2: Set clientPackageName on system routing session" into sc-dev 2021-03-17 06:29:55 +00:00
Shuzhen Wang
eb4aacc2c3 Merge "ImageWriter: Fix a minor documentation error" into sc-dev 2021-03-16 21:10:30 +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
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
2b4ee6faaf Merge "System MediaRouter2: Add Transfer/ControllerCallback functionality" into sc-dev 2021-03-15 19:00:08 +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
d63065cb6f Merge "Add attributionTag to audio-recordings" into sc-dev 2021-03-11 23:48:44 +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
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
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
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
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
Eric Laurent
1fd211144b Merge "AudioManager: address API review comments" into sc-dev 2021-03-08 08:07:57 +00:00
TreeHugger Robot
8b72f15aad Merge "Remove dispatchMediaKeyEvent API" into sc-dev 2021-03-07 13:23:56 +00:00
Robert Shih
5d1fad30ce Merge "MediaDrm: add ERROR_PROVISIONING_REQUEST_REJECTED" into sc-dev 2021-03-07 06:01:18 +00:00
TreeHugger Robot
68d8cb07dd Merge "Add 1.extras, 2.recording session, 3.ID wrapper to MediaMetrics" into sc-dev 2021-03-05 23:31:50 +00:00
TreeHugger Robot
71ecb60a5a Merge "Camera: Add multi-resolution image reader and reprocessing support" into sc-dev 2021-03-05 20:14:08 +00:00
Kriti Dang
0192423845 Split getSurroundSound method in 2 methods.
Split getSurroundSound in:
getSurroundSound for formats supported by source android device
getReportedSurroundSound for formats reported by any connected sound
device like soundbar etc.

Bug: 177990551
Test: Tested manually
Change-Id: I8687c2f827ce09df49d19c6f553a81dfd6caffe4
2021-03-05 14:09:14 +01:00
shubang
b4d741a262 Add 1.extras, 2.recording session, 3.ID wrapper to MediaMetrics
Test: mmm;
Bug: 167036690
Change-Id: I9d514db5cdb6ed71e8e6c4d0ee75623c2b6d133d
2021-03-03 17:40:02 -08:00
Robert Shih
a37ae8e5ba MediaDrm: add ERROR_PROVISIONING_REQUEST_REJECTED
Native equivalents:
+-------------+-----------------------------------------------+
| component   | error code                                    |
+-------------+-----------------------------------------------+
| jni         | JERROR_DRM_PROVISIONING_REQUEST_REJECTED      |
| libmediadrm | ERROR_DRM_PROVISIONING_REQUEST_REJECTED       |
| drm hal     | ::V1_4::Status::PROVISIONING_REQUEST_REJECTED |
+-------------+-----------------------------------------------+

Bug: 180579631
Test: MediaDrmTest#testBadProvisioningRequest
Change-Id: I93da60177333dcedfb4c0a317d92fe002b7f14db
2021-03-03 16:57:17 +00:00
Jin Seok Park
f852ca7afa Remove dispatchMediaKeyEvent API
Remove dispatchMediaKeyEvent(KeyEvent) since it can be substituted
by calling dispatchMediaKeyEvent(KeyEvent, boolean) API with boolean
value as false.

Bug: 179116384
Test: build
Change-Id: I3692c712a780e8978bb8e3b2d19cfc242357e864
2021-03-03 23:40:53 +09:00
Andy Hung
2dc94a3183 Merge "Add AudioMetadata keys related to active audio presentation" am: 2c27a78902 am: 8ad670ef53 am: 54a1135d13
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1591453

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2f2448f544f687ea7119045ead91315d339770a2
2021-03-03 13:27:47 +00:00
Andy Hung
54a1135d13 Merge "Add AudioMetadata keys related to active audio presentation" am: 2c27a78902 am: 8ad670ef53
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1591453

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie68d80e2e8183a1bc99603123cbcc7db63626e9c
2021-03-03 08:07:45 +00:00
Andy Hung
8ad670ef53 Merge "Add AudioMetadata keys related to active audio presentation" am: 2c27a78902
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1591453

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I51e96f85fff3f51a9b2eec8faaffaaabdd91690f
2021-03-03 03:08:50 +00:00
Andy Hung
2c27a78902 Merge "Add AudioMetadata keys related to active audio presentation" 2021-03-03 02:37:13 +00:00
Shuzhen Wang
80fc5cad54 Camera: Add multi-resolution image reader and reprocessing support
- Add MultiResolutionImageReader class for variable size image output.
- Add camera characteristics for support multi-resolution output and input
streams.
- Update reprocessing interface doc for variable size support.

Test: atest MultiResolutionImageReaderTest, MultiResolutionReprocessCaptureTest
Bug: 156254356
Change-Id: I913abe38020c224c40903f42b8d45d40b65a5612
2021-03-02 14:27:16 -08:00