Commit Graph

8824 Commits

Author SHA1 Message Date
Amy Zhang
aaa8e866d3 Merge "Complete the Cas System request/release/update implementation in TRM" into rvc-dev 2020-04-21 18:56:39 +00:00
Eric Laurent
81b99eda9b Merge "AudioManager: fix event handler" into rvc-dev 2020-04-21 16:07:15 +00:00
Kyunglyul Hyun
e66ac51ea3 Merge "Use session hints when create a session from MR2Manager" into rvc-dev 2020-04-21 11:17:38 +00:00
Kyunglyul Hyun
350d7b427e Clear routes when media router manager has no callback
This CL clears routes when the last callback of MediaRouter2Manager
is unregistered. By doing this, we can ensure
MediaRouter2Manager#getAvailableRoutes() returns correct routes
during at least a single callback is registered.

A test for the behavior is added as well.

This CL also fixed a bug that unregistering a callback from MediaRouter2
disconnects it when multiple callback is used.

Bug: 153515567
Test: atest mediaroutertest & cts test & manually
 using MediaRouter2Demo and Sample OutputSwitcher to see
 if forgotten BT device is correctly removed.
 (w/o this CL forgotten BT device remains)
Change-Id: I31a5001115f1f163c8971bbd906516551b860252
2020-04-21 14:58:31 +09:00
Kyunglyul Hyun
f0eb51bc40 Use session hints when create a session from MR2Manager
When MR2Manager requests to create a routing session, it should pass
session hints to the target provider.
This CL adds a logic that MR2Manager asks media router instance to
get session hints to be passed to the provider.

Bug: 152851868
Test: atest mediaroutertest
Change-Id: Ib421f61f663090c6ed95c8b1a2f7deeb80e5be16
2020-04-21 14:17:08 +09:00
Eric Laurent
f3a10cd244 AudioManager: fix event handler
Fix access by reference to listener list outside of
synchronized block by cloning the list.

Bug: 154341343
Test: AudioPolicyTest#testAudioPorts, AudioManagerTest#testVolumeGroupCallback, AudioRoutingTest
Change-Id: I1f0fd62c1894dc0dbb07b01f2fd78899e48b4932
2020-04-21 01:17:12 +00:00
TreeHugger Robot
7c33cc554d Merge "Make some minor improvements to MediaFormat" into rvc-dev 2020-04-20 19:37:26 +00:00
Santiago Seifert
2a747f8d53 Make some minor improvements to MediaFormat
Test: atest CtsMediaTestCases:MediaExtractorTest
Test: atest CtsMediaParserTestCases
Bug: 154524134
Change-Id: Ie1d42b200f13a2ce5292c5a06ee979e8d74bbe43
2020-04-20 19:37:07 +00:00
Andrei Litvin
3b92b9682d Add support for GamePad api in ITvRemoteServiceInput.
Gamepad-specific API is a separtate input path from standard "remote"
service. Specifically it adds:
  - openGamepad that creates a virtual input device with
  gamepad-specific suport
  - send gamepad keys
  - send gamepad axis updates, which support joysticks, analog triggers
  and HAT axis (as an alternative to DPAD buttons).

Bug: 150764186

Test: atest media/lib/tvremote/tests/src/com/android/media/tv/remoteprovider/TvRemoteProviderTest.java

Test: flashed a ADT-3 device after the changes. Android TV Remote
      on my phone still worked in controlling the UI.

Merged-In: I49612fce5e74c4e00ca60c715c6c72954e73b7a3
Change-Id: I49612fce5e74c4e00ca60c715c6c72954e73b7a3
(cherry picked from commit 9b9f556af1)
2020-04-20 10:42:58 -04:00
shubang
40454dbdcb Tuner JNI: descrambler
And minor filter changes

Bug: 139308734
Test: mmm
Change-Id: Ibf4ac61476690438f86a93142547f7c80d1375d6
2020-04-17 21:23:06 -07:00
Amy Zhang
e1e65f18c0 Complete the Cas System request/release/update implementation in TRM
Test: atest
Bug: 154076250
Change-Id: Ifaf80a3e91807e1b47e780d2b5fd699412e1e7cc
2020-04-18 01:19:34 +00:00
Amy Zhang
8b28b4b058 Merge "Add client Id as the parameter of all the release resources APIs in TRM" into rvc-dev 2020-04-17 03:31:43 +00:00
Amy Zhang
2e5801340c Add client Id as the parameter of all the release resources APIs in TRM
Test: atest com.android.server.tv.tunerresourcemanager
Bug: 150952662
Change-Id: I7a028dfde8d93148f3a4c0dd1a607533f8a7b1a7
2020-04-16 17:32:59 -07:00
Amy Zhang
21095a62eb Merge "Complete Lnb update/request/release implementation in TRM" into rvc-dev 2020-04-16 23:26:50 +00:00
TreeHugger Robot
13646bb12e Merge changes from topic "tuner_cts_scanning" into rvc-dev
* changes:
  Complete Frontend release implementation in TRM
  Tuner FW: handle release frontend
2020-04-16 23:15:06 +00:00
Amy Zhang
492f8bae66 Complete Lnb update/request/release implementation in TRM
Test: atest
Bug: 150952662
Change-Id: I14b1e0ef291159ab9da3ed1e4a056317c44467a8
2020-04-15 21:48:12 -07:00
shubang
2f9cab383b Tuner FW: handle release frontend
This can unblock tune/scan CTS test cases.
If a frontend resource is acquired in a test case and not released,
it cannot be used by another test case.

Bug: 150952758
Test: atest android.media.tv.tuner.cts.TunerTest
Change-Id: Ib9bab003fc81fe008091a9d1aaefc43e454c3230
2020-04-15 21:47:29 -07:00
Hyundo Moon
f4314e3ae9 Merge "Prevent MediaRoute2ProviderService#onReleaseSession() from being called twice" into rvc-dev 2020-04-15 06:19:58 +00:00
Hyundo Moon
d274976b8c Prevent MediaRoute2ProviderService#onReleaseSession() from being called twice
Bug: 153934282
Test: Checked the logs that the method is called only once
      Also ran CTS / atest mediaroutertest
Change-Id: I0c27ecd5b1c83be241fcebe71a7e0ea9f1c9e349
2020-04-14 22:22:16 +09:00
TreeHugger Robot
35f960dff4 Merge "Add Multi Audio focus" into rvc-dev 2020-04-14 06:29:16 +00:00
Jin Seok Park
78552a888a Merge "Ensure thread-safety of SimpleDateFormat" into rvc-dev 2020-04-14 02:28:03 +00:00
Phil Burk
05f0262840 Merge "MIDI: check range of port counts" into rvc-dev 2020-04-14 01:13:20 +00:00
TreeHugger Robot
92b1b302a9 Merge "Fix tuner JNI breakage due to recent changes" into rvc-dev 2020-04-10 18:27:48 +00:00
Jin Seok Park
5ef6b0d6e0 Ensure thread-safety of SimpleDateFormat
Since ExifInterface supports multi-thread, SimpleDateFormat
should be thread-safe.

Bug: 152801859
Test: N/A
Change-Id: I9ad5a035162f5e3caff2a2d4aaff2ae0cd870cd2
2020-04-10 19:45:58 +09:00
Phil Burk
d19e2f6e6c MIDI: check range of port counts
Fuzz testing cause out-of-memory errors
when passing very large port counts.
Now we check to make sure the port count is in a resonable range.

Bug: 135639926
Test: any MIDI test will exercise this code
Test: https://source.android.com/devices/audio/midi_test.html
Change-Id: Ic5dedc1eda86ff86a73a1da66ee6630c9662ceb8
2020-04-09 09:34:12 -07:00
Andy Hung
58b896a4ff MediaMetrics: Add typed property keys
This enforces proper type usage.

Test: use test keys, check the dumpsys
Bug: 149850236
Change-Id: Ia24a12b93bb77aa5bd104842ed8c3406f4b4a7e5
2020-04-07 09:55:26 -07:00
shubang
66cc3aa800 Fix tuner JNI breakage due to recent changes
Bug: 150952758
Test: atest android.media.tv.tuner.cts.TunerTest
Change-Id: I639c82dc6f18e4fd8234809bd9beec5e61e06868
2020-04-06 22:40:04 -07:00
François Gaffie
d83e946d53 AudioSystem: add annotation on API used by CTS media
Add @TestApi for the class so some methods and
constants can be visible to test API.
  Also @hide for all other members of the class
that are not @TestApi, as they are exposed to the
test API visibility.

Bug: 136121584
Test: run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioProductStrategyTest
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioVolumeGroupTest
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioVolumeGroupChangeHandlerTest
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testPermissionsForVolumePerAttributes
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testGetAndValidateProductStrategies
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testGetAndValidateVolumeGroups
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testSetGetVolumePerAttributesWithInvalidAttributes
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testSetGetVolumePerAttributes
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testVolumeGroupCallback
Signed-off-by: François Gaffie <francois.gaffie@renault.com>

Change-Id: Iff9abda2cf971d9c234dcf7df7c2b9a4ad5294c3
2020-04-06 15:04:22 -07:00
shubang
0dc8394e31 Tuner API: set Frontend and Lnb info to TRM
Bug: 139308734
Test: mmm
Change-Id: I17e198e150b453fec6440264c15b10abc2856a11
2020-04-06 18:36:25 +00:00
hjin81.lee
4e984e5503 Add Multi Audio focus
Allows the multiple audio focus that requested with AUDIOFOCUS_GAIN.

Test: atest SettingsProviderTest
Test: Manual - play music on A app
Test: play music on B app    // play music on A app and B app
Test: receive a call         // stop music
Test: end a call             // play music on A app and B app
Test: receive a notification // ducking all music

Bug: b/135749683
Change-Id: I4bdd2cdc5e543674f331fc000bd24fd30499bdc3
2020-04-06 15:33:34 +00:00
TreeHugger Robot
d0e4132654 Merge "Tuner JNI: LnbCallback" into rvc-dev 2020-04-06 07:07:35 +00:00
Henry Fang
bc93009274 Merge "Add test api for CTS to test resource lost event" into rvc-dev 2020-04-03 20:09:19 +00:00
TreeHugger Robot
8885e4f115 Merge "[wm] VirtualDisplayConfig to mirror the non-default display" into rvc-dev 2020-04-03 18:59:27 +00:00
shubang
d295be0576 Tuner JNI: LnbCallback
and demux.setFrontendDataSource

Bug: 139308734
Test: mmm
Change-Id: I99e0c8536884815e8b9b0f778a378bb69a5f9540
2020-04-03 17:57:24 +00:00
Henry Fang
1eef1d2f26 Add test api for CTS to test resource lost event
bug: 152343262
Test: Manual
Change-Id: I5660cea3e57771c8a09f57ed88723064bb592c30
2020-04-03 17:39:13 +00:00
TreeHugger Robot
e9ffff37d4 Merge "AudioManager: set/get audio device volume behavior" into rvc-dev 2020-04-03 16:27:14 +00:00
TreeHugger Robot
69bbfca9c2 Merge "Tuner JNI: getFrontendInfo" into rvc-dev 2020-04-02 21:24:00 +00:00
Jean-Michel Trivi
005c6015db AudioManager: set/get audio device volume behavior
Add support for setting and querying the volume behavior of
an audio device.
When setting the behavior, udpate the current volume on that
device.

Bug: 152755063
Test: atest AudioServiceTest
Change-Id: I024317e50baf159e031b57c805d7b389ed470e62
2020-04-02 07:53:29 -07:00
Hyundo Moon
dbbb846b8c Merge "RouteDiscoveryPreference: Filter out null/empty values" into rvc-dev 2020-04-02 07:15:18 +00:00
Kyunglyul Hyun
bd67f0ad34 Merge "Call MediaRouter2Manager#onTransferred" into rvc-dev 2020-04-02 04:36:33 +00:00
Ytai Ben-Tsvi
48f90c22e5 Change external capture state notification mechanism
Previously, external capture state notifications were delivered from
the audio policy manager to the sound trigger service as normal
"forward calls". However this creates a cyclic dependency between
sound trigger and APM, which is especially problematic during startup,
when the audio server is assumed to start prior to the system server
and thus cannot block on the sound trigger service becoming available.

With this change, the sound trigger service would register a callback
with APM for these notifications.

A small refactoring was needed in order to keep the internal interface
of sound trigger classes having the setExternalCapture() methods,
while removing them from the external interface.

Test: Manual verification, checking the logs, validating behavior in
      response to killing the audioserver process.
Bug: 146157104
Merged-In: I4b4467fbac3607ee170394dc1b3309e7e3d422d8
Change-Id: Ibf68a5e5681afca9c5b1b821bb8ac18a2eebb4ca
2020-04-01 10:00:14 -07:00
b0202.jung
925435c18d [wm] VirtualDisplayConfig to mirror the non-default display
The application can request to mirror default display by using MediaProjection.
However, there is no way to mirror the specific display on multi-display enviroment.

Now, the application can set displayIdToMirror through VirtualDisplayConfig class.

Test: atest FrameworksServicesTests:DisplayManagerServiceTest
Bug : 127687569

Change-Id: I1ef94bfa79e103d0a4a05a10fc8705ed3bbcc0c9
2020-04-01 08:50:18 -07:00
Kyunglyul Hyun
f064dcae8e Call MediaRouter2Manager#onTransferred
Call MediaRouter2Manager#onTransferred to notify
whether transfer is succeeded or failed.

Bug: 151396145
Test: atest mediaroutertest
Change-Id: I4331c80d03c61b5a722a8be404c979d3fcfa23f1
2020-04-01 22:38:06 +09:00
Hyundo Moon
6d05ce4242 RouteDiscoveryPreference: Filter out null/empty values
Bug: 152851867
Test: atest mediaroutertest and ran CTS
Change-Id: I9880a756082cd2522fecbc000cea9ed98ee9d175
2020-04-01 19:40:28 +09:00
TreeHugger Robot
d9f9a8d70f Merge "Tuner JNI: Dvr and DvrCallback" into rvc-dev 2020-04-01 00:02:48 +00:00
shubang
b83f823a1f Tuner JNI: getFrontendInfo
Bug: 139308734
Test: mmm;
Change-Id: I51256798ca8dd1a67d1c53a8839610289dd2e207
2020-03-31 17:57:54 +00:00
shubang
431e561fda Tuner JNI: Dvr and DvrCallback
Bug: 139308734
Test: mmm
Change-Id: I2ea2d2e8b8309a70f9aa3dfeb6a3025c7e515afd
2020-03-30 21:27:52 -07:00
Kohsuke Yatoh
ed4e8c3fab Allow DEFAULT_INPUT_METHOD to capture audio during RTT call
Add content observer for Settings.Secure.DEFAULT_INPUT_METHOD,
which contains package name of current InputMethodService.

Bug: 147037345
Test: use voice input with Gboard 9.1.4 during a simulated RTT call.
Change-Id: I11e17b13513627c88ccb8e4db66c5359e9ee7f7b
2020-03-30 21:47:07 +00:00
TreeHugger Robot
cbf33802f8 Merge "Have Telecom service notify AudioService of RTT call state." into rvc-dev 2020-03-28 02:29:30 +00:00
Nicholas Ambur
95ee3d7ad5 Merge "remove SoundTrigger public member variables" into rvc-dev 2020-03-27 20:54:22 +00:00