Commit Graph

10947 Commits

Author SHA1 Message Date
TreeHugger Robot
d3672e192a Merge "Add a test API to query audio HAL version." into tm-dev 2022-03-04 23:26:24 +00:00
Yixiao Luo
985b7b0174 Cherry pick for contentAllowed bug fix
Change-Id: Ib65897c642284bf5c2137a86c0cee9d36b107667
2022-03-03 15:06:00 -08: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
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
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
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
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
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
TreeHugger Robot
bdd4239197 Merge "Allow MediaCodecs to be created on behalf of other client processes." 2022-02-10 10:47:39 +00:00
Oscar Azucena
72861bd8c7 Merge changes from topic "set_assistants_uid"
* changes:
  Added API to set active assistant UIDs
  Added API to set assistants UID.
2022-02-10 07:11:01 +00:00
Henry Fang
c9f4df013a Merge "Guard TvInputManager#getClientPriority()" 2022-02-10 02:26:59 +00:00
Brian Lindahl
6ceeed4fdd Allow MediaCodecs to be created on behalf of other client processes.
Use case is for TV Input Service which creates MediaCodecs when tuning
to TV channels on behalf of operator and OEM apps. Requires the
MEDIA_RESOURCE_PID_OVERRIDE permission.

Bug: 217746837
Test: atest MediaCodecResourceTest
Change-Id: I191ff13c5730970664a818a9333c160e6e773c7d
2022-02-09 23:34:44 +01:00
Treehugger Robot
c8299d28a3 Merge "Fix typo" am: a31dc6da2a am: b19c821215 am: 1bbec10259 am: bfc5abe83b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1976266

Change-Id: Ib8eb0b4bc5c9fe2df408c36a90f30d8ce83db12c
2022-02-09 21:34:49 +00:00
Treehugger Robot
bfc5abe83b Merge "Fix typo" am: a31dc6da2a am: b19c821215 am: 1bbec10259
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1976266

Change-Id: I41302c19b8503b486ba1228bc2d170b1863fe894
2022-02-09 21:10:48 +00:00
Treehugger Robot
1bbec10259 Merge "Fix typo" am: a31dc6da2a am: b19c821215
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1976266

Change-Id: I1d66400e8a09fdc4deaee75313f900a3306e695f
2022-02-09 20:56:03 +00:00
Treehugger Robot
a31dc6da2a Merge "Fix typo" 2022-02-09 20:21:35 +00:00
Oscar Azucena
3ef3f58c98 Added API to set active assistant UIDs
Added API to manage the currently active assistant. When an
assistant becomes active the API will set the assistant's
voice interaction service and its corresponding hotword detection
service to active. When the assistant becomes inactive the API will
be called to reset the assistants UIDs. For the latter the API will
be called with an empty list of UIDs.

After bootup, user switch, and audio server crash reset, the list of
active assistants will be set to an empty list (.i.e no assistant
UID's are currently active).

In the absense of active assistant list, the default behavior will
be that all assistants can listen to hotword as long it does not
conflict with privacy policy. When an assistant state changes
to top (UI present) that assistant will be able to listen to
audio via voice recognition source or hotword.

Bug: 189312611
Test: m -j, and run assistant
Test: atest CtsVoiceInteractionTestCases
Change-Id: I0bfe4c167f69a26293ae2f9f9d0898033f86db03
2022-02-09 11:04:24 -08:00
Eric Laurent
3cd05bc1ac Merge "audio: add Bluetooth LE Audio broadcast device" am: 26d7800efa am: 29a988bf35 am: a2f5911452
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1978307

Change-Id: I4c155442d6b62fbe48f03847c2722eb6d3d580a1
2022-02-09 18:58:36 +00:00
Eric Laurent
a2f5911452 Merge "audio: add Bluetooth LE Audio broadcast device" am: 26d7800efa am: 29a988bf35
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1978307

Change-Id: Ibb27fc945fea99eb24caffe6703168ef611e93d5
2022-02-09 18:41:01 +00:00
Oliver Woodman
6b80927033 Merge "Improve MediaRouter Javadoc" 2022-02-09 17:11:47 +00:00
Kyunglyul Hyun
475bb88df9 Merge "Add missing tests for filtering routes" 2022-02-09 10:57:14 +00:00
Eric Laurent
404141fefd audio: add Bluetooth LE Audio broadcast device
Add audio device type definition for a Bluetooth LE
audio broadcast group.

Bug: 150670922
Test: make.

Change-Id: I8b2c7966ab6d1f3c637a043c4c802b8433ba697b
Merged-In: I8b2c7966ab6d1f3c637a043c4c802b8433ba697b
2022-02-09 10:09:50 +01:00
Kyunglyul Hyun
54a4a1d5e0 Add missing tests for filtering routes
To test package orders, host side tests are added.
AllowedPackages istested as well.

Additionaly, RouteDiscoveryRequest#getRequiredFeatures is removed
as it doesn't seem to be necessary.

Adding tests, some bugs are found and fixed.

Test: atest MediaRouter2HostTest android.media.cts.MediaRouter2Test
MediaRouter2ManagerTest
Bug: 193631822

Change-Id: I315d6e0d648777566404875e300030740a482c81
2022-02-09 15:37:05 +09:00
Kyeongkab.Nam
2dab4ea35b Guard TvInputManager#getClientPriority()
Guard TvInputManager#getClientPriority() by
android.Manifest.permission.TUNER_RESOURCE_ACCESS.

cts test was merged in ag/16577091

CTS-Coverage-Bug: 194149304
Bug: 194149304
Bug: 215546861
Test: run cts -m CtsTvTestCases -t
android.media.tv.cts.TvInputManagerTest

Change-Id: I56a397517d54f806215dd00f9cfff904a55aa159
2022-02-09 05:17:52 +00:00
John Reck
2be791c7de Merge "Add setDataSpace SurfaceControl API" 2022-02-08 21:49:24 +00:00
Hongguang Chen
4e0993c6b6 Merge "Release locks when closing." 2022-02-08 19:43:32 +00:00
Henry Fang
5dbd4b27ed Merge "Guard TIF vendor extension APIs by new permission" 2022-02-08 17:19:28 +00:00
Hongguang
2eebb7dd3f Release locks when closing.
Bug: 218228680
Fix: 218228680
Test: atest android.media.tv.tuner.cts 20 times
Change-Id: I31d6c65d9fb7e512d6dfbc7080214a9a766b38fa
2022-02-07 19:59:33 -08:00
Jacinta Hu
8a40a85202 Fix typo
Change-Id: Iaeda5c91ba1b776cb7e5d208795dcb77247ef1d0
2022-02-08 03:26:48 +00:00
John Reck
ffa81f86ba Add setDataSpace SurfaceControl API
Also change DataSpace from long to int (HAL & native are both ints)

Bug: 217776226
Fixes: 218320444
Test: make && SurfaceControlTest#testSurfaceTransaction_setDataSpace
Change-Id: Ic2b9ccb1d0ba3c1d049839310b4fef0881a3d2e2
2022-02-08 03:05:30 +00:00