Commit Graph

13427 Commits

Author SHA1 Message Date
TreeHugger Robot
6f92f5215b Merge "MediaPlayer2: update javadoc for setPlaybackParams" 2018-09-19 19:57:19 +00:00
TreeHugger Robot
d6b4dfb761 Merge "Move files to libmedia2_jni_core" 2018-09-19 02:05:27 +00:00
Robert Shih
8761bee9ab Move files to libmedia2_jni_core
Bug: 109928575
Test: compiles
Change-Id: I7036261ef53d16392f5dc778335c0413ccaf75ae
2018-09-18 17:34:41 -07:00
Wei Jia
6b29b71894 MediaPlayer2: update javadoc for setPlaybackParams
Test: cts
Bug: 112549021
Change-Id: I348d6b54414659accdf526fdc3448068490c6102
2018-09-18 14:24:43 -07:00
Dongwon Kang
7a53c4422f MediaPlayer2: remove unused code
Test: build
Bug: 112767549
Change-Id: I21d3f45c16fc884b05b848a18966f3ff59f84d86
2018-09-17 16:10:44 -07:00
Wonsik Kim
61796fdaa1 media: fix race condition around release
Protect native context for MediaCodec object from concurrent access.

Bug: 112863346
Bug: 112913410
Test: atest frameworks/av/media/libstagefright:postsubmit
Change-Id: Icacdd45bd6dcb0b03e2760a3441d2e7c7587d3ec
2018-09-14 14:37:10 -07:00
Jeff Sharkey
34e3e68375 Merge "Mark deprecated APIs, support column greylisting." 2018-09-14 18:38:15 +00:00
Michael Dooley
c106550132 Merge "Revert "Adding getModelState API to sound trigger"" 2018-09-14 16:21:17 +00:00
Michael Dooley
81f71f1c27 Revert "Adding getModelState API to sound trigger"
This reverts commit 4f809fe73e.

Reason for revert: fix build breakage

Change-Id: I75a54189f96fc21f6cb12dd8a05e513b1bda027c
2018-09-14 16:09:18 +00:00
Mathew Inwood
db0657a4f4 Merge "Move some members to the "Q blacklist"." 2018-09-14 13:54:28 +00:00
Michael Dooley
a707ba1cb0 Merge "Adding getModelState API to sound trigger" 2018-09-14 12:32:09 +00:00
Mathew Inwood
8c854f86a4 Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
2018-09-14 13:18:34 +01:00
kopriva
c6ccdcfc50 Merge "docs: bug 37037879, typo" into pi-dev am: e71b05a211
am: 16eb89477b

Change-Id: I9309d617642e98adc88483a65c130e746b85aa11
2018-09-13 18:59:04 -07:00
kopriva
16eb89477b Merge "docs: bug 37037879, typo" into pi-dev
am: e71b05a211

Change-Id: Iee76dc0a909c763e4a50ede80c9793cdf21c421a
2018-09-13 18:51:53 -07:00
Jeff Sharkey
7049e651fa Mark deprecated APIs, support column greylisting.
Update MediaStore APIs that are effectively no-ops, including
MiniThumbFile which is no longer used.

Add support for "greylisted" columns to SQLiteQueryBuilder, so that
we can support abusive columns that match specific regex patterns
while in "strict" mode, such as COUNT(*).

Bug: 111268862
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I364ef5bfa338ef8492b0b29c2a5c13c4189467ee
2018-09-13 17:14:27 -06:00
kopriva
15e5b767d6 docs: bug 37037879, typo
Test: make ds-docs

Bug: 37037879

Change-Id: I840f34f94f3346e20e53b3104cec3890d4b9fc72
Exempt-From-Owner-Approval: Docs-only change
2018-09-13 15:20:19 -07:00
TreeHugger Robot
5185bc79b1 Merge "MediaPlayer2: fix a regression from I5d4884353057a195b1f587694" 2018-09-12 16:58:21 +00:00
TreeHugger Robot
b1c94a9b85 Merge changes from topic "mp2-dep"
* changes:
  MediaPlayer2: remove libandroid_runtime + other static lib dependency.
  MediaPlayer2: remove unused code setMetadataFilter and getMetadata
  MediaPlayer2: temporarily disable set/getAudioAttribute
2018-09-12 03:09:28 +00:00
Dongwon Kang
43c815f5b1 MediaPlayer2: fix a regression from I5d4884353057a195b1f587694
Add a return value checking and throw an exception on error.

Test: pass MediaPlayer2Test#testDeselectTrackForSubtitleTracks
Bug: 63934228
Change-Id: I201af323792cbc8936ae9e763d5dd0143c81dfc6
2018-09-11 18:07:36 -07:00
Dongwon Kang
bf98d54da9 MediaPlayer2: remove libandroid_runtime + other static lib dependency.
MediaMetricsJNI.cpp is forked from libandroid_runtime instead of moving
since it was also used with in the libandroid_runtime.so.

Test: MediaPlayer2Test
Bug: 112767225
Change-Id: Iebb0ce2736dbf4df9288a5c3aca447a52c4de533
2018-09-11 17:02:13 -07:00
Tomoharu Kasahara
7f094f80d0 Merge "Convert AudioAttribute to Stream correctly for TTS" am: 874e10f4a6 am: 96b6adc014
am: 76b988ad23

Change-Id: I9935ce0eaaa1f50246c242c0190cb4408b243248
2018-09-11 13:58:17 -07:00
Tomoharu Kasahara
76b988ad23 Merge "Convert AudioAttribute to Stream correctly for TTS" am: 874e10f4a6
am: 96b6adc014

Change-Id: Id90684e28b0fc33be3301c6adf0683be239ae0d0
2018-09-11 13:44:31 -07:00
Tomoharu Kasahara
96b6adc014 Merge "Convert AudioAttribute to Stream correctly for TTS"
am: 874e10f4a6

Change-Id: I52a610027d11574ab51cd83683de64ff2dddadfe
2018-09-11 13:35:21 -07:00
Dongwon Kang
81ed05df1d MediaPlayer2: remove unused code setMetadataFilter and getMetadata
1. These are dead codes since there is not entry points in the
   MediaPlayer2[Impl].java side.
2. In MP1, setMetadataFilter() and getMetadata() has been hidden
   from the beginning. Ic20240a0b388897950c98337b539eb05e487273a
   And, even the Metadata class is deprecated in favor of MediaMetadata.

Test: build
Bug: 112767225

Change-Id: I2a14f100abe3918a6c9cfd676397d9ad94dcdcd0
2018-09-11 13:23:50 -07:00
Dongwon Kang
e22d3681f2 MediaPlayer2: temporarily disable set/getAudioAttribute
Will be enabled once JAudioTrack migration is done.

Test: MediaPlayer2Test
Bug: 112767225
Change-Id: Ifbceb2451b134ba2b289e417cf46c2e7e762847b
2018-09-11 13:23:50 -07:00
Treehugger Robot
874e10f4a6 Merge "Convert AudioAttribute to Stream correctly for TTS" 2018-09-11 19:26:56 +00:00
Tomoharu Kasahara
be0103c0a5 Convert AudioAttribute to Stream correctly for TTS
Add FLAG_BEACON for STREAM_TTS then use it for
conversion from AudioAttribute to stream type.

Bug: 113303490
Test: Use AudioAttributes.toLegacyStreamType

Change-Id: I7fa2b3f095437f8077545d1fff795bb0d8fe6b89
2018-09-11 20:21:59 +09:00
Dongwon Kang
4c2e8620e6 MediaPlayer2: use protobuf instead of parcel for TimedText
Test: MediaPlayer2Test
Bug: 112767225
Change-Id: I374427125af3d470224876c947d69dda243625cd
2018-09-10 20:39:54 -07:00
Dongwon Kang
63f28a9e4c MediaPlayer2: use protobuf instead of parcel for notification message
Test: MediaPlayer2Test
Bug: 112767225
Change-Id: Ifed7c5c63623ad2b0f17806a38cd020470174dad
2018-09-10 20:39:54 -07:00
TreeHugger Robot
1ae324d31d Merge "Exposes {start,stop}AudioSource to JAVA layer" 2018-09-10 20:29:32 +00:00
Dongwon Kang
1941814f8e Merge "MediaPlayer2: use protobuf instead of parcel in invoke()" 2018-09-10 18:32:32 +00:00
Hongwei Wang
f44a568ffb Exposes {start,stop}AudioSource to JAVA layer
- Android Automotive directly calls AudioSystem at the time being,
AudioManager is not updated in this CL

TODO:

- AudioPolicyManager::connectAudioSource is a no-op for
AUDIO_DEVICE_API_VERSION_3_0

Bug: 112161027
Test: m -j
Change-Id: I27a28cd1fd2992c4a7a9a67feb606f35cae43cc3
2018-09-08 12:12:15 -07:00
Par-Gunnar Hjalmdahl
a85a275221 Merge "Convert AudioAttribute to Stream correctly" am: 024387744a am: ce31fe2fb8
am: 8aac09b0c6

Change-Id: I5e9449c7ce71b7cec57443fe3d994c5c5e87336d
2018-09-05 19:18:58 -07:00
Par-Gunnar Hjalmdahl
8aac09b0c6 Merge "Convert AudioAttribute to Stream correctly" am: 024387744a
am: ce31fe2fb8

Change-Id: I0901d4076b693d43796fa5552dc0ee5ac383b70e
2018-09-05 17:31:28 -07:00
Par-Gunnar Hjalmdahl
ce31fe2fb8 Merge "Convert AudioAttribute to Stream correctly"
am: 024387744a

Change-Id: If8b0bd7b8fa83bddd29b0c15aef0f3a719b7be5f
2018-09-05 16:21:58 -07:00
Treehugger Robot
024387744a Merge "Convert AudioAttribute to Stream correctly" 2018-09-05 22:43:07 +00:00
mike dooley
4f809fe73e Adding getModelState API to sound trigger
Test: built android
Bug-Id: 70206501
Change-Id: Ieb83a366d4ddd471186d5089efe0675ea6285454
2018-09-05 15:58:27 +02:00
Dongwon Kang
dfea0aab67 MediaPlayer2: use protobuf instead of parcel in invoke()
Also fix MEDIA_INFO handling code to send the event to the client
after handling internal update. (This fixes several cts test cases.)

Test: pass MediaPlayer2Test
Bug: 63934228
Change-Id: I5d4884353057a195b1f587694bfbf66cdf1fd23c
2018-08-28 20:50:08 -07:00
Jeff Sharkey
202a16ec96 Merge "More robust MTP-to-MIME-type mappings." 2018-08-28 20:51:37 +00:00
Philip P. Moltmann
ee96bde575 Merge "Allow ignoring return values when checking if class is mockable" am: e91c337d41
am: a8e1da9165

Change-Id: Ifcd7e03bd9c62ff55fe26374f1a32d249ffe2c87
2018-08-28 12:36:58 -07:00
Philip P. Moltmann
a8e1da9165 Merge "Allow ignoring return values when checking if class is mockable"
am: e91c337d41

Change-Id: I36ae2c2f4755810bfbaf06d30e20c1461106aa06
2018-08-28 12:15:53 -07:00
Jeff Sharkey
91e3cd4c6c More robust MTP-to-MIME-type mappings.
Recently in I830717428e72ac37c5ecd1f23d915aa878ef3744, we greatly
improved the underlying file-extension-to-MIME-type mappings defined
in libcore and used across the OS.

Instead of maintaining divergent mappings here in MediaFile, this
change delegates all file extension logic down to libcore, and
standardizes all MediaScanner internals on using MIME types.  To
register new file types in the future:

1. Add the MIME-to-extension registration in libcore.
2. Add the MIME-to-MTP mapping here in MediaFile.

This change also ensures that unknown MIME types are surfaced
across MTP, using constants like FORMAT_UNDEFINED_AUDIO for audio/*
until an explicit format is defined.

We now surface WMA/WMV file formats, even if the device can't
natively play them back, since we still want to offer the ability
for users to copy them around, and the user may have a third-party
app capable of playing them.

Keeps @UnsupportedAppUsage intact for now.

Bug: 111268862, 112162449
Test: atest frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaFileTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I2f6a5411bc215f776f00e0f9a4b7d825b10b377d
2018-08-28 13:02:35 -06:00
Philip P. Moltmann
441f0283fb Allow ignoring return values when checking if class is mockable
Test: make -j javac-check RUN_ERROR_PRONE=true
Change-Id: I5094fa145fc5f6d5c5d9426b07d764c07e545819
Merged-In: I5094fa145fc5f6d5c5d9426b07d764c07e545819
2018-08-28 09:53:19 -07:00
Par-Gunnar Hjalmdahl
96e68bc2e6 Convert AudioAttribute to Stream correctly
When converting an AudioAttribute with FLAG_SCO set, it should
be converted to STREAM_BLUETOOTH_SCO. However, since getFlags()
returns only public flags, and FLAG_SCO isn't public,
the conversion will fail. Change to getAllFlags() to get right
flags.

Bug: 113314374
Test: Use AudioAttributes.toLegacyStreamType

Change-Id: Ic283f055d746d5c3df645dc310c92dac3c80827f
2018-08-28 20:34:01 +09:00
Raj Mojumder
b570968483 Modify MTP OWNERS file.
Set noparent and correct one entry.

Test: no

Change-Id: Iea566148c9cddd4d2529f164c2ff2ff78f4dc596
2018-08-27 14:11:46 -07:00
Chih-hung Hsieh
8e3be20846 Merge "Fix errors in LOG_FATAL_IF arguments." am: 78755a8c97
am: c22d1184d4

Change-Id: Ieeb3467a6ca7c0f8a5b1c388ca780805bae959cc
2018-08-27 11:01:03 -07:00
Raj Mojumder
22e0a4ab0f Add frameworks/base/media/java/android/mtp/OWNERS
Differentiated OWNERS for MTP functionality

Test: no
Change-Id: I477143dc58c65fcc366bb8167f820f91ee009f99
2018-08-27 10:53:29 -07:00
Chih-hung Hsieh
c22d1184d4 Merge "Fix errors in LOG_FATAL_IF arguments."
am: 78755a8c97

Change-Id: I8a75a52970ea8bda0ba2ae71dd82845b0bad7333
2018-08-27 10:51:59 -07:00
TreeHugger Robot
8fde73109e Merge "MediaPlayer2: MEDIA2_INFO_DATA_SOURCE_START is sent by native code" 2018-08-24 19:12:33 +00:00
Wei Jia
9c33082103 MediaPlayer2: MEDIA2_INFO_DATA_SOURCE_START is sent by native code
Test: cts
Bug: 109928575
Change-Id: Ia9a1a4cb60e563ae44a4c97ff47360c9a0143283
2018-08-23 18:24:35 -07:00