Commit Graph

10969 Commits

Author SHA1 Message Date
Oliver Woodman
9e6fbe8e78 Merge "Mediarouter: clean up callbacks" into tm-dev am: d3b1abefd0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17071600

Change-Id: I883a493065858a38bbd196bbc53e446f843f2ec6
2022-03-07 13:15:35 +00:00
Oliver Woodman
d3b1abefd0 Merge "Mediarouter: clean up callbacks" into tm-dev 2022-03-07 13:03:22 +00:00
Kyunglyul Hyun
f459bec188 Mediarouter: clean up callbacks
According to change in RouteDiscoveryPreference,
this CL corrects MediaRouter2.RouteCallback callbacks

Bug: 193631822
Test: atest MediaRouter2Test MediaRouter2HostTest
Change-Id: Ie1190c52d325d1122e4cca571d1d26b1f8eb175a
2022-03-07 17:26:32 +09:00
Shaowei Shen
efadb12ed0 Merge "[Output Switcher] Apply distance information for devices ranking" into tm-dev am: 9a3733891c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17052086

Change-Id: Ie5fd30433bd43ed417c12fa394375561ab30cf8e
2022-03-07 07:12:56 +00:00
Shaowei Shen
9a3733891c Merge "[Output Switcher] Apply distance information for devices ranking" into tm-dev 2022-03-07 06:57:54 +00:00
TreeHugger Robot
d3672e192a Merge "Add a test API to query audio HAL version." into tm-dev 2022-03-04 23:26:24 +00:00
TreeHugger Robot
c98dcb3a84 Merge "Cherry pick for contentAllowed bug fix" into tm-dev am: 345a6bf30a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17071933

Change-Id: I21ec5ab92941c0351d96453c15ecaf4b7746eb65
2022-03-04 20:55:17 +00:00
shaoweishen
06ccd1aec7 [Output Switcher] Apply distance information for devices ranking
When controller start, register nearbyDevice callback to get Devices
list, add range zone into MediaDevices list, apply ranking rule
when sorting.

Bug: 203073098
Test: atest MediaOutputAdapterTest MediaOutputControllerTest MediaOutputBaseDialogTest MediaOutputDialogTest MediaOutputGroupAdapterTest MediaOutputGroupDialogTest
Change-Id: Ia8f63b7aed2a5f311b9ecc1901306035441957f6
2022-03-04 16:38:55 +00:00
Yixiao Luo
985b7b0174 Cherry pick for contentAllowed bug fix
Change-Id: Ib65897c642284bf5c2137a86c0cee9d36b107667
2022-03-03 15:06:00 -08:00
Naomi Musgrave
769b37a901 Merge "MediaProjection sets content recording details in WM directly." into tm-dev am: 3302797586
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16933664

Change-Id: Ied0cd35f5fb924b0a47ffa862c9a19c82621606b
2022-03-03 10:52:52 +00:00
Naomi Musgrave
3302797586 Merge "MediaProjection sets content recording details in WM directly." into tm-dev 2022-03-03 10:45:36 +00:00
jiabin
fe6b7f19fd Add a test API to query audio HAL version.
Add a test API to query audio HAL version. The HAL version is useful
for test since the HAL version cannot be determined from the platform
version. There can be some test requiring external devices connection
that can only run in CTS verifier but not the VTS. With a different HAL
version, there can be different CDD requirements for a given API. In
that case, the test will need to know the HAL version to behave
differently.

Bug: 195401076
Test: atest AudioManagerTest
Change-Id: I18cbf2f181e799e56b48916aefaede50389051fe
2022-03-02 23:56:39 +00:00
Naomi Musgrave
27655e1fc3 MediaProjection sets content recording details in WM directly.
Content recording relies upon a class describing current state.
rather than passing around details from media > display > wm.
WMService keeps track of the session in ContentRecordingController.
ContentRecordingController manages hand-off between different
DisplayContent instances, as the session details are changed.

Manually tested that fold/unfold handling when screen recording
from QS tile still works, and that taking over a screen cast
with a screen recording works.

Refactoring logic from DisplayContent into new recording
delegate will come in a future change.

Bug: 216756854
Test: atest FrameworksCoreTests:ContentRecordingSessionTest
Test: atest WmTests:DisplayContentTests
Test: atest WmTests:ContentRecordingControllerTests
Change-Id: Ib4f125dd703d362ac13fcbe469d00b345827e706
2022-03-02 18:32:34 +00:00
Caitlin Cassidy
ccec12ed13 Merge "[Nearby Devices] Minor updates to API based on API review." into tm-dev am: fe57067427
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16988389

Change-Id: If5c8314736fff1a55fddc2e541e778897299ad6a
2022-03-02 16:27:15 +00:00
Caitlin Cassidy
fe57067427 Merge "[Nearby Devices] Minor updates to API based on API review." into tm-dev 2022-03-02 16:19:15 +00:00
Caitlin Cassidy
e6da154c51 [Nearby Devices] Minor updates to API based on API review.
Fixes: 220153391
Test: compiles
Change-Id: I0bb50f04af041f79413e8f1fbc4be78901e5dd88
2022-03-01 18:09:20 +00:00
Andy Hung
c640ee83fb Merge "Use device set for getDevicesForStream" into tm-dev 2022-03-01 16:37:31 +00:00
Andy Hung
b11e4c7463 Use device set for getDevicesForStream
Implemented through getDevicesForAttributes.
This change avoids device bit-mask aliasing.

Use a TreeSet for device set instead of
HashSet to unify with native handling.

Test: boot and check audio
Test: atest audiopolicy_tests
Test: atest AudioHostTest
Test: atest AudioServiceHostTest
Test: atest AudioManagerTest
Bug: 184944421
Bug: 220928984
Merged-In: Id382172f44f604de659de0bff52c0a28603d1e79
Change-Id: Id382172f44f604de659de0bff52c0a28603d1e79
2022-02-28 12:17:13 -08:00
Oscar Azucena
c3c0da4450 Merge "Fixed API review comments on primitive types on assistant APIs" into tm-dev 2022-02-28 20:02:39 +00:00
Andy Hung
496c1b76a8 AudioService: update getDevicesForAttributes
Add forVolume parameter to account for volume handling.

Test: volume changes, adb shell dumpsys audio
Bug: 219974551
Merged-In: I1b6b4a9d3c52bd4375ee3ce2f50fd9a0e47f6a90
Change-Id: I1b6b4a9d3c52bd4375ee3ce2f50fd9a0e47f6a90
2022-02-26 00:27:42 +00:00
Oscar Azucena
88467feeba Fixed API review comments on primitive types on assistant APIs
Removed list of boxed integers in favor of array of integers to avoid
the cost of auto-boxing. Also added defensive copying of the integer
arrays where needed.

Bug: 219768765
Bug: 218793188
Test: atest AudioManagerTest
Change-Id: I6103fb78ab366b423336e168eaf5e38f8b0401ef
Merged-In: I6103fb78ab366b423336e168eaf5e38f8b0401ef
(cherry picked from commit 49c74c9b34)
2022-02-25 20:36:11 +00:00
Andy Hung
52fcf95576 Merge "Use device set for getDevicesForStream" 2022-02-25 16:44:57 +00:00
Oscar Azucena
4577d5ad77 Merge "Fixed API review comments on primitive types on assistant APIs" 2022-02-24 22:19:13 +00:00
Andy Hung
a6d046b07c Merge "AudioService: update getDevicesForAttributes" 2022-02-24 21:05:47 +00:00
Nikolas Havrikov
d3f5c4352d Replace LinkedList by a more performant collection
This is a semi-automatic change.
See https://errorprone.info/bugpattern/JdkObsolete for the rationale.

Test: make
Bug: 221046110
Change-Id: I56d68da6531c7266a8592fb80b94877da9eb5fb4
2022-02-24 10:44:34 +00:00
Andy Hung
1162c55ed4 Use device set for getDevicesForStream
Implemented through getDevicesForAttributes.
This change avoids device bit-mask aliasing.

Use a TreeSet for device set instead of
HashSet to unify with native handling.

Test: boot and check audio
Test: atest audiopolicy_tests
Test: atest AudioHostTest
Test: atest AudioServiceHostTest
Test: atest AudioManagerTest
Bug: 184944421
Bug: 220928984
Change-Id: Id382172f44f604de659de0bff52c0a28603d1e79
2022-02-23 18:28:15 -08:00
Sally Qi
7da4d8868c Fix the issue in ImageWriter Builder class.
- Builder.mUseLegacyImageFormat is set to false by default. Fix the
  mismatch format result.

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

Change-Id: I69639cfcd7b486d7dc464d549c8a110cbb2ae89f
Merged-In: I69639cfcd7b486d7dc464d549c8a110cbb2ae89f
2022-02-23 02:16:20 +00:00
TreeHugger Robot
1a09f89a84 Merge "Fix the issue in ImageWriter Builder class." 2022-02-23 01:51:33 +00:00
Andy Hung
515b6b3a49 AudioService: update getDevicesForAttributes
Add forVolume parameter to account for volume handling.

Test: volume changes, adb shell dumpsys audio
Bug: 219974551
Change-Id: I1b6b4a9d3c52bd4375ee3ce2f50fd9a0e47f6a90
2022-02-21 23:41:17 -08:00
TreeHugger Robot
05857c5dc1 Merge "Add a test API to query audio HAL version." 2022-02-18 21:15:37 +00:00
jiabin
0289e15505 Add a test API to query audio HAL version.
Add a test API to query audio HAL version. The HAL version is useful
for test since the HAL version cannot be determined from the platform
version. There can be some test requiring external devices connection
that can only run in CTS verifier but not the VTS. With a different HAL
version, there can be different CDD requirements for a given API. In
that case, the test will need to know the HAL version to behave
differently.

Bug: 195401076
Test: atest AudioManagerTest
Change-Id: I18cbf2f181e799e56b48916aefaede50389051fe
2022-02-18 18:44:47 +00:00
Henry Fang
d596024bef add a method for non session
bug: 215546861
Test: atest android.media.tv.cts.TvInputManagerTest
Change-Id: I641b51ae28f0e4834644a8ee8d879b768fda0bd2
2022-02-18 18:12:44 +00:00
Henry Fang
f591078fac Merge "add a method for non session" 2022-02-18 01:44:55 +00:00
Henry Fang
19c664582f add a method for non session
bug: 215546861
Test: atest android.media.tv.cts.TvInputManagerTest
Change-Id: I641b51ae28f0e4834644a8ee8d879b768fda0bd2
2022-02-17 11:55:35 -08:00
TreeHugger Robot
d74805e935 Merge "Refactor Handler with Executor" 2022-02-16 23:48:05 +00:00
Baligh Uddin
fba1cbe1cd Merge "Remove apex/media - migrated to packages/modules/Media" 2022-02-16 22:36:25 +00:00
Oscar Azucena
49c74c9b34 Fixed API review comments on primitive types on assistant APIs
Removed list of boxed integers in favor of array of integers to avoid
the cost of auto-boxing. Also added defensive copying of the integer
arrays where needed.

Bug: 219768765
Bug: 218793188
Test: atest AudioManagerTest
Change-Id: I6103fb78ab366b423336e168eaf5e38f8b0401ef
2022-02-16 19:02:43 +00:00
Baligh Uddin
b8b46fde2a Remove apex/media - migrated to packages/modules/Media
Fix references for local_include_dirs for aidl support.

BUG: 171106157
Test: Local build and TH
Change-Id: Ice516a0ab0819c4a076c394c05be1643461d4309
2022-02-16 16:00:58 +00:00
Carter Hsu
91bd818a47 Merge "add permission check for isUltrasoundSupported" 2022-02-16 11:13:28 +00:00
Carter Hsu
3ea30de47b add permission check for isUltrasoundSupported
Bug: 217366076
Test: build pass
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I7f68e5f6244637973b7ca468c4eef1dc5b05aaad
2022-02-15 15:59:00 +08:00
Jean-Michel Trivi
a22c7e6be6 Merge "AudioService: new interface for absolute volume control" 2022-02-15 05:30:32 +00:00
Jean-Michel Trivi
7d46e82bcd AudioService: new interface for absolute volume control
New class VolumeInfo to communicate any type of
  volume information, such as volume type (stream
  type vs volume group), index and associated
  range.
New manager class AudioDeviceVolumeManager to
  serve as the client-side code for setting
  absolute volume for a given device, and
  registering the corresponding volume change
  listener. This is not done through AudioManager
  so as to not keep on piling functionality
  into it that increases its memory footprint.

Bug: 201781907
Test: upcoming after hook up in AudioService

Change-Id: I97fd1827f27f55a90d92c538c142a4d9aae966b3
2022-02-14 17:51:28 -08:00
Caitlin Cassidy
89e1907bba Merge "[Nearby Media Devices] Add a SystemApi to get information about nearby media devices from external clients." 2022-02-14 12:59:24 +00:00
TreeHugger Robot
a52cd1070a Merge "Define BundleSession for MediaMetrics" 2022-02-12 05:40:03 +00:00
TreeHugger Robot
b39511223b Merge "Add TranscodingSession and EditingSession to MediaMetricsManager" 2022-02-12 03:00:58 +00:00
Ray Essick
a4c545a301 Define BundleSession for MediaMetrics
This brings the extensability of bundles in existing metrics out to
the level of an entire metric. Bundles allow us to present data to the
metrics module (moving to mainline) and statsd (already in mainline) so
that approved metrics can be plumbed through without an OTA system update.
All metrics data will be vetted within the metrics module and statsd
to ensure only approved metrics data leaves the device.

Bug: 214594702
Test: atest CtsMediaHostTestCases
Change-Id: I8dd1acbc0d6166b7448b7ca0f5e6ec9f4a24e471
2022-02-11 13:49:57 -08:00
Caitlin Cassidy
ba6b756d0e [Nearby Media Devices] Add a SystemApi to get information about nearby
media devices from external clients.

Bug: 216313420
Test: CTS included in same topic
Test: atest NearbyMediaDevicesManagerTest
Change-Id: Ic5f26d3048a3475dbd232c913bb00bee46339b0a
2022-02-11 20:59:43 +00:00
Ray Essick
9db8e0d20e Add TranscodingSession and EditingSession to MediaMetricsManager
Adds TranscodingSession and EditingSession stubs, following pattern of
RecordingSession. Sets up for compat-level extensions.

Bug: 214594702
Test: atest CtsMediaHostTestCases
Change-Id: I96a5f36cd44b5029d8fb5498971d0beb0c49eec0
2022-02-11 12:51:54 -08:00
Jean-Michel Trivi
f474524ab4 Spatializer: more SysApi for availability, head tracker
Add @SystemApi to check if the Spatializer will be available for
a given device, if it has a head tracker, if enabled, and
change its tracker enabled state.
  Implement checking device compatibility with transaural and
binaural modes. Create list of compatible devices, list of
devices that have been enabled, and list of disabled. This is
to support the V3 UI where add/removeCompatibleDevice is used
to control Spatial Audio state for a subset of output devices.

Bug: 210803914
Test: atest SpatializerTest
Change-Id: I0acf0c0310dbd503de2ea87328fca7e5597ae32d
2022-02-11 08:08:51 -08:00
Sally Qi
2161f364bc Fix the issue in ImageWriter Builder class.
- Builder.mUseLegacyImageFormat is set to false by default. Fix the
  mismatch format result.

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

Change-Id: I69639cfcd7b486d7dc464d549c8a110cbb2ae89f
2022-02-10 10:51:05 -08:00