Commit Graph

10959 Commits

Author SHA1 Message Date
Etienne Ruffieux
f54c03715a Merge "Replacing BluetoothCodecStatus creator by Builder" am: 471a91657a am: bfbeff0524 am: 76678041a0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2013036

Change-Id: I7330fca5e4ed87bea7c360ed972cc6df6d0a39d5
2022-03-09 11:43:28 +00:00
Oliver Woodman
cd135cf0e1 Merge "System Router: Don't filter by individual prefs" into tm-dev 2022-03-09 10:55:24 +00:00
Etienne Ruffieux
471a91657a Merge "Replacing BluetoothCodecStatus creator by Builder" 2022-03-09 10:24:16 +00:00
Oliver Woodman
bd4b726f3d System Router: Don't filter by individual prefs
Individual discovery preferences are not supposed to be
applied for system router instances. There was a bug in
ag/17071600 that caused them to be applied incorrectly.

Test: atest SystemMediaRouter2Test
Bug: 223378315
Change-Id: I778530ed0e7611c8c9433aa20cf0e0bbc4d2cc61
2022-03-09 00:59:48 +00:00
Shubang Lu
4cd780f32a Merge "TIAF API review: add JavaDoc" into tm-dev 2022-03-08 23:27:09 +00:00
Etienne Ruffieux
2c5180a627 Replacing BluetoothCodecStatus creator by Builder
Bug: 222540543
Tag: #feature
Test: atest BluetoothCodecsTest
Change-Id: I7483b96079b6e2b1708a7999df91850b2ed9f068
2022-03-08 13:33:14 +00:00
shubang
ba451f6c63 TIAF API review: add JavaDoc
Bug: 218518120
Test: mmm
Change-Id: Id67c9b1f6a6f0566c6c367e3a94a2e8080c31152
2022-03-08 02:40:55 -08: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
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
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
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
Xin Li
5ad6db7742 Merge sc-v2-dev-plus-aosp-without-vendor@8084891
Bug: 214455710
Merged-In: I8cfa435bb6233818adb9cc99dadeeb06a03443d5
Change-Id: Ib93992d88fd1704179009a3872798b9e7b83a6d1
2022-02-11 07:25:43 +00: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