Commit Graph

10189 Commits

Author SHA1 Message Date
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
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
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
Jay Patel
4245889bbd Merge "AudioSystem: update framework channel capabilities" am: 249034de9d am: 67143814c2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1317754

Change-Id: Icb4bc0bd4382c6a0a7d330624bc371d009efc1c6
2021-05-10 18:08:04 +00:00
Andy Hung
4afe15ccb0 AudioFormat: Retrieve sample rate capability from framework
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
2021-05-10 16:22:59 +00:00
Kriti Dang
1985c45742 Removing the list of formats from the javadoc in setSurroundFormatEnabled
The IntDef in param automatically adds the javadoc.

Bug: 187701166
Test: N/A
Change-Id: I2fba353e98d543e8b5d1d66e4cc599e57e3a7f4d
2021-05-10 17:06:44 +02:00
TreeHugger Robot
aacd099aca Merge "Fixed AudioMixingRule usage of AudioAttribute#getUsage" into sc-dev am: 3582d5cb2d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14342205

Change-Id: Ia421bd4439b8c54260b6769f31832e45b7931778
2021-05-07 20:29:20 +00:00
TreeHugger Robot
3582d5cb2d Merge "Fixed AudioMixingRule usage of AudioAttribute#getUsage" into sc-dev 2021-05-07 20:06:35 +00:00
Zhangrui Zhang
cee3c552b8 AudioSystem: update framework channel capabilities
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
2021-05-07 13:06:18 -07:00
Lajos Molnar
ae50a224c0 Merge "media: propagate profiles to EncoderProfiles" into sc-dev am: 4fa6d3a873
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14417793

Change-Id: Ibfd3c693ad80cc7c6a90f1fb917ba16ac14095fa
2021-05-07 15:06:59 +00:00
Lajos Molnar
4fa6d3a873 Merge "media: propagate profiles to EncoderProfiles" into sc-dev 2021-05-07 15:02:15 +00:00
TreeHugger Robot
ab5181226f Merge "Check the device type instead of the object reference" into sc-dev am: c9c67d25f9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14326778

Change-Id: I9ab962148c85b6b9a13ffb42197a00a17c9837f7
2021-05-07 04:12:55 +00:00
Sungsoo Lim
027d957f92 Check the device type instead of the object reference
Also print a log when restore route to default while a bluetooth
route is avaialble.

Bug: 176386259
Test: build
Change-Id: I4a974438040595597fbf4dcb0ec57d49351540ef
2021-05-07 10:56:15 +09:00
TreeHugger Robot
93a2c2313e Merge "SoundPool: Update documentation for sound duration" into sc-dev am: ca3cc01d0d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14430916

Change-Id: Ic2887ae3118bd9f54eefc2a7969a5443a0007bc3
2021-05-05 22:05:22 +00:00
TreeHugger Robot
ca3cc01d0d Merge "SoundPool: Update documentation for sound duration" into sc-dev 2021-05-05 21:56:23 +00:00
Lajos Molnar
544b4cffa9 Merge "media: pass full EncoderProfiles from XML" into sc-dev am: 0c361a917d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14392857

Change-Id: I6e79a926a73f0ff451f1ba946cf018e187bf0385
2021-05-05 17:13:43 +00:00
Andy Hung
b3b3a741d5 SoundPool: Update documentation for sound duration
Test: make docs and view
Bug: 147408160
Change-Id: I8952dd7da2ab8e493415e93f10f2346af3de2bd1
2021-05-04 15:36:40 -07:00
Lajos Molnar
16ceab17a0 media: propagate profiles to EncoderProfiles
Bug: 171673898
Test: atest CamcorderProfileTest
Change-Id: I486762863cd29239b44846b54b146458426b643b
2021-05-03 23:27:42 -07:00
Lajos Molnar
973b2e89bd media: pass full EncoderProfiles from XML
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
2021-05-03 23:27:42 -07:00
Santiago Seifert
9642d628ab Merge "Rename MediaExtractor symbols to log session id" into sc-dev 2021-05-01 10:51:09 +00:00
Santiago Seifert
14cdc32bd0 Rename MediaExtractor symbols to log session id
Test: atest CtsMediaHostTestCases
Bug: 167036690
Change-Id: I2e71d460e6907400daeba21fd6a76fa0ea5e0922
Merged-In: I2e71d460e6907400daeba21fd6a76fa0ea5e0922
2021-04-30 22:32:55 +00:00
Andy Hung
6e1398b55f Merge changes from topics "dra", "dts_uhd" am: 6a1812c30f am: ea8e392fef
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1691214

Change-Id: I34f818f3140c8d5c6f21089bf168b6b836a61fbc
2021-04-30 21:28:39 +00:00
Andy Hung
e70b8644aa Audio: Add ENCODING_DTS_UHD am: bd3a68b6f1 am: d3b7c9bb9c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1691700

Change-Id: I070bba4d6da54a75dd9ecf264a8e985ddaf36ed6
2021-04-30 21:28:33 +00:00