Commit Graph

10033 Commits

Author SHA1 Message Date
Hyundo Moon
821bf0f4bc Merge "System MR2: Check MODIFY_AUDIO_ROUTING permission" into sc-dev am: 8b40c9b344
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13970972

Change-Id: Ibb5f397945dc8444581e1a943bb9a3fd909852fd
2021-04-02 06:52:19 +00:00
Hyundo Moon
cd83e77ea5 System MR2: Check MODIFY_AUDIO_ROUTING permission
This CL adds a permission check for
MediaRouter2#getInstance(Context, String)
which creates the system MediaRouter2 instance.

Bug: 183428114
Test: CTS only passes with the right permission.
Change-Id: I38561dd6525d9e3c4514829662483d2c7a08dda1
2021-04-02 12:00:54 +09:00
TreeHugger Robot
e7fda77f3d Merge "Pass vibrator information to audio server." into sc-dev am: 9d52faa285
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14040009

Change-Id: I9c1489305c02b7178a24ae89ec6ea22b53bcbdee
2021-04-01 23:44:04 +00:00
TreeHugger Robot
9d52faa285 Merge "Pass vibrator information to audio server." into sc-dev 2021-04-01 23:36:27 +00:00
TreeHugger Robot
b47983f0eb Merge "Add session ID" into sc-dev 2021-04-01 19:25:35 +00:00
Dichen Zhang
7dce143de3 Add session ID
Add new session-id key to Media Format and MediaMetrics.

Bug: b/180037783
Test: set session ID in app and print log in native code.

Change-Id: I405dd64545d1e605eed9ab8626cd81cda4b94d64
2021-04-01 10:39:05 -07:00
Biswarup Pal
4a761808ba Merge "Refactor FileUtils#convertToModernFd" into sc-dev am: 3d73c3ad22
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13725034

Change-Id: Icccdbbd7d692159780ca6714f110008391d11cb2
2021-04-01 10:50:35 +00:00
Biswarup Pal
3d73c3ad22 Merge "Refactor FileUtils#convertToModernFd" into sc-dev 2021-04-01 10:25:59 +00:00
Treehugger Robot
f5ead882f2 Merge "MTP: Add thumbnail generation for JPG" am: 5aac2c84ba am: d68b21d215 am: fe8e0b235f am: 733c4088f0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1657579

Change-Id: I1488a062c22afff1648dc740f859dbf32db3c1b6
2021-04-01 08:54:25 +00:00
Treehugger Robot
733c4088f0 Merge "MTP: Add thumbnail generation for JPG" am: 5aac2c84ba am: d68b21d215 am: fe8e0b235f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1657579

Change-Id: Ia6f614fe65c560681b2f076046a7e4295a3f3e86
2021-04-01 08:24:14 +00:00
TreeHugger Robot
d331afd096 Merge "PlayerBase: remove dead code for OP_PLAY_AUDIO" into sc-dev am: 424ad85f4b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14054690

Change-Id: I22173a53a2181eacb4fc8451cc49e9d5118914fd
2021-04-01 08:01:29 +00:00
Treehugger Robot
fe8e0b235f Merge "MTP: Add thumbnail generation for JPG" am: 5aac2c84ba am: d68b21d215
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1657579

Change-Id: I9b85e42a66e310666de6d811e2af38d428a86f3d
2021-04-01 07:37:36 +00:00
TreeHugger Robot
424ad85f4b Merge "PlayerBase: remove dead code for OP_PLAY_AUDIO" into sc-dev 2021-04-01 07:30:34 +00:00
Treehugger Robot
5aac2c84ba Merge "MTP: Add thumbnail generation for JPG" 2021-04-01 06:20:56 +00:00
Amy Zhang
057c08a71e Merge "Rename IS_MISO and IS_SHORT_FRAME constants name to align with the getter" into sc-dev am: 026e109c50
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14054065

Change-Id: Iafd9bf6533a5b3c7f183c8f685ab7593da8d28ed
2021-04-01 01:52:30 +00:00
Amy Zhang
026e109c50 Merge "Rename IS_MISO and IS_SHORT_FRAME constants name to align with the getter" into sc-dev 2021-04-01 01:22:39 +00:00
jiabin
c1f0b55bfc Pass vibrator information to audio server.
When initializing HapticGenerator, the resonant frequency and Q factor
of the vibrator engine are needed for BPF and BSF. Those values can be
got from vibrator manager service. As there is not a native interface,
those values are got by audio service when the system is ready and then
pass them to audio server.

Bug: 182612056
Test: manual, atest HapticGeneratorTest
Change-Id: I9d898ab3dee9222ae3f8a82cd030e6013f545cb0
2021-03-31 22:29:18 +00:00
Biswarup Pal
d80f760516 Refactor FileUtils#convertToModernFd
Replace implementation of FileUtils#convertToModernFd with
MediaStore#getOriginalMediaFormatFileDescriptor. Fix fd leak
by returning ParcelFileDescriptor instead of FileDescriptor.

Test: atest CtsProviderTestCases
Bug: 170488060
Change-Id: I7d6ecf4549e8ed5134d20977c2089240be804827
2021-03-31 21:25:21 +00:00
Jean-Michel Trivi
085d69e36f PlayerBase: remove dead code for OP_PLAY_AUDIO
Remove dead code that was used to monitor OP_PLAY_AUDIO and react
to updates. This client-side  functionality was replaced with
enforcement in AudioFlinger.

Bug: 159749892
Test: removal of dead code, only "m"
Change-Id: I680aa38fecdf7bd062ff31ad35234e4a378059ea
2021-03-31 12:53:09 -07:00
Lajos Molnar
8f4b316182 Merge "media: add MediaFormat.KEY_AUDIO_HW_SYNC hidden key" into sc-dev am: 87c3471588
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13988433

Change-Id: I76a4383684484a0b7d7235666abbb36c5a651230
2021-03-31 19:52:02 +00:00
Lajos Molnar
87c3471588 Merge "media: add MediaFormat.KEY_AUDIO_HW_SYNC hidden key" into sc-dev 2021-03-31 19:40:30 +00:00
Anton Hansson
5879ac0fe4 Merge changes I97086e30,Ic55df4cf,I81a08c29 am: 4199ef90b9 am: 4bc578052d am: ec1f981309 am: 5013902a24
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655736

Change-Id: I8bff7924842316486f5058b241ee728fc74d0c4b
2021-03-31 18:32:52 +00:00
Anton Hansson
5013902a24 Merge changes I97086e30,Ic55df4cf,I81a08c29 am: 4199ef90b9 am: 4bc578052d am: ec1f981309
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655736

Change-Id: I5d242cf5b18c4b556105cfcfe78df2ac18a8544e
2021-03-31 18:01:32 +00:00
Anton Hansson
ec1f981309 Merge changes I97086e30,Ic55df4cf,I81a08c29 am: 4199ef90b9 am: 4bc578052d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655736

Change-Id: Ib8d66e1fb8845f3b47fd6e81091c0286ca6c8c9c
2021-03-31 17:32:14 +00:00
Anton Hansson
f15dfd0e7f Partial cp of "Move Tuner resource updating from Tuner java into Tuner client" am: 459d9506ee am: 8070534537
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655735

Change-Id: Ic065ac1b5251c01cea8811412be651448e6cb861
2021-03-31 17:32:12 +00:00
Amy Zhang
965f18912b Rename IS_MISO and IS_SHORT_FRAME constants name to align with the
getter

This CL also adds some exception messages to share more details on
the Frontend Status getter exceptions.

Test: atest android.media.tv.tuner.cts
Bug: 184017539
Change-Id: I0117dd48de21a7c77e1ae55f6ee67e0bbbda8076
2021-03-31 10:22:42 -07:00
Anton Hansson
8070534537 Partial cp of "Move Tuner resource updating from Tuner java into Tuner client" am: 459d9506ee
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655735

Change-Id: If4676fda1f43db7ff4fcf349d1cf857428acb4e9
2021-03-31 16:47:40 +00:00
Anton Hansson
4199ef90b9 Merge changes I97086e30,Ic55df4cf,I81a08c29
* changes:
  Move framework java filegroups into subdirectories
  Partial cp of "Move Tuner resource updating from Tuner java into Tuner client"
  Partial cp of "Initial boilerplate for an updatable graphics jar"
2021-03-31 16:13:13 +00:00
Henry Fang
d0764ef76f Merge "support changing audio-hw-sync-id during playback." am: 507764f6a8 am: 2dd3576872 am: 0abd962e42 am: 96529876e7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1648069

Change-Id: I00820ad7b2bdd8402e44a4062e10bd9eff2ec52d
2021-03-31 00:56:54 +00:00
Henry Fang
96529876e7 Merge "support changing audio-hw-sync-id during playback." am: 507764f6a8 am: 2dd3576872 am: 0abd962e42
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1648069

Change-Id: Ic60a0a502de6297278e253547321d782026564c5
2021-03-31 00:39:42 +00:00
Henry Fang
0abd962e42 Merge "support changing audio-hw-sync-id during playback." am: 507764f6a8 am: 2dd3576872
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1648069

Change-Id: If82b8903dba4cfbcc762b218f6cec6c5e704b92b
2021-03-31 00:15:26 +00:00
Houxiang Dai
6e3d3605dd support changing audio-hw-sync-id during playback.
Bug: 151997287
Bug: 183968006
Test: Manual
Change-Id: I3ca8a1efbf8a1942fd54e2f892bc76fee847da4c
2021-03-30 21:04:15 +00:00
Anton Hansson
9b2c4a650b Move framework java filegroups into subdirectories
All the java code used to build the framework jar and run metalava
was previously defined in the toplevel Android.bp files. Move these
into the subdirs where the source actually lives.

This simplifies the rules themselves (no path and needless prefix) and
declutters the top level Android.bp.

Test: m
Change-Id: I97086e309eacb879d16facb8497d9940fa5ddaf6
2021-03-30 12:26:55 +01:00
Anton Hansson
459d9506ee Partial cp of "Move Tuner resource updating from Tuner java into Tuner client"
Cherry-pick the change to the media filegroup in the root Android.bp
to avoid merge conflicts in upcoming changes.

Test: m nothing
Merged-In: I46acdd2f118d5b082aa162c680661a304b4f628b
Change-Id: Ic55df4cfeb295cfa1657c64f9747c90e30cb73a2
2021-03-30 12:21:21 +01:00
James Wei
1f1f81e0d1 MTP: Add thumbnail generation for JPG
Add thumbnail generation support for JPG image format
Instead of retrieving thumbnail from EXIF header

Bug: 178726106
Test: atest MtpTests
Test: manual test on Windows 10 file explorer
Test: manual test on Linux nautilus file browser
Change-Id: I29ad89835a8a27204a2e6dbd97b994209a813424
2021-03-30 13:49:27 +08:00
Jiabin Huang
88375244d8 Merge "Add short audio descriptor and encapsulation type in AudioProfile." into sc-dev am: ae6711b2a7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13784568

Change-Id: I4859329c63608a6679727d9111e2212d5154eca6
2021-03-26 04:36:12 +00:00
Jiabin Huang
ae6711b2a7 Merge "Add short audio descriptor and encapsulation type in AudioProfile." into sc-dev 2021-03-26 04:08:33 +00:00
Lajos Molnar
f13c0f08ab Merge "media: MediaCodecInfo: add FEATURE_QpBounds" into sc-dev am: 0dfd9df61c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13988808

Change-Id: I6948047d9e42069e03713c80d5cdbf56fd48b1d4
2021-03-25 23:40:27 +00:00
Ray Essick
24c9ac9d16 Merge "Clean documentation on video QP key semantics." into sc-dev am: 8b790e7bda
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13996809

Change-Id: Idef1b0c40f158494aa4a744643dceab11eec1289
2021-03-25 23:39:35 +00:00
Lajos Molnar
0dfd9df61c Merge "media: MediaCodecInfo: add FEATURE_QpBounds" into sc-dev 2021-03-25 23:34:53 +00:00
Ray Essick
8b790e7bda Merge "Clean documentation on video QP key semantics." into sc-dev 2021-03-25 23:30:47 +00:00
Jean-Michel Trivi
70c19aed15 Merge "Audio focus: test APIs for focus injection" into sc-dev am: bbf30df183
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13985546

Change-Id: I5a8d575c7c1916bc2bb390134c1cc34e26ea764e
2021-03-25 22:59:14 +00:00
Jean-Michel Trivi
bbf30df183 Merge "Audio focus: test APIs for focus injection" into sc-dev 2021-03-25 22:39:46 +00:00
Lajos Molnar
286a4ee982 Merge "media: add EncoderProfiles" into sc-dev am: 0264323406
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13924167

Change-Id: I2fbc0c4b6429bc45bb4ee5377ffc78bc50a9cbda
2021-03-25 21:37:57 +00:00
Lajos Molnar
0264323406 Merge "media: add EncoderProfiles" into sc-dev 2021-03-25 21:11:06 +00:00
Jean-Michel Trivi
28602096e7 Audio focus: test APIs for focus injection
Add new APIs for testing more audio focus behaviors:
- new methods to request/abandon audio focus on a "fake" focus
  owner for which an arbitrary UID can be injected
- new method to query the fade out duration on focus loss

Bug: 169620099
Test: atest AudioFocusTest#testAudioFocusRequestMediaGainLossWithPlayer
Change-Id: I4be4597a994bde99ed5ef98296a4a8a2d1b02d8a
2021-03-25 10:04:23 -07:00
Lajos Molnar
87f757f205 media: MediaCodecInfo: add FEATURE_QpBounds
This signals that the encoder supports the KEY_VIDEO_QP_* keys.

Bug: 179554934
Change-Id: If8db5f9bc3b725bb87872fd62c6a7d4cd9e63ab3
2021-03-25 09:56:46 -07:00
Ray Essick
0b9987c9fd Clean documentation on video QP key semantics.
Bug: 161486612
Test: build
Change-Id: I60ca046266fb231c12545e6865f2559a2dcf5c37
2021-03-25 09:49:27 -07:00
Philip Junker
2c2879baa0 Merge "Add IntDef for system sound effect constants" into sc-dev am: 451405eb17
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13901314

Change-Id: I7ae738845095fda803ea78155e7dea70ec5343e9
2021-03-25 09:41:44 +00:00
Philip Junker
451405eb17 Merge "Add IntDef for system sound effect constants" into sc-dev 2021-03-25 09:31:09 +00:00