Commit Graph

10209 Commits

Author SHA1 Message Date
TreeHugger Robot
311ae73046 Merge "Call route selected/unselected callbacks" into sc-dev am: 9f333ab2c8 am: 18a0a8dade
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14957149

Change-Id: I0a1e41924eb8f87807d1f6ebdd6911a9f313da55
2021-06-15 09:56:05 +00:00
TreeHugger Robot
9f333ab2c8 Merge "Call route selected/unselected callbacks" into sc-dev 2021-06-15 09:25:38 +00:00
Sungsoo Lim
6adeb2c9f1 Call route selected/unselected callbacks
Bug: 168093983
Test: manually
Change-Id: Id48870052f1d3fefb8bdbf1b7ba3636c7138b53d
2021-06-15 16:07:36 +09:00
Treehugger Robot
5ac8db49c5 Merge "Fix inconsistency in ringtone list" am: cfdbf4ef23 am: 1bb0151638 am: f47fc0752a am: eaf16380ef
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652067

Change-Id: I728b933c0b7d4be32e50affac56ebdcc92094e19
2021-06-14 14:14:39 +00:00
Treehugger Robot
eaf16380ef Merge "Fix inconsistency in ringtone list" am: cfdbf4ef23 am: 1bb0151638 am: f47fc0752a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652067

Change-Id: I5535207cedef98f568f5e54166fdb9482b6c8128
2021-06-14 13:53:29 +00:00
akansha.shukla
d9b89825b7 Fix inconsistency in ringtone list
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
2021-06-14 14:45:31 +01:00
Treehugger Robot
f47fc0752a Merge "Fix inconsistency in ringtone list" am: cfdbf4ef23 am: 1bb0151638
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652067

Change-Id: Ia19fde00e6d9d1207111081445ddb8f5f3069ac5
2021-06-14 13:43:28 +00:00
akansha.shukla
1903501380 Fix inconsistency in ringtone list
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
2021-06-14 11:41:45 +00:00
Ahaan Ugale
3fdfdaf765 Merge "Allow HotwordDetectionService access to audioflinger." into sc-dev am: a8a6a45f68 am: 42b7c85907
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14671365

Change-Id: I994da7b38be7af9f58bf07685adb0f60072d4bf8
2021-06-14 05:31:58 +00:00
Ahaan Ugale
f6ca0739f7 Merge "Allow HotwordDetectionService access to audioflinger." into sc-dev am: a8a6a45f68 am: 0925572cfe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14671365

Change-Id: I62a730a1883db89f89c9d75109e4aa45c8ec5789
2021-06-14 05:26:30 +00:00
Ahaan Ugale
a8a6a45f68 Merge "Allow HotwordDetectionService access to audioflinger." into sc-dev 2021-06-14 05:05:08 +00:00
Yuanjia Hsu
0ffbf67ba7 Merge "Exports API to allow RULE_MATCH_UID support both RECORDERS and PLAYERS mix type" into sc-v2-dev am: dafbb266b0 am: 97ad0a10f5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14580818

Change-Id: I1b58f2689c79aeb371b6f6409f7f83cbcf3d4363
2021-06-11 19:43:03 +00:00
Yuanjia Hsu
dafbb266b0 Merge "Exports API to allow RULE_MATCH_UID support both RECORDERS and PLAYERS mix type" into sc-v2-dev 2021-06-11 19:14:08 +00:00
Kyunglyul Hyun
ed546875a7 Merge "Bind provider services when necessary" into sc-dev am: a00481f6a6 am: dd27fede3f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14774944

Change-Id: Iefe06c62af54ab70f336c86917e2edccf3def599
2021-06-08 16:41:37 +00:00
Kyunglyul Hyun
a00481f6a6 Merge "Bind provider services when necessary" into sc-dev 2021-06-08 16:12:15 +00:00
Kyunglyul Hyun
920a676240 Bind provider services when necessary
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
2021-06-08 12:42:54 +00:00
Jeff Sharkey
b42faf3ca0 Merge "Revert "Hide MediaFormat#KEY_SLOW_MOTION_MARKERS"" 2021-06-05 20:23:33 +00:00
Anton Hansson
d641efeb18 Revert "Hide MediaFormat#KEY_SLOW_MOTION_MARKERS"
This reverts commit fc0dd526c9.

Reason for revert: b/190241620
Bug: 190241620

Change-Id: I4f39a6d3e875dd261f24105c5e01033b597d88d3
2021-06-05 20:22:59 +00:00
Hyundo Moon
29dd9f0976 Merge "MediaRouter: Set initial mIsBluetoothA2dpOn value" into sc-dev am: 05186726af am: fb29f15438 am: 74bf08240a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14819336

Change-Id: I281c0bb9de56f9f319f2e761924c817acef86fe1
2021-06-04 11:24:16 +00:00
Marin Shalamanov
79f5d3f4fc Merge "Make AudioManager.getSurroundFormats a TestApi" into sc-dev 2021-06-04 10:49:29 +00:00
Ahaan Ugale
a64d628182 Allow HotwordDetectionService access to audioflinger.
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
2021-06-04 07:20:27 +00:00
Marin Shalamanov
3bec57aa03 Make AudioManager.getSurroundFormats a TestApi
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
2021-06-03 16:45:07 +00:00
Hyundo Moon
2eedc1fe64 MediaRouter: Set initial mIsBluetoothA2dpOn value
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
2021-06-03 20:34:51 +09:00
yuanjiahsu
bb88ce3524 Exports API to allow RULE_MATCH_UID support both RECORDERS and PLAYERS mix type
Removes @hide to export AudioMixingRule#Builder#setTargetMixType(), AudioMix#MIX_TYPE_PLAYERS and AudioMix#MIX_TYPE_RECORDERS.

Bug: 183693610
Test: atest com.google.android.gts.audioservice.AudioServiceHostTest
Change-Id: I8eebfc8c139b0bd3ef277863eb46d2c3383eb65e
2021-06-03 03:36:33 +08:00
Marin Shalamanov
49e778e792 Make AudioManager.getSurroundFormats a TestApi
We need to access this API from a TVTS test.

Bug: 187028404
Test: presubmit
Change-Id: I0122ff2a1f285aa01dc76e332a35798e19a07ac7
2021-06-02 14:29:56 +00:00
Svet Ganov
2eebf92965 Switch media fw permissions checks to AttributionSource
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
2021-06-01 23:43:29 +00:00
Svetoslav Ganov
757486cde6 Merge "Switch media fw permissions checks to AttributionSource" 2021-06-01 21:31:30 +00:00
Svet Ganov
b033da4e3a Switch media fw permissions checks to AttributionSource
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
2021-06-01 15:12:57 +00:00
Kriti Dang
1d4622aea5 Merge "Adding additional javadocs for setSurroundFormatEnabled" into sc-dev am: d7638021ed am: 84c5b3b2cd am: 5bb1f7a7c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14775421

Change-Id: I7434251338b62096eff81c988497ca5267c2a6ee
2021-06-01 11:27:38 +00:00
Kriti Dang
d7638021ed Merge "Adding additional javadocs for setSurroundFormatEnabled" into sc-dev 2021-06-01 10:11:54 +00:00
Kriti Dang
3f296bdcfa Adding additional javadocs for setSurroundFormatEnabled
Bug: 187178381
Test: N/A
Change-Id: Ic59c4d6c85deb57c43624e0f8a3b4cc15f5f9690
2021-05-31 16:38:34 +02:00
TreeHugger Robot
b00cde28f8 Merge "Create a new config for attentional haptics OGG resource" into sc-dev am: c7aa640da3 am: e2f1488247 am: 587cd8f655
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14253109

Change-Id: Icbe0b2719bb4f914448b6dcd0b9c6a3cdfbc5e74
2021-05-25 15:00:27 +00:00
TreeHugger Robot
c7aa640da3 Merge "Create a new config for attentional haptics OGG resource" into sc-dev 2021-05-25 14:32:08 +00:00
Hangyu Kuang
2901fd6dbe Merge "Revert "trancoding: lazy-start transcoding service"" into sc-dev am: 36da5805e5 am: d3b1301478 am: 3773ed4433
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14534458

Change-Id: I3dc4aab649fd5717c5e7f2281325dfea43d6cbb5
2021-05-21 16:55:17 +00:00
Hangyu Kuang
db10bbab08 Revert "trancoding: lazy-start transcoding service"
This reverts commit 0621358a52.

Reason for revert: change to conditional start.

Bug: 187271658
Test: atest MediaTranscodeManagerTest; unit tests
Change-Id: Iba169a3b50e37b72fab4e354480451cf05ab5be5
2021-05-20 20:23:01 +00:00
Ankita Vyas
b231cbc090 Merge "Remove extra article from comment to make it more readable." 2021-05-13 11:15:53 +00:00
“Ankita
1b6e63215c Remove extra article from comment to make it more readable.
Bug: 187396436

Test: N/A (Updating just the comment)

Change-Id: I4a00cbd17a1b2af0c8cc0d66ea8252b1c62f8f44
2021-05-12 04:52:03 +00:00
Andy Hung
f5291fef31 Merge "AudioTrack: 24 channel index masks, compressed formats" am: e477e9686f am: dd8fa96c01 am: fde2ef0250 am: c9300c80f2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702808

Change-Id: Ib64639b8ba98ec7b8f8d387577b6278dbc87cd6c
2021-05-11 22:55:56 +00:00
Andy Hung
c9300c80f2 Merge "AudioTrack: 24 channel index masks, compressed formats" am: e477e9686f am: dd8fa96c01 am: fde2ef0250
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702808

Change-Id: I7b14b0c86e5ac1e089702e6a285bf58174fcd45c
2021-05-11 22:49:13 +00:00
Andy Hung
fde2ef0250 Merge "AudioTrack: 24 channel index masks, compressed formats" am: e477e9686f am: dd8fa96c01
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702808

Change-Id: I35427c5ce3826841b1a0d313ba2488e2bc03fb3b
2021-05-11 22:25:26 +00:00
Andy Hung
d3ceb62024 AudioTrack: 24 channel index masks, compressed formats
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
2021-05-11 11:01:22 -07:00
Kriti Dang
8090b07354 Merge "Removing the list of formats from the javadoc in setSurroundFormatEnabled" into sc-dev am: e5489584ef
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14487421

Change-Id: If1c45ed258af128f44995e8bb6dea354c340d98e
2021-05-11 08:26:38 +00:00
Kriti Dang
e5489584ef Merge "Removing the list of formats from the javadoc in setSurroundFormatEnabled" into sc-dev 2021-05-11 07:52:39 +00:00
TreeHugger Robot
2fb05215ae Merge "Modify error codes and improve descriptions" into sc-dev am: 38e5def5ce
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14491499

Change-Id: Ie8e2037453ea02c0d2fd06c8d19185b9fddd66eb
2021-05-11 04:28:42 +00:00
shubang
5afdd12cfe Modify error codes and improve descriptions
Bug: 167036690
Test: atest MediaMetricsAtomTests
Change-Id: Ib34f402d29043cdda839340e23e26a40e82e57f2
2021-05-10 19:10:35 -07:00
Andy Hung
9120054c96 Merge "AudioFormat: Retrieve sample rate capability from framework" am: ba32f57428 am: 89ce768aa1 am: 4a47417302 am: ce18518dca
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1700287

Change-Id: Ia59de79b9e6731df0150d9ee4b56a834ce75851f
2021-05-10 21:03:28 +00:00
Andy Hung
ce18518dca Merge "AudioFormat: Retrieve sample rate capability from framework" am: ba32f57428 am: 89ce768aa1 am: 4a47417302
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1700287

Change-Id: I7cc3432c9457ef2d046fa8552e7bf7aca4e4e8d8
2021-05-10 20:34:47 +00:00
Andy Hung
4a47417302 Merge "AudioFormat: Retrieve sample rate capability from framework" am: ba32f57428 am: 89ce768aa1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1700287

Change-Id: I137ad2c9e8b3f360037f312773ea8d31d8ba4bfa
2021-05-10 20:15:24 +00:00
Jay Patel
f60a3dffb7 Merge "AudioSystem: update framework channel capabilities" am: 249034de9d am: 67143814c2 am: 4245889bbd am: 3d46ae52dc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1317754

Change-Id: Ibccd9216d2070f143faba1eeae6cc2a18e7ab798
2021-05-10 18:58:51 +00:00
Jay Patel
3d46ae52dc Merge "AudioSystem: update framework channel capabilities" am: 249034de9d am: 67143814c2 am: 4245889bbd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1317754

Change-Id: I30f6dd9c16b1168bf263f94498a3993a4bfe7b45
2021-05-10 18:44:23 +00:00