Commit Graph

9626 Commits

Author SHA1 Message Date
Robert Shih
205f7a9fb1 MediaDrm: query secure codec requirement w/o session
Bug: 136119370
Test: GtsMediaTestCases
Change-Id: I37982e77deff5e2ac21c2d1a5bdf07b1d1f08b15
2021-01-19 21:12:10 -08:00
shubang
f2536f04f6 Add playback state event
Test: make;
Bug: 167036690
Change-Id: I6658b282096a3894ac8028a1a8255321d16bb7bc
2021-01-15 16:40:09 -08:00
TreeHugger Robot
dfb11c4dd1 Merge "Rename getFrontendInfoList to getAvailableFrontendInfo and improve the java doc" 2021-01-15 21:30:18 +00:00
Henry Fang
5abb73b946 Merge "update connect status along with stream_configuration_change event." am: 0fc601a600 am: a4803ba8d4 am: 8d94f0dad7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1532752

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idf9ad1cb727e6c7d21a352c01f7fc14b60391b0e
2021-01-15 21:16:53 +00:00
TreeHugger Robot
488250acf3 Merge "Add all fields to PlaybackMetrics" 2021-01-15 21:14:29 +00:00
Henry Fang
8d94f0dad7 Merge "update connect status along with stream_configuration_change event." am: 0fc601a600 am: a4803ba8d4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1532752

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib67fd57676d4818f57536b92e49106718660f47e
2021-01-15 20:28:05 +00:00
Henry Fang
0fc601a600 Merge "update connect status along with stream_configuration_change event." 2021-01-15 19:41:53 +00:00
Henry Fang
b4cd332de4 Merge "Add pause and resume recoding APIs" am: abf0168d4a am: 094ad6ee90
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1498597

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7294690d53f3142c52daa3788b824d4cbcc3ab4f
2021-01-15 19:08:34 +00:00
shubang
d233f80a35 Add all fields to PlaybackMetrics
Bug: 167036690
Test: mmm
Change-Id: Ia52441bb1b40c684c72eab691ade293acb927a29
2021-01-15 10:56:05 -08:00
Amy Zhang
452cc8ed3c Merge "Replace TRM TunerFronendInfo with the TunerSerivce aidl TunerFrontendInfo" 2021-01-15 18:26:31 +00:00
TreeHugger Robot
47a589386b Merge "Add playback network event." 2021-01-15 17:20:52 +00:00
Eric Laurent
c13a997a2e Merge "AudioService: fix playback capture permission check" 2021-01-15 10:18:54 +00:00
shubang
72b84695f3 Add playback network event.
Bug: 167036690
Test: mmm
Change-Id: I1f3c6cabc6d2622a2cd50e7d0970642e0735747c
2021-01-15 00:41:01 -08:00
Kyeongkab.Nam
5c92bdb2d6 Add pause and resume recoding APIs
When a program is inserted during recoding(ex. Flash News), some
applications want to pause that temporary.
Add pause and resume recording feature so that it permits to tune on
pause status while recoding.

Bug: 172029807
Test: run cts -m CtsTvTestCases -t
android.media.tv.cts.TvInputServiceTest

Change-Id: Ib11ae5d3eddcd01dbd48efa58fb2d4011040b210
Merged-In: Ib11ae5d3eddcd01dbd48efa58fb2d4011040b210
2021-01-15 01:33:26 +00:00
Amy Zhang
d1fd5ac468 Replace TRM TunerFronendInfo with the TunerSerivce aidl
TunerFrontendInfo

Test: make
Bug: 172079283
Change-Id: Idb915a9932750924a5ea969ee4ab3695efeaca24
2021-01-14 17:28:49 -08:00
TreeHugger Robot
0caface09a Merge "Add playback error event" 2021-01-15 01:27:18 +00:00
Kyeongkab.Nam
d22f674de8 Add pause and resume recoding APIs
When a program is inserted during recoding(ex. Flash News), some
applications want to pause that temporary.
Add pause and resume recording feature so that it permits to tune on
pause status while recoding.

Bug: 172029807
Test: run cts -m CtsTvTestCases -t
android.media.tv.cts.TvInputServiceTest

Change-Id: Ib11ae5d3eddcd01dbd48efa58fb2d4011040b210
2021-01-14 13:43:57 -08:00
Eric Laurent
5e0b95fe0f AudioService: fix playback capture permission check
Fix permission checks when registering a dynamic audio policy
of type loopback+render for usage VOICE_COMMUNICATION.
Previous checks were assuming that the policy was created with
allowPrivilegedPlaybackCapture flag which should not be a pre requisit.
The conditions to allow capture of VOICE_COMMUNICATION playback (loopback+render
mode) are:
- Having permission MODIFY_AUDIO_ROUTING (implied by ability to regiter a DAP).
- Having permission CAPTURE_VOICE_COMMUNICATION_OUTPUT.
- The capture format is compatible with capture by system requirements.
- The playback client or app did not opt out from capture by system.

Test: atest AudioHostTest
Test: atest AudioPlaybackCaptureTest
Bug: 161569476
Change-Id: I919f016180565b44bf13e8e6afc4a87ef0d6391d
2021-01-14 13:13:03 +01:00
shubang
8281ed6f82 Add PlaybackComponent interface
And use it for MediaCodec as an example.

Test: mmm
Bug: 167036690
Change-Id: Idfea3876d413c3d8d3d6e153e716687e79815d95
2021-01-14 07:48:51 +00:00
shubang
c35d227793 Add playback error event
Test: make;
Bug: 167036690
Change-Id: I38d01941527186ec4ca69ea4c315f4030096fc29
2021-01-13 18:11:41 -08:00
Henry Fang
8e00980480 update connect status along with stream_configuration_change event.
bug: 142698113
Test: Manual
Change-Id: I3d4a3b7f728e20ed4eaa07a7a67ebc7905e72213
2021-01-13 15:44:49 -08:00
Philip Junker
ae17952598 Merge "Add new sound effect constants and make touch_sounds group optional in audio_assets.xml" 2021-01-13 17:13:26 +00:00
Ashwini Oruganti
40449d8182 Merge "Bulk apply PendingIntent.FLAG_MUTABLE_UNAUDITED." 2021-01-13 16:08:07 +00:00
Philip Junker
7f1fdff898 Add new sound effect constants and make touch_sounds group optional in audio_assets.xml
Add sound effect constants for back, home and fast-scroll.
The touch_sounds group name is now optional, which makes the
audio_assets.xml file more generic.

Bug: 157407957
Test: manually tested on a device
Change-Id: I97ee1920032b8db46acea29ed5693a4b63d7dfcf
2021-01-13 14:31:04 +01:00
TreeHugger Robot
0ec8f65a6a Merge changes I2803d0ed,I8d83f7a3,I46acdd2f
* changes:
  Manager CiCam resources in Tuner Resource Manager
  Update client pid and priority on requesting resources
  Move Tuner resource updating from Tuner java into Tuner client
2021-01-13 10:12:51 +00:00
Jin Seok Park
fcfb4c19e6 Merge "Replace using integer with UserHandle for user id" 2021-01-13 08:40:15 +00:00
Amy Zhang
ed7fc38519 Manager CiCam resources in Tuner Resource Manager
Add a new resource type CiCamResource to be managed by the TRM

At one moment, there each client could only have one ciCam connected
to either demux or frontend.

Before reconnecting to different ciCam, the client needs to disconnect
first.

Higher priority client could get the ciCam from lower priority one
and cause all resources loss on the previous owner.

Test: atest com.android.server.tv.tunerresourcemanager
Bug: b/172310004
Bug: b/158818696
Change-Id: I2803d0edf1f7282b0a496d7eb79181be42b8eec1
2021-01-12 16:42:26 -08:00
Amy Zhang
39a3fa4653 Move Tuner resource updating from Tuner java into Tuner client
Note that the main goal of this CL is to
move the resource updating with TunerResourceManager
from Tuner java into Tuner native client library.

This requires TunerResourceManager aidl interface to generate
both ndk and java library.

Also this CL removes the previously manually defined
TunerResourceManager java interface and use the automatically
generated java lib instead.

Some Android Services, such as MediaCase/TIF, that previously used the
manually defined TRM java APIs are changed to use the auto gen APIs
in this CL.

Test: atest android.media.tv.tuner.cts on Cuttlefish
Bug: 174095851
Change-Id: I46acdd2f118d5b082aa162c680661a304b4f628b
2021-01-12 16:41:44 -08:00
Ashwini Oruganti
f8191e8996 Bulk apply PendingIntent.FLAG_MUTABLE_UNAUDITED.
We've been working hard to require PendingIntents explicitly declare
if they allow their contents to be mutated or not, and to finish
landing that work this change applies the new FLAG_MUTABLE_UNAUDITED
flag to all remaining code locations until they can be manually
inspected.

Bug: 160794467
Test: manual
Change-Id: I8d7ec64ac89755c14b5959bb6ef0bce203c92bf0
2021-01-12 15:07:43 -08:00
Amy Zhang
921fd433c5 Refactor Tuner JNI and move the interaction with IDescrambler into DescramblerClient
Test: atest android.media.tv.tuner.cts on Cuttlefish
Bug: 174095851
Change-Id: Ie6c465324bbec71b080f9fdead003f3c56d79010
2021-01-12 13:03:27 -08:00
Amy Zhang
d3d57b45a4 Refactor Tuner JNI and move the interaction with ILnb into LnbClient
Test: atest android.media.tv.tuner.cts on Cuttlefish
Bug: 174095851
Change-Id: I3903f62949aec0dac61388b356e7d7850a5a044c
2021-01-12 13:02:11 -08:00
Amy Zhang
210c26a974 Remove Lnb updating related implementation from Tuner JNI/java
Note: This was part of ag/13255478. Making it a separate CL can break
the dependency of the Tuner client changes on the frameworks/base
changes that require owner review from external teams.

Test: make
Bug: 174095851
Change-Id: Id40014b2ccd95b944e465b79571e113d8ed1a254
2021-01-12 12:57:04 -08:00
TreeHugger Robot
da4cb98b05 Merge "Fix renaming file and moving file issue in MTP" into rvc-qpr-dev am: d099321312
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13090503

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibdb009f96a2e55bb29dd7189451a7cbf57d6919a
2021-01-12 04:18:20 +00:00
Treehugger Robot
4d6509240a Merge "Cache bluetooth A2DP in AudioService callback thread" am: 163632b108 am: 2727ec6c4a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1545269

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8377b5355fbf2ef0ea32c4c23facf87ebb73d8e7
2021-01-11 13:06:33 +00:00
Treehugger Robot
e6a446b45f Merge "Cache stream volumes to prevent ANR" am: db50d542af am: 5219ee1e7b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1535787

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1740f6a49c9ffabd3d011a1dfc7b691da25621f0
2021-01-11 13:06:25 +00:00
Ivan Chiang
23ed52f971 Fix renaming file and moving file issue in MTP
After the user renames/moves a file/directory, the database of
MediaProvider is not updated. It causes that the file can't be
opened via MediaProvider. Use scanFile to instead of MP.update
for the file/directory.

Handle the .nomedia case for create/copy/move/delete/rename.
Scan the parent directory to update the database.

Test: atest MtpTests
Test: atest --test-mapping packages/providers/MediaProvider
Test: manual. 1. Move/rename the file/directory.
              2. Open the file in DocumentsUI
	      3. create/copy/move/delete/rename for .nomedia case
Bug: 169300366
Bug: 171538933
Bug: 172029805
Bug: 170798581
Change-Id: Ia37be7a027bfe502e3f7c96babe5a5bbed5f942c
Merged-In: Ia37be7a027bfe502e3f7c96babe5a5bbed5f942c
(cherry picked from commit 20079f1064)
2021-01-11 10:47:12 +00:00
Jin Seok Park
2db6bcb67a Replace using integer with UserHandle for user id
Official API guideline is to use UserHandle for user id to ensure
type safety and avoid conflating user IDs with uids.
See go/android-api-guidelines#use-userhandle

Bug: 174762061
Test: build
Change-Id: I1db55e19fe086544f428783898af623422d37a0d
2021-01-11 17:49:56 +09:00
Sungsoo Lim
2c42265027 Cache bluetooth A2DP in AudioService callback thread
And replace an array map to sparse array.

Bug: 170327593
Test: manually
Change-Id: Ia7fd1953158ec2817df8101cb1fa01581d20deb8
2021-01-11 16:08:31 +09:00
Sungsoo Lim
ca762cc0ad Cache bluetooth A2DP in AudioService callback thread
And replace an array map to sparse array.

Bug: 170327593
Test: manually
Change-Id: I791146f3ad87a35fac245bd159dd13b03e6f9e9f
2021-01-11 16:07:09 +09:00
Sungsoo Lim
96d134d75a Cache stream volumes to prevent ANR
MediaRourter uses main thread for internal operations, and ANR could
happens if AudioService is not running when MediaRouter tried to get
stream volumes. This CL avoids such ANR by caching stream volumes.

Bug: 170327593
Test: manually
(cherry picked from internal master branch)

Change-Id: I7c00b26a3a25f17c877d3ec0e998905ab0b4af28
2021-01-11 10:04:08 +09:00
Nick Moukhine
9b07789714 Merge "Add owners file for musicrecognition packages" am: 73218cd5b2 am: 9098ad18a1 am: ee3b4eda77
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1543149

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1d866abe43c79879e011bcaa726369b9bc3b3b45
2021-01-08 17:08:03 +00:00
Nick Moukhine
ee3b4eda77 Merge "Add owners file for musicrecognition packages" am: 73218cd5b2 am: 9098ad18a1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1543149

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9eb9f35613ff4f7f990aab0b9fddf72631fb74cd
2021-01-08 16:40:15 +00:00
Jin Seok Park
56b6fad62c Merge "[Media ML] Unhide dispatch key event APIs" 2021-01-08 16:25:31 +00:00
Treehugger Robot
4b8f386ae4 Merge "Set max frequency as Max_Value of integer if it's negative." am: 4a17bccf59 am: 30f0456d60 am: 35028e9f0b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1542427

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iea2c5ad48a1da20d00ccd4ccc393d8683bdc5836
2021-01-08 10:44:15 +00:00
Treehugger Robot
35028e9f0b Merge "Set max frequency as Max_Value of integer if it's negative." am: 4a17bccf59 am: 30f0456d60
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1542427

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I02cfbd754a58d7af4010b8885463cba628c89809
2021-01-08 10:13:47 +00:00
Nick Moukhine
06f96289be Add owners file for musicrecognition packages
Bug: 158194857
Test: none (trivial)
Change-Id: I5fe0c211b9835dac6ad5960ffd17cbefee26a10d
2021-01-08 10:56:02 +01:00
Jin Seok Park
596a4ea492 Merge "Prevent skipBytes from infinitely looping" 2021-01-08 01:09:19 +00:00
Henry Fang
7112714a90 Set max frequency as Max_Value of integer if it's negative.
bug: 176097540
Test: Manual
Change-Id: I17cdd3b2861415b4812694d79aa97f3e7463e12a
2021-01-08 00:37:11 +00:00
Oscar Azucena
cdd69e639b Merge "Refactored base code to getDeviceForPortId" 2021-01-07 19:53:04 +00:00
Treehugger Robot
1557e2bf14 Merge "MTP: Update language to comply with Android's inclusive language guidance" am: 86b6f66d9f am: 5e5716ef83 am: 27f9f37c0b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382396

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If5df055458ced225b8c6d3046617a7dd620d590e
2021-01-07 17:54:17 +00:00