Commit Graph

11277 Commits

Author SHA1 Message Date
TreeHugger Robot
3226bed7fd Merge "Introduce SystemAPI MediaProjectionGlobal" 2022-09-16 16:19:23 +00:00
Chavi Weingarten
612711c345 Introduce SystemAPI MediaProjectionGlobal
This API can be used from calls outside applications to create a virtual
display for mirroring. The permission checks in system server are still
in place so the caller must have CAPTURE_VIDEO_OUTPUT permission. This
class is intented to be used by systems that to stream device content,
but not from an application. In most cases, this will be called from
Shell or a system application.

Test: MediaProjectGlobalTest
Bug: 237664947
Change-Id: I43f79c83db7c82c0b682ef174fb1a5ab83795489
2022-09-16 13:13:04 +00:00
Vlad Popa
66824a3f9a Send piid to the native MediaPlayer's AudioTrack
The piid is sent in the prepare and prepareAsync methods after the data source is being
set and the native variables are initialized.

Test: dumpsys audio & atest android.media.audio.cts.AudioPlaybackConfigurationTest
Bug: 235521198
Change-Id: Ie3cbdb69814ff014fafc1737462d4fa8a8f687ca
2022-09-15 18:35:59 +02:00
Vlad Popa
81bafbed55 Fix dump when mute state not set
When mute state is not set the invalid value stored in
AudioPlaybackConfiguration is -1. This has a bitmask of 0x111.. and
previously returned true for all mute reasons.

Changed the dump of the mute state to print only the attributes
that lead to the muting of the track.

Test: dumpsys audio
Bug: 235521198
Change-Id: I741927ff14c12c2efd550f3fe61551d20239f8c0
2022-09-15 02:11:33 +02:00
TreeHugger Robot
4fb7c87f8b Merge "Change 'HDMI' on music notification panel UI to 'External Device'" 2022-09-13 20:44:41 +00:00
Wonsik Kim
cec540826e Merge changes from topic "skip-index-validation" into tm-qpr-dev-plus-aosp am: cf96cae3e6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19934118

Change-Id: If835e6b3225e0be31e8eab7cdb24413535f4269c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-13 17:27:07 +00:00
Sally Qi
bfdba14a78 Merge "Fix throw exception when using HardwareBuffer.BLOB format to create ImageReader/ImageWriter object." 2022-09-13 15:11:20 +00:00
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
2e69ef8382 Merge "Fix to allow setting URI without recreating ringtone" into tm-qpr-dev am: 6170285a1a am: e7eef125bf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19867851

Change-Id: I1427c8061228b462c15b0db8c4084fcbfea43de5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-12 22:44:16 +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
Sally Qi
49afba7d80 Fix throw exception when using HardwareBuffer.BLOB format to create
ImageReader/ImageWriter object.

- Internally, we should deal with HardwareBuffer.BLOB format according
  to surface's dataSpace. Directly passing BLOB format to
  getEstimatedNativeAllocBytes function will throw exception because
  BLOB format is not handled inside. Instead, use their corresponding
  imageFormat to avoid such failure in this case.

Bug: 244268240
Test: atest android.hardware.camera2.cts.ImageReaderTest, atest
android.hardware.camera2.cts.ImageWriterTest, atest
android.hardware.cts.DataSpaceTest

Change-Id: I3f18b9d3550f88be82cde75372637a3ae528b5ec
2022-09-12 12:14:12 -07:00
TreeHugger Robot
e9b5e1d675 Merge "LeAudio: Fix volume control" into tm-qpr-dev 2022-09-12 16:44:36 +00:00
Alex Dadukin
8b59d645f2 Change 'HDMI' on music notification panel UI to 'External Device'
- 'HDMI' was replaced with 'External Device'
- resource 'default_audio_route_name_hdmi' was renamed to
  'default_audio_route_name_external_device'

Bug: b/233323666
Test: Tested manually by replacing text in UMO's chip
Change-Id: I8178ab2c27b1ec1e4bbcfc244611190593d5d836
2022-09-12 12:30:48 +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
d494c71426 Merge "LeAudio: Fix volume control" am: 0075e9935d am: 5a664a3a71 am: 417a10f9cf am: 4315a6f223 am: 30060bfa6f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2203775

Change-Id: I0c10ff9751bccba99851ba5ad8c87c7a11e25207
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-09 08:34:33 +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
e68ac4c9cb Merge "Remove support for writing DNG files from ExifInterface" into tm-qpr-dev am: 96ca825746 am: 138ca58710
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19867204

Change-Id: I58304ac60c41841b06ef51c0105b26190ceb468c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-09 00:02:31 +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
9acf46f66f [conflict] Merge "Fix array-related errorprone warnings" am: a1eb8cf128 am: 44f8576073 am: 91d6c5b564 am: 6a79ae2567 am: 9b3a5fc03b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2186016

Change-Id: I5e59b8549df348c181cd3b72311798a5d7602a67
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-30 21:03:54 +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
Omer Osman
c085efb7cf Merge "Update Opus over A2DP to use BluetoothCodecConfig api" 2022-08-30 16:19:26 +00:00
Iván Budnik
898e0f45a1 Merge "Revert "Add safetyNet Logging comments and remove redundant code"" 2022-08-30 15:47:16 +00:00
Iván Budnik
345070d453 Revert "Add safetyNet Logging comments and remove redundant code"
This reverts commit 1594aae880.

Reason for revert: b/241798893.

Change-Id: I07366a6e8c02e1c2efce76048add73acb8677b72
2022-08-30 11:01:08 +00:00
Jean-Michel Trivi
32e4ce0826 AudioDeviceVolumeManager and VolumeInfo in SystemApi
Add the AudioDeviceVolumeManager and VolumeInfo classes to the
system API. Unhide only the method for changing the volume
of a given audio device.

Bug: 236764441
Test: atest AudioDeviceVolumeManager
Change-Id: If715a28afb79ee1a9625781d814652365e9fbfb7
2022-08-30 03:27:43 +00:00
Hongguang Chen
77ee161dac Merge "Support lazy tuner HAL" 2022-08-25 20:18:44 +00:00
Vlad Popa
0b3decc1d9 Merge "SoundPool: Assign the java piid to the AudioTrack" 2022-08-25 19:17:54 +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
TreeHugger Robot
47e6647fa9 Merge "Point users of AudioManager.setBluetoothA2dpOn to MediaRouter" 2022-08-25 17:51:53 +00:00
Santiago Seifert
1d8f61774b Point users of AudioManager.setBluetoothA2dpOn to MediaRouter
Bug: 238081912
Test: N/A. Javadoc change.
Change-Id: Iadd0713ee216cddb03dbd5d4e4cc7d1116932148
2022-08-25 14:34:44 +00:00
Vlad Popa
a6f2f169ca SoundPool: Assign the java piid to the AudioTrack
This allows to send native playback notifications for SoundPool players.

Test: dumpsys audio
Bug: 235521198
Change-Id: I7e743df4a16e0d8dae9f15f21fb4e8fa01aa4465
2022-08-25 13:52:08 +02:00
Hongguang
00ef56d886 Support lazy tuner HAL
The tuner server will register its resources to TunerResourceManager
every time when it's started. The TunerResourceManager will update its
resources accordingly.

The TunerResourceManager is only be started when the device has tuner
feature. All tuner functions should return error immediately if the
devcie does't have TunerResourceManager.

Release TunerClient if no one uses it. Stop using staitc TunerService
to release tunerserver the because TunerClient is ready signleton.

Disable lazy tunerserver if the device is running normal tuner HAL.

Bug: 236002754
Test: atest android.media.tv.tuner.cts on both lazy and normal HALs
Change-Id: I1fc3ca8413434701742cbe363b0ffd2d6dbf5f9c
2022-08-24 19:52:10 -07:00
Omer Osman
593d8f4519 Update Opus over A2DP to use BluetoothCodecConfig api
Bug: 240635097
Test: sink device using bds-dev
Change-Id: I573133a3f0cad910f935311e053c4f6fde5a2fc7
2022-08-25 00:10:08 +00: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
Santiago Seifert
3aa151259c Simplify MediaRouter2Manager.Client's lifecycle
Test: atest MediaRouter2ManagerTest
Bug: 239926177
Change-Id: I363dc3918465de7fdb74f833fae78f46bde72a37
2022-08-23 17:58:50 +00:00
Sadiq Sada
57b48cfcbb Merge "Fix documentation typo Test: None" 2022-08-23 03:04:37 +00:00
Shubang Lu
997f8e0c7e Merge "Fix CTS failures caused by ITvInteractiveAppSessionWrapper" 2022-08-22 23:12:32 +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
shubang
fda1592a7f Fix CTS failures caused by ITvInteractiveAppSessionWrapper
Bug: 243037044
Test: CtsTvTestCases
Change-Id: I4bced0c6b62b21ab508c6dba4e2e777b3890406c
2022-08-22 12:50:05 -07:00
Jean-Michel Trivi
04c1312159 Merge "Module API for BluetoothProfileConnectionInfo for BLE with volume" am: ec3e31bc41 am: 084cf13a12 am: 9c23ef9991 am: 6919452a3b am: 7c86f338e2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2191199

Change-Id: Idfc68ba64022fe61e265f1d719143ca1150195de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-22 18:04:56 +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