Sometimes when ringtone from external storage gets same _id as any ringtone of internal volume, getRingtonePosition(..) matches with the internal one firstly, and the ringtone shown is wrong.
Solution is to match the URI of ringtone instead of the _ID so that correct ringtone is chosen.
Bug: 172878342
Change-Id: I8fc3e936fe89308d4697eda42088e4fd533ce47c
Merged-In: I8fc3e936fe89308d4697eda42088e4fd533ce47c
Sometimes when ringtone from external storage gets same _id as any ringtone of internal volume, getRingtonePosition(..) matches with the internal one firstly, and the ringtone shown is wrong.
Solution is to match the URI of ringtone instead of the _ID so that correct ringtone is chosen.
Bug: 172878342
Change-Id: I8fc3e936fe89308d4697eda42088e4fd533ce47c
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
HotwordDetectionService is an isolated service which ordinarily cannot
access audioflinger due to selinux restrictions on isolated processes.
To bypass those restrictions, the audioflinger binder is passed from
the system server to the HotwordDetectionService. This follows the
existing pattern of providing access to the ContentCapture service.
In T we *may* instead solve this at the selinux layer. For now, this
simpler approach is used.
Bug: 190011174
Test: manual - sample app can read audio (with a few other wip changes)
Test: atest CtsVoiceInteractionTestCases
Change-Id: I5493a5c3addf68f2ae80d64b6971a8576484eb8e
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
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
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