The media router service bound media route provider
services only when there was a discovery request.
This prevented output switcher to work when there are only
legacy media router clients (i.e. apps that didn't enable MR2)
This CL makes the media router service binds media route provider
services when the MediaRouter2Manager#startScan is called
so that the output switcher can show cast sessions created by
the providers.
This CL also changes communication between the media router service and
the provider services as cast sessions can be created/released even when the
media router service is disconnected from media route provider.
Bug: 176774510
Test: manually
Change-Id: I481e1aa8f9dcc136cbf5788b9f66540708665af2
We need to access this API from a TVTS test.
Bug: 187028404
Test: locally run
m tvts && tvts-tradefed run commandAndExit \
tvts-all -m TvtsHdmiHostTestCases
Change-Id: I0122ff2a1f285aa01dc76e332a35798e19a07ac7
Merged-In: I0122ff2a1f285aa01dc76e332a35798e19a07ac7
When BT is connected before MediaRouter is initialized,
the mIsBluetoothA2dpOn is not set as true.
Since the value is false, the 'currentSystemRoute' variable in
MediaRouter.selectRouteStatic() is always default route.
This leads to skip selectRoute(defaultRoute) which is called by apps.
The value is always false and not renewed, until audio routes changed.
This results apps cannot make sounds through phone speaker.
The CL fixes the issue by correctly assigning the value when MediaRouter
is initialized.
Bug: 189176702
Test: GMM can make sound via phone speaker.
Change-Id: I4a83f9441a8b3165b7dd668aeef12c25fe3817c0
Attribution source is the abstraction to capture the data
flows for private data across apps. Checking permissions
for an attribution source does this for all apps in the
chain that would receive the data as well as the relevant
app ops are checked/noted/started as needed.
Teach speech recognition service about attribution
chains. If an implementation does nothing the OS
would enforce permisisons and do blame as always.
This apporach leads to double blaming and doesn't
support attribition chains where app calls into
the default recognizer which calls into the on
device recognizer (this nests recursively). If the
implementer takes advantage of the attribution chain
mechanims the permissions for the entire chain are
checked at mic access time and all apps are blamed
only once.
Fixed a few bugs around finishing ops for attribution
chains. Also ensured that any app death in a started
attribution chain would lead to finishing the op for
this app
bug: 158792096
Test: (added tests for speech reco)
atest CtsMediaTestCases
atest CtsPermissionTestCases
atest CtsPermission2TestCases
atest CtsPermission3TestCases
atest CtsPermission4TestCases
atest CtsPermission5TestCases
atest CtsAppOpsTestCases
atest CtsAppOps2TestCases
Merged-In: Ic92c7adc14bd2d135ac13b96f17a1b393dd562e4
Change-Id: Ic92c7adc14bd2d135ac13b96f17a1b393dd562e4
This reverts commit 0621358a52.
Reason for revert: change to conditional start.
Bug: 187271658
Test: atest MediaTranscodeManagerTest; unit tests
Change-Id: Iba169a3b50e37b72fab4e354480451cf05ab5be5
PCM channel count is limited to AudioSystem.CHANNEL_OUT_MAX.
Compressed channel count is limited to AudioSystem.FCC_24
as typically the data rate is smaller than the equivalent
PCM channel count stream.
Test: atest AudioTrackTest
Test: atest AudioTrackTest#testImmersiveStreaming
Test: atest AudioTrackTest#testImmersiveChannelIndex
Bug: 187062102
Change-Id: I96b2e37c9b59c9e38a0caf69e19c280949c4d099
Allows a device to specify a higher sample rate (e.g. 384kHz)
and have it acknowledged by CTS.
Test: AudioTrackTest#testGetMinBufferSizeTooHighSR
Bug: 135474352
Bug: 187062102
Change-Id: I2a44590970b437c1090c615961432afce974f2ba
Anticipate more than 8 channels (such as 7.1.4) on
future devices, but keep at 8 for now.
Test: atest AudioTrackTest#testImmersiveStreaming
Test: same test by manually adjusting to 24 channels.
Bug: 127896072
Bug: 187062102
Change-Id: I72c2ff0faa7794f22deaeb794920afb65788f40b
Also print a log when restore route to default while a bluetooth
route is avaialble.
Bug: 176386259
Test: build
Change-Id: I4a974438040595597fbf4dcb0ec57d49351540ef
Get multiple audio/video codec profiles from MediaProfiles object
instead of just wrapping the old CamcorderProfiles objects.
Bug: 171673898
Test: atest CamcorderProfileTest
Change-Id: If56ac6c2a89992361f0491d8175af1f89dffd3d0
Given that system usages were added to the AudioAttributes, system
components need to use the API were applicable. AudioMixingRule was
missing this and thus the audio attribute usage base routing did not
work correctly. In particular the registration of the audio policy mixing
rules would not register the system usages based routing correctly.
Instead, the match usage rule would default to unknown usage instead of
the requested system usage.
Bug: 186661937
Bug: 186442942
Bug: 186158497
Test: build gcar_emu_x86 and run car kitchen sink to make sure routing
performed as expected.
Change-Id: I4aaedf1b6b9144bd2e84d2d7112b5ebcf744a8b2
China DTMB digital TV.
See SJ/T11368-2006
“Specification for multichannel digital audio coding technology”.
Test: atest AudioFormatTest
Bug: 185950819
Merged-In: Id6078e65941020a73f8a43017f480574c2a78999
Change-Id: Id6078e65941020a73f8a43017f480574c2a78999
The test failed for several reasons:
- When other real cast device is present, tests are run before actual
routes arrive.
- Screen is not turned on during test.
- Test lacks MEDIA_CONTENT_CONTROL permission.
This CL fixes the test.
Bug: 186190171
Test: atest com.android.mediaroutertest.MediaRouter2ManagerTest \
--rerun-until-failure
Change-Id: I6f86ae7cba25871ffb7c8ee96f4c8db6bd86b816
Create a new hidden config with the URI of a OGG file that has only the
haptics channels and can be played for attentional haptics when sound is
muted (ringtone, notifications, alarms).
First usage introduced is to the Telecom project to be played on
RINGER_MODE_VIBRATE.
Also update Ringtone class to allow playback of haptic-only ringtones
(i.e. ringtones with unmutted haptic channels and volume set to zero on
devices with audio-coupled haptics support).
Bug: 182157749
Test: manual
Change-Id: Ic64d8d56c6b029e32b3d55389c416cee7679ddc8
Playing status of audio source is checked using the native handler
not 0.
However, if AudioSystem#startAudioSource fails, the native handler
returned is not 0, but an error code.
In fact AudioPolicyManager sets the PORT to NONE (0) and sets an error
status.
JNI layer transforms the failure status into a native handler returned
to the caller.
Signed-off-by: Francois Gaffie <francois.gaffie@renault.com>
Change-Id: Iaa920c073885c2556a93a1b5ae23467fa6ffad4f
Merged-In: Iaa920c073885c2556a93a1b5ae23467fa6ffad4f