Commit Graph

9803 Commits

Author SHA1 Message Date
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
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
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
Andy Hung
1745c7a139 Merge "AudioTrack: Add TunerConfiguration.CONTENT_ID_NONE" am: 1e21d8530b am: caff316b8a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1611744

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If37551ac828719644d860555098d9e8354be04ee
2021-03-02 21:51:36 +00:00
Andy Hung
caff316b8a Merge "AudioTrack: Add TunerConfiguration.CONTENT_ID_NONE" am: 1e21d8530b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1611744

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6df3daaaf31834d5d9eb2084a46f1d9576761be4
2021-03-02 21:45:38 +00:00
Andy Hung
6bb7c589b2 AudioTrack: Add TunerConfiguration.CONTENT_ID_NONE
Test: atest AudioTrackTest#testTunerConfiguration
Bug: 181354677
Merged-In: I679c809ee8834c5a608243c353bc3a76ec55243c
Change-Id: I679c809ee8834c5a608243c353bc3a76ec55243c
2021-03-01 21:53:22 -08:00
Andy Hung
1123c38bec Merge "AudioTrack: Add TunerConfiguration.CONTENT_ID_NONE" into sc-dev 2021-03-02 00:46:25 +00:00
Andy Hung
77beac00ba Merge "AudioRecord: Add setLogSessionId" into sc-dev 2021-03-01 23:04:48 +00:00
Eric Laurent
7412f57550 AudioManager: address API review comments
Address API council comments for new AudioManager
API setDeviceForCommunication.

Bug: 179709789
Test: ates AudioCommunicationTest
Change-Id: I1c656578f614c735e8ad839b814ddeb175213400
2021-02-28 15:50:01 +01:00
Kyunglyul Hyun
b8407d691c Merge "[Media ML] Let MCS manage MediaSession2" into sc-dev 2021-02-27 06:43:58 +00:00
Andy Hung
0ac9fb2ec7 AudioTrack: Add TunerConfiguration.CONTENT_ID_NONE
Test: atest AudioTrackTest#testTunerConfiguration
Bug: 181354677
Change-Id: I679c809ee8834c5a608243c353bc3a76ec55243c
2021-02-26 15:57:24 -08:00
TreeHugger Robot
3512bdfde4 Merge "Add @IntRange() to audio encoding capability apis" into sc-dev 2021-02-26 22:39:53 +00:00
Andy Hung
3f6ee55958 AudioRecord: Add setLogSessionId
Update AudioTrack setLogSessionId to match.

Test: atest AudioRecordTest#testSetLogSessionId
Test: atest AudioTrackTest#testSetLogSessionId
Test: adb shell dumpsys media.metrics
Bug: 181271535
Change-Id: Iaced9704d7a8366046b4c8725c9c9c38a62bb713
2021-02-26 13:03:00 -08:00
Antonio Kantek
22d3fb687f Merge "Hiding back AudioAttributes#usageToString(int)" into sc-dev 2021-02-26 20:43:52 +00:00
Vladimir Marko
cce3bb5244 resolve merge conflicts of 6f0d5e0d1b to sc-dev
Test: N/A
Bug: None
Change-Id: I88560c8b73cff8b5dab5f0d53af026651e8952d0
2021-02-26 17:04:21 +00:00
Kyunglyul Hyun
970adf0759 [Media ML] Let MCS manage MediaSession2
This CL adds
 - MediaCommunicationManager#notifySession2Created
 - MediaCommunicationManager#getSession2Tokens
, which replaces the same methods in MediaSessionManager

to let MediacommunicationService manage MediaSession2.

MediaSessionService gets notified of created MediaSession2 instances
by adding a callback to MCM.

Bug: 180417011
Test: atest MediaSessionManagerTest MediaCommunicationManagerTest
Change-Id: Ia5ffdcd15573d1223ca520cfa8eca3b976874118
2021-02-26 13:11:02 +00:00
TreeHugger Robot
59b9cbd990 Merge "Remove stale method from MtpServer" into sc-dev 2021-02-26 09:26:19 +00:00
Jin Seok Park
47c37c62a7 Merge "Change @IntDef flag param to true" into sc-dev 2021-02-26 04:42:39 +00:00
Oscar Azucena
f4e58509a7 Merge "Fixed device info reporting for media player" into sc-dev 2021-02-26 03:05:07 +00:00
Emilian Peev
c0880b85d0 Camera: Don't switch image callbacks during extension sessions
- Relying on camera capture callbacks to switch appropriate
  camera output surface image callbacks can result in timing
  issues. For example a capture started callback from a new
  capture request can execute before the sequence complete
  callback gets scheduled for the old request. This can result
  in images from the new request getting redirected to the
  wrong/old callback.
  Avoid this by using a single image callback instance per
  camera output for the entire duration of the capture session
  and allow individual images to be redirected to appropriate
  handlers on a precise timestamp basis.
- Additionally refactor an odd looking if-else case within
  'ImageWriter'.

Bug: 180451857
Bug: 180451435
Test: Camera CTS

Change-Id: Iae497ff2eefacc00ea45ff5e598581156aa64c0d
2021-02-25 16:11:08 -08:00
Antonio Kantek
116467fe6b Hiding back AudioAttributes#usageToString(int)
Bug: 181015046
Test: atest CtsMediaTestCases:android.media.cts.AudioAttributesTest
Test: atest com.android.mediaframeworktest.unit.AudioAttributesUnitTest
Test: atest com.android.car.custominput.sample.unittest.CustomInputEventListenerTest
Change-Id: If6df2973c71ea92b2e948598db13691ad518cf13
2021-02-25 10:28:13 -08:00
Jin Seok Park
fc9db6c1ad Change @IntDef flag param to true
Setting flag param to true means that it should be used as a flag
rather than an enum.

Bug: 173657280
Test: build
Change-Id: I8add91bb3fc694e696df78817dd05fceaa92930e
2021-02-26 02:37:20 +09:00
Ray Essick
69886ab003 Common keys for video QP manipulation
Definitions for managing Video encoding Quantization Parameter (QP).
Providing a standardized key instead of various vendor-specific keys.

Bug: 161486623
Test: build, b/179554934 for functionality
Change-Id: I8f1976cff55e119a2b42332de3d7ae690dc9e1fa
(cherry picked from commit de66953c0a)
2021-02-25 16:44:32 +00:00
Ytai Ben-tsvi
6f0d5e0d1b Merge "Add ytai@ as OWNER of soundtrigger-related dirs" am: 29cfbb1a50 am: a2c4396579
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1603659

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibb454376c644ffe0f1bf6c53a74d1c08c56f6ea7
2021-02-25 00:10:29 +00:00
Abhishek Katti
9ff0a7375c Add AudioMetadata keys related to active audio presentation
Added active audio presentation fields
 - presentation id
 - program id
 - content classifier
 - presentation language
to be notified via AudioTrack interface.
Also added int definitions related to audio presentation content
classifier to AudioPresentation interface.

Change-Id: I19924d3ba54149c433ae16b4488ff41df343281a
2021-02-25 10:17:18 +11:00
Ytai Ben-tsvi
a2c4396579 Merge "Add ytai@ as OWNER of soundtrigger-related dirs" am: 29cfbb1a50
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1603659

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I611305c07c10336ac15a6c0cf1e13733fc9134f4
2021-02-24 22:58:32 +00:00
Ytai Ben-Tsvi
233f1a159b Add ytai@ as OWNER of soundtrigger-related dirs
Change-Id: Ie1ab78515c6f1c7cb444752a0623cb6f701d0410
2021-02-24 09:50:21 -08:00
Josh Hou
53863bbcbf Merge "Replace Handler with Executor" into sc-dev 2021-02-24 10:40:30 +00:00