This is a cherrypick of commit 3aa151259c.
Test: atest MediaRouter2ManagerTest
Bug: 239926177
Change-Id: I363dc3918465de7fdb74f833fae78f46bde72a37
Merged-In: I363dc3918465de7fdb74f833fae78f46bde72a37
This is a cherrypick of commit 58fb7d617d.
Bug: 239926177
Test: atest mediaroutertest CtsMediaBetterTogetherTestCases
Change-Id: I8478669747ca291d92b825e205f58add76e9a2a2
Merged-In: I8478669747ca291d92b825e205f58add76e9a2a2
This is a cherrypick of commit d9ac018756.
Before this change, MediaRouter2Manager (singleton) does not
protect clients against independent changes to the scanning
state, which means one client can stop the scan while another
needs scanning to go on. After this change, MediaRouter2Manager
keeps count of the calls to request scanning, and will only
request scanning from the system server while there is at least
one active scan request (via registerScanRequest).
This change does not affect MediaRouter2.start/stopScan.
Bug: 232812007
Test: atest CtsMediaBetterTogetherTestCases
Change-Id: I8d80872d7c55791b9a429180da1c68af50ae13b7
Merged-In: I8d80872d7c55791b9a429180da1c68af50ae13b7
This is a cherrypick of commit 147cb7c877.
Said exceptions mean the system server died, after which
guidance suggests it's not a good idea to silently swallow
said exception. Specially considering the client will be
restarted shortly after the system server dies.
Bug: 232812007
Test: atest MediaDeviceManagerTest MediaDataCombineLatestTest CtsMediaBetterTogetherTestCases
Change-Id: I21a724896684d79097ae74df2d5a54e60514ebdf
Merged-In: I21a724896684d79097ae74df2d5a54e60514ebdf
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
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)
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
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
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
Add API in AudioDeviceVolumeManager that allows setting
volume for a specific audio device.
Bug: 236764441
Test: atest AudioDeviceVolumeManagerTest
Change-Id: Iebb277b35dbf5aa49c1fd4a8ec6dd904afa11ad9
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
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
This CL add support for Opus as an A2DP codec in Audio Framework and
selection of the codec in Developer Options.
Bug: 226441860
Test: Sink device using bds-dev
Change-Id: I1d68209e8f996e78adeed03b77a3ee9cacda6307
The API says that null is returned, but an exception was thrown.
Also correct a misleading word in the getAll description.
Bug: 232286218
Change-Id: Iee336628753fad29bb5fccff211e4997fb51a99b
When MediaProjection sets the session details in
MediaProjectiondManagerService, clear and re-set the
calling identity (since we have entered the system server
across the aidl boundary).
Additionaly, verify that the call originated from a valid
MediaProjection session. In the current model for
MediaProjection, signature-level permission
MANAGE_MEDIA_PROJECTION is held by the component that shows the
acceptance dialog to the user. The user allowing some app to
capture with MediaProjection is represented by
the IMediaProjection token (see MediaProjectionManagerService#
isValidMediaProjection).
Bug: 230748205
Test: Manual
Change-Id: Iace8eb7eea6c7a99fba7ea726481461a11bd1c90
Expand documentation for AudioTrack.play() to include get and set start
threshold from Android S.
Bug: 192920591
Test: N/A, only changes documentation
Change-Id: Ibb4da2c3f5239b480c49e7bcbaae5b50ef5d01d3
Currently, multiple absolute volume listeners from the same controller
can be notified of volume change events because old ones are not removed
from AudioDeviceVolumeManager.
This CL removes existing listeners for a device when a new one is added.
We also no longer forbid re-adding a listener currently in
AudioDeviceVolumeManager's list, as it might have been removed from
AudioService.
Bug: 231433390
Test: manual; atest android.hdmicec.cts.playback.HdmiCecAvcToTvTest
Change-Id: If7ecd58880001b955565e0f65ede9f0787e1be49