Commit Graph

11130 Commits

Author SHA1 Message Date
Wonsik Kim
a9cb0d623a MediaCodec: skip index validation at buffer validations
The index validation will happen at the MediaCodec native layer.

Bug: 244121189
Test: atest CtsMediaCodecTestCases
Test: atest CtsMediaDecoderTestCases
Test: atest CtsMediaEncoderTestCases
Test: atest CtsMediaV2TestCases
Change-Id: I1af0cd61ae19e86a115b5e347625b8476440e848
2022-09-12 23:02:58 +00:00
Wonsik Kim
5c8f80f756 RELAND MediaCodec: don't cache buffers until requested
Do not cache input/output buffers until explicitly requested.

Track validity of buffers before getInput/OutputBuffers so that the
dequeued buffers are marked accessible when the array is returned
to the client.

Bug: 189889230
Bug: 236106096
Test: manual
Merged-In: I6892f02853f00c3e355c827ec943fbdf183469f1
Change-Id: I6892f02853f00c3e355c827ec943fbdf183469f1
(cherry picked from commit 4a114c2f9c)
2022-09-12 23:01:05 +00:00
TreeHugger Robot
e7eef125bf Merge "Fix to allow setting URI without recreating ringtone" into tm-qpr-dev am: 6170285a1a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19867851

Change-Id: I20a2b0e8e77d32ea90ec833990adb0589d61da71
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-12 22:09:34 +00:00
TreeHugger Robot
6170285a1a Merge "Fix to allow setting URI without recreating ringtone" into tm-qpr-dev 2022-09-12 21:45:47 +00:00
TreeHugger Robot
e9b5e1d675 Merge "LeAudio: Fix volume control" into tm-qpr-dev 2022-09-12 16:44:36 +00:00
Edgar Arriaga
04432a6405 Fix to allow setting URI without recreating ringtone
This patch splits the behavior of creating the media player
and the uri setter and avoids it from being recreated upon
being retrieved by getRingtone which harms performance
causing a double asset load.

Bug: 240621827
Test: Receive a phone call and verify ringtone works

Change-Id: I91563ddcc94f25911937e9fbb35ff36bbe9d3012
2022-09-09 22:45:54 +00:00
Jakub Tyszkowski
142729a64d LeAudio: Fix volume control
The calculation formula is now set to be the inverse of the one used
in VolumeControlService.java when calculating volume index from the
BLE audio volume level.

This also fixes not using the absolute volume for BLE audio stream,
which could result with very low volume levels at the lower registers
of the volume slider. It was caused by lowering the volume on both
ends. Not transmitting the sound at the maximum volume level could
also reduce the sound quality due to effective sound sample resolution
being lower.

Bug: 238587620
Bug: 241501978
Test: built and manually tested
Tag: #feature
Change-Id: I368c8978be5fbd94b0f62df2551fe179a9f203a0
Merged-In: I368c8978be5fbd94b0f62df2551fe179a9f203a0
(cherry picked from commit 51d75fbc69)
2022-09-09 12:33:18 +00:00
Jack He
30060bfa6f Merge "LeAudio: Fix volume control" am: 0075e9935d am: 5a664a3a71 am: 417a10f9cf am: 4315a6f223
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2203775

Change-Id: I600bd7fa6ffa37914135b21baf3e35a6200f4cc2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-09 08:07:13 +00:00
Jack He
417a10f9cf Merge "LeAudio: Fix volume control" am: 0075e9935d am: 5a664a3a71
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2203775

Change-Id: I79aa22799b62b43926c9217c527ef13613899658
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-09 07:14:45 +00:00
TreeHugger Robot
138ca58710 Merge "Remove support for writing DNG files from ExifInterface" into tm-qpr-dev am: 96ca825746
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19867204

Change-Id: I7106feefe3a9ac6923ec5dca29909065ad5e8b84
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-08 23:17:25 +00:00
TreeHugger Robot
96ca825746 Merge "Remove support for writing DNG files from ExifInterface" into tm-qpr-dev 2022-09-08 22:49:58 +00:00
Jakub Tyszkowski
51d75fbc69 LeAudio: Fix volume control
The calculation formula is now set to be the inverse of the one used
in VolumeControlService.java when calculating volume index from the
BLE audio volume level.

This also fixes not using the absolute volume for BLE audio stream,
which could result with very low volume levels at the lower registers
of the volume slider. It was caused by lowering the volume on both
ends. Not transmitting the sound at the maximum volume level could
also reduce the sound quality due to effective sound sample resolution
being lower.

Bug: 238587620
Bug: 241501978
Test: built and manually tested
Tag: #feature
Change-Id: I368c8978be5fbd94b0f62df2551fe179a9f203a0
2022-09-07 10:06:09 +00:00
Ian Baker
aaaaf27af4 Remove support for writing DNG files from ExifInterface
The DNG support added was incomplete, and results in the input being
overwritten by invalid data.

This is a partial revert of ag/15320526

Bug: 193010735
Bug: 239902748
Test: atest CtsMediaMiscTestCases:ExifInterfaceTest
Change-Id: I492020bc7a9fbaa6a3670c118589173822db0fe1
2022-09-06 16:11:55 +00:00
Cole Faust
9b3a5fc03b Merge "Fix array-related errorprone warnings" am: a1eb8cf128 am: 44f8576073 am: 91d6c5b564 am: 6a79ae2567
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2186016

Change-Id: I7052a1f7391ed6701fe0e1036c27368609032e35
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-30 20:44:00 +00:00
Cole Faust
91d6c5b564 Merge "Fix array-related errorprone warnings" am: a1eb8cf128 am: 44f8576073
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2186016

Change-Id: Icfb700330d9a9cd0a592b76c9e4cf4a8bcd19c30
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-30 19:01:56 +00:00
Cole Faust
584140c83a Fix array-related errorprone warnings
The ArrayEquals, ArrayHashCode, ArrayToString, and
ArraysAsListPrimitiveArray errorprone findings were
demoted from errors to warnings. Fix existing
occurrences of them so they can be made errors again.

Bug: 242630963
Test: RUN_ERROR_PRONE=true m javac-check
Change-Id: Ia6f216cc36ad0a5758f39fd9b34962cd4adf9d8e
2022-08-25 10:57:12 -07:00
Andy Hung
60fe7b36ed Merge "AudioSystem: Fix hdmi name typo" into tm-qpr-dev am: bca24335ac
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19697118

Change-Id: If4071fe3c69d4e5b9a8bad631a2f878406cb50f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-24 18:16:25 +00:00
Andy Hung
bca24335ac Merge "AudioSystem: Fix hdmi name typo" into tm-qpr-dev 2022-08-24 17:12:45 +00:00
TreeHugger Robot
abba82cd9d Merge "RELAND MediaCodec: don't cache buffers until requested" into tm-qpr-dev 2022-08-22 20:13:22 +00:00
Jean-Michel Trivi
7c86f338e2 Merge "Module API for BluetoothProfileConnectionInfo for BLE with volume" am: ec3e31bc41 am: 084cf13a12 am: 9c23ef9991 am: 6919452a3b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2191199

Change-Id: I68b15f8bf2e19d6266e29bb06930ed6053e3aaed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-22 17:47:31 +00:00
Andy Hung
9c31ca9be3 AudioSystem: Fix hdmi name typo
Used for metrics logging.

Test: compiles
Bug: 233773341
Merged-In: I4e2c14f49d96f2bde98b3274233f0dd2083134bb
Change-Id: I4e2c14f49d96f2bde98b3274233f0dd2083134bb
(cherry picked from commit 799bb3e978)
2022-08-22 17:41:33 +00:00
Jean-Michel Trivi
9c23ef9991 Merge "Module API for BluetoothProfileConnectionInfo for BLE with volume" am: ec3e31bc41 am: 084cf13a12
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2191199

Change-Id: I9a407e21583252687645ce9ca6c4ddc3ab31b740
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-22 17:11:10 +00:00
Treehugger Robot
4bb8c56695 Merge "BLE audio: support assigning volume at BLE device connection" am: f986b19767 am: afb1ed66af
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2191195

Change-Id: Ic52f0edfce28e0eeab9244275378a16c6703f6e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-20 00:51:23 +00:00
Jean-Michel Trivi
4b441c8ef4 Module API for BluetoothProfileConnectionInfo for BLE with volume
Add factory method for BLE output device with volume information

Bug: 233975367
Test: atest frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/BluetoothProfileConnectionInfoTest.java
Change-Id: If9f88e2489f93f05c6c83424fc7b7a12671c1f32
2022-08-19 22:39:24 +00:00
Jean-Michel Trivi
c408b9825f BLE audio: support assigning volume at BLE device connection
Add support for associating an initial volume with a BLE
connection:
- add volume info to BluetoothProfileConnectionInfo in a new
BLE output factory method
- when handling device connection for BLE, also check if
volume information from the connection information is available.

Bug: 233975367
Test: atest frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/BluetoothProfileConnectionInfoTest.java
Change-Id: Ib54267727bc4d47e6999f2b84eab805f23c4955a
Merged-In: Ib54267727bc4d47e6999f2b84eab805f23c4955a
2022-08-19 18:50:50 +00:00
Jean-Michel Trivi
89d79f7e3c Merge "BLE audio: support assigning volume at BLE device connection" into tm-qpr-dev am: bfe6b27698
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19235354

Change-Id: Ie6cfc5d69fb7f8f22aee29c1bbc4dae68aee849b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-18 21:31:31 +00:00
Jean-Michel Trivi
bfe6b27698 Merge "BLE audio: support assigning volume at BLE device connection" into tm-qpr-dev 2022-08-18 21:06:06 +00:00
Jean-Michel Trivi
ac030295ba Merge "AudioService: properties for configuring ring/notif steps/default vol" into tm-qpr-dev am: fc1f09ff31
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19606525

Change-Id: I208da962f61bd766a7dd43fdd0688506d30b8b22
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-17 19:52:02 +00:00
Jean-Michel Trivi
b2c88cca28 AudioService: properties for configuring ring/notif steps/default vol
Define 4 new properties that can be used to override the default
notification and ringtone volume number of steps and default value.
  Throw IllegalArgumentException when max volume is not strictly
positive, if default volume is greater than max volume or
lower than min volume.

Bug: 228180814
Test: dumpsys audio to check default/max for notif/ring
Change-Id: Ib12fd2207b1201ced4bc838892ed23d10e45c3c9
2022-08-16 19:34:42 +00:00
Treehugger Robot
5fb19f60f0 Merge "Changing max SampleRate limits for raw audio decoder" am: 525e043906 am: 6bfae72b59 am: 58eddceacd am: cd1bc81ab3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2180355

Change-Id: I8e88f0b71b4c95a513bd1a6ede17b4dad37560e8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-10 00:20:57 +00:00
Treehugger Robot
58eddceacd Merge "Changing max SampleRate limits for raw audio decoder" am: 525e043906 am: 6bfae72b59
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2180355

Change-Id: Ifc3c7b321794aab5cee1ed58017c1bc9013b646d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-09 23:05:22 +00:00
Treehugger Robot
6bfae72b59 Merge "Changing max SampleRate limits for raw audio decoder" am: 525e043906
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2180355

Change-Id: I20f6c3c28283362e8671c85cfe21175fc80d0b9f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-09 22:38:54 +00:00
Treehugger Robot
525e043906 Merge "Changing max SampleRate limits for raw audio decoder" 2022-08-09 21:47:08 +00:00
Arun Johnson
3c5683f310 Changing max SampleRate limits for raw audio decoder
bug: 240984267
Change-Id: Ib3d0b9755f0ec99daf5b3241ca23d3b0cc1fb839
2022-08-09 16:33:55 +00:00
Wonsik Kim
32ffc779e2 RELAND MediaCodec: don't cache buffers until requested
Do not cache input/output buffers until explicitly requested.

Track validity of buffers before getInput/OutputBuffers so that the
dequeued buffers are marked accessible when the array is returned
to the client.

Bug: 189889230
Bug: 236106096
Test: manual
Merged-In: I6892f02853f00c3e355c827ec943fbdf183469f1
Change-Id: I6892f02853f00c3e355c827ec943fbdf183469f1
2022-08-06 16:21:13 +00:00
Wonsik Kim
4a114c2f9c RELAND MediaCodec: don't cache buffers until requested
Do not cache input/output buffers until explicitly requested.

Track validity of buffers before getInput/OutputBuffers so that the
dequeued buffers are marked accessible when the array is returned
to the client.

Bug: 189889230
Bug: 236106096
Test: manual
Merged-In: I6892f02853f00c3e355c827ec943fbdf183469f1
Change-Id: I6892f02853f00c3e355c827ec943fbdf183469f1
2022-08-06 09:18:01 -07:00
Treehugger Robot
1d81f1e0a3 Merge changes I6892f028,I2e52c3ab
* changes:
  RELAND MediaCodec: don't cache buffers until requested
  Revert "MediaCodec: don't cache buffers until requested"
2022-08-05 18:29:00 +00:00
Omer Osman
b702d4f65f Merge "Add support for Opus over A2DP" into tm-qpr-dev am: 165f760907
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17901607

Change-Id: I635a948fdd487727d7023ec0cb497f09f0fa655f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-04 19:00:13 +00:00
Omer Osman
165f760907 Merge "Add support for Opus over A2DP" into tm-qpr-dev 2022-08-04 17:40:20 +00:00
Wonsik Kim
0e2297b795 RELAND MediaCodec: don't cache buffers until requested
Do not cache input/output buffers until explicitly requested.

Track validity of buffers before getInput/OutputBuffers so that the
dequeued buffers are marked accessible when the array is returned
to the client.

Bug: 189889230
Bug: 236106096
Test: manual
Change-Id: I6892f02853f00c3e355c827ec943fbdf183469f1
2022-08-03 11:09:53 -07:00
TreeHugger Robot
8c29ff3131 [conflict] Merge "AudioDeviceVolumeManager: set volume per device" into tm-qpr-dev am: 224306180e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19277102

Change-Id: I66687232d1d42a81b75a3ecd58ed849347471524
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-28 13:12:50 +00:00
Jean-Michel Trivi
118ca2fc25 AudioDeviceVolumeManager: set volume per device
Add API in AudioDeviceVolumeManager that allows setting
volume for a specific audio device.

Bug: 236764441
Test: atest AudioDeviceVolumeManagerTest
Change-Id: Iebb277b35dbf5aa49c1fd4a8ec6dd904afa11ad9
2022-07-27 19:02:25 +00:00
Wonsik Kim
5b2d2cf6b9 Revert "MediaCodec: don't cache buffers until requested"
This reverts commit 07358dfea5.

Merged-In: I2e52c3abdd13fa0547a510b3599e082e3bff0989
Change-Id: I2e52c3abdd13fa0547a510b3599e082e3bff0989
2022-07-26 11:12:49 -07:00
Jean-Michel Trivi
ff46cdd950 BLE audio: support assigning volume at BLE device connection
Add support for associating an initial volume with a BLE
connection:
- add volume info to BluetoothProfileConnectionInfo in a new
BLE output factory method
- when handling device connection for BLE, also check if
volume information from the connection information is available.

Bug: 233975367
Test: atest frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/BluetoothProfileConnectionInfoTest.java
Change-Id: Ib54267727bc4d47e6999f2b84eab805f23c4955a
2022-07-11 16:41:01 +00:00
Treehugger Robot
416d479225 Merge "Update doc for audio-coupled-haptic related stuff." am: fe752fc2b4 am: 1fe0a419aa am: 4ce721d428 am: eddf6d85c2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2142192

Change-Id: Ifed67552955d00b8ce020859346c4daee3debe14
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-08 00:36:04 +00:00
Treehugger Robot
1fe0a419aa Merge "Update doc for audio-coupled-haptic related stuff." am: fe752fc2b4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2142192

Change-Id: I3f5cfa8f028fba4807a95834920737b68dd73dd5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 23:25:33 +00:00
Treehugger Robot
fe752fc2b4 Merge "Update doc for audio-coupled-haptic related stuff." 2022-07-07 23:02:03 +00:00
jiabin
60cf4a5b02 Update doc for audio-coupled-haptic related stuff.
When using audio-coupled-haptic playback, the haptic channels will be
muted if the app doesn't have the vibrate permission. Update the doc to
state that apps should hold vibrate permission to make
audio-coupled-haptic works as expected.

Bug: 236586224
Test: make
Change-Id: I69c1332d39f997a61f3a969d652144d829de9659
2022-07-06 16:32:29 +00:00
Naomi Musgrave
cf1dc5c71b Merge "[Partial Screenshare] Set WindowContainerToken for task capture" into tm-qpr-dev am: 7430d775c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18918928

Change-Id: I69a714482db0dc597e921ef48f8db8e0d4d99fd5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 11:24:36 +00:00
Naomi Musgrave
6254236666 [Partial Screenshare] Set WindowContainerToken for task capture
The launch cookie of the target task will be provided by SysUI;
convert this to the WindowContainerToken so the ContentRecorder
can capture the correct layer of the hierarchy.

Bug: 235984372
Test: atest WmTests:WindowManagerServiceTests
Change-Id: I52f69cd078dd5b8ba6cb5b1c292423773dbd8123
2022-06-27 17:52:09 +00:00