Commit Graph

8786 Commits

Author SHA1 Message Date
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
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
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
Kohsuke Yatoh
900e1f11eb Have Telecom service notify AudioService of RTT call state.
Add AudioManager#setRttEnabled() so that Telecom service can call it
when RTT call state has changed.

Bug: 147037345
Test: Force installed Gboard 8.3.6 and verified voice typing works in
  simulated RTT call and simulated RTT upgrade call.
Change-Id: I1ea3dccdfed145e55b1b1cd516b40a33ac7984d9
2020-03-27 10:19:09 -07:00
TreeHugger Robot
6ae19bbdc2 Merge "Differentiate the default route with the device route" into rvc-dev 2020-03-27 15:50:55 +00:00
Jean-Michel Trivi
5897ede327 Merge "Address Audio Java API feedback" into rvc-dev 2020-03-27 14:58:53 +00:00
Sungsoo Lim
ddf140da12 Differentiate the default route with the device route
Default route denotes the route that will be selected by
SystemMediaRoute2Provider by default. While the device route denotes the
route that is currenctly active among the phone speaker and wired headsets.

Also, some variables and methods are renamed for readability.

Bug: 149796428
Test: pass MR2 tests
Change-Id: I9133bb106ce6b509147e5f837cc30f229a762088
2020-03-27 15:08:32 +09:00
Andy Hung
120c1c4db7 Address Audio Java API feedback
Test: atest AudioTrackTest#testCodecFormatChangedListener
Test: atest AudioTrackTest#testTunerConfiguration
Test: atest AudioMetadataTest
Test: atest EnumDevicesTest
Bug: 152348569
Change-Id: I1c702781f6d3189b98c6b91a14f084333ce16848
2020-03-26 17:11:47 -07:00
Nicholas Ambur
1e43767f10 remove SoundTrigger public member variables
Bug: 150127026
Test: boot and verify soundtrigger hotword is functional

Change-Id: I04061cdb3eba02aac0f08de96f957e2b74c70a12
2020-03-26 19:44:31 +00:00
Eric Laurent
e9e26309fd AudioProductStrategy: fix attributesMatches()
Use AudioAttributes.getSystemUsage() instead of getUsage()
when comparing attributes as getUsage() defaults to UNKNOWN for
system usages and causes a false match.

Bug: 136121584
Test: build & run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioProductStrategyTest
Change-Id: I377e840b18443c33fb0b562b27fbc706aaeb8055
2020-03-26 19:24:16 +00:00
TreeHugger Robot
6414fb0655 Merge "Tracking legacy remote submix active or not in RecordingActivityMonitor." into rvc-dev 2020-03-25 21:49:32 +00:00
jiabin
9bad0e947f Tracking legacy remote submix active or not in RecordingActivityMonitor.
When enabling Live Caption, remote submix device will be set as fixed
and full volume device in audio service. In that case, volume control
for remote submix will not be forwarded anymore. However, it is expected
to have volume control when the device is on chromecast mirror mode.
To solve the problem, tracking legacy remote submix device is active or
not in RecordingActivityMonitor. When legacy remote submix device is
active, remote submix will not be treated as fixed/full volume device.
In audio policy manager, the remote submix that is used by dynamic
policy will still be fixed volume device.

Bug: 144063329
Test: repo steps in bug
Change-Id: I1cb83c17f34e636763bb989e37ac8e021217cc39
Merged-In: I1cb83c17f34e636763bb989e37ac8e021217cc39
2020-03-25 17:04:49 +00:00
TreeHugger Robot
968b1066e5 Merge "MediaCodec: LinearBlock API for optional crypto" into rvc-dev 2020-03-25 01:10:27 +00:00
Jean-Michel Trivi
5523d8ee4e Merge "setWiredDeviceConnectionState requires MODIFY_AUDIO_ROUTING" into rvc-dev 2020-03-24 23:44:43 +00:00
Jean-Michel Trivi
6abd17edc8 MediaCodec: LinearBlock API for optional crypto
Split setter for LinearBlock in QueueRequest between:
- setLinearBlock for unencrypted streams
- setEncryptedLinearBlock with non-null crypto info

Bug: 149487982
Test: atest CtsMediaTestCases -- --module-arg CtsMediaTestCases:size:small
Change-Id: I7d147b3963febeb431b268262343c782f2c1e3e9
2020-03-24 15:22:01 -07:00
Jean-Michel Trivi
f049197e3c setWiredDeviceConnectionState requires MODIFY_AUDIO_ROUTING
AudioService: make setWiredDeviceConnectionState enforce the
privileged MODIFY_AUDIO_ROUTING permission

Bug: 151240738
Test: verify plug/unplug headset is WAI
Change-Id: Icde5c2fdfa970baf596d00f808dca8300be8743f
2020-03-24 09:20:50 -07:00
shubang
a06cfe55d6 Tuner JNI: filter impl
Bug: 139308734
Test: make;
Change-Id: Ide7ba5316537152e410f739af884f97f173a4b7c
2020-03-23 19:31:21 -07:00
TreeHugger Robot
9332d217af Merge "MediaRouter: Rename methods in TransferCallback" into rvc-dev 2020-03-21 03:37:02 +00:00
TreeHugger Robot
ae5b29f609 Merge "MediaRouter: Add features to distinguish audio routes" into rvc-dev 2020-03-21 01:01:53 +00:00
TreeHugger Robot
100012bd1c Merge "replace @see with @link to fix java doc error." into rvc-dev 2020-03-20 22:16:36 +00:00
Andy Hung
8bd3d10127 Merge "AudioTrack: Update Tuner API" into rvc-dev 2020-03-20 19:50:28 +00:00
Henry Fang
709c0a9cec replace @see with @link to fix java doc error.
bug: 151966188
Test: Manual
Change-Id: I23edf4851a9eb472104068410a406a0301b43e5c
2020-03-20 11:59:38 -07:00
Kyunglyul Hyun
c19b3cc14a MediaRouter: Add features to distinguish audio routes
This CL adds more route features to give
media apps more information.
It also clarifies the values of pre defined route features.

Bug: 152024707
Test: cts test and mediaroutertest

Change-Id: Ia89b45191c4f3fe23210aaca7f336637725fe3b3
2020-03-21 03:04:26 +09:00
Andy Hung
7d77d7ea8f AudioTrack: Update Tuner API
Move Tuner specific methods to SystemApi
to match Tuner Api visibility.

Update return value annotation on getters.

Test: AudioTrackTest#testTunerConfiguration
Bug: 151178170
Change-Id: I5461d62db38cd912b5896b9c27fd1fef29306bae
2020-03-20 10:26:59 -07:00
Kyunglyul Hyun
f4552af502 MediaRouter: Rename methods in TransferCallback
Bug: 151455138
Test: cts test and atest mediaroutertest
Change-Id: I2bfc5c6c4ac6730d1a7162cd9516092ec64d16e7
2020-03-20 23:25:11 +09:00
TreeHugger Robot
6e72e16da1 Merge "Tuner API: cleanup. Resolve TODOs." into rvc-dev 2020-03-20 07:18:37 +00:00
Jin Seok Park
02e59dd951 Merge "[Media ML] Add get/setSessionPolicies APIs" into rvc-dev 2020-03-20 04:44:09 +00:00
TreeHugger Robot
3fe090f737 Merge "Cleanup Frontend Status" into rvc-dev 2020-03-20 02:44:35 +00:00
shubang
f159a8346b Tuner API: cleanup. Resolve TODOs.
Bug: 139308734
Test: mmm;
Change-Id: I124010e7d042e4ebcca645cb0407c153bca8e32b
2020-03-19 19:43:57 -07:00
TreeHugger Robot
c914081e62 Merge "Fix permission check log in TRM Fix npe in Tuner init" into rvc-dev 2020-03-20 01:05:05 +00:00