Commit Graph

6966 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Dongwon Kang
d87e7c98a6 Fix a typo in javadoc. am: e1b0d4a253
am: 52c8542213

Change-Id: Iea37a6b4d5428a0342ff36a549cdddfb0a6bf89d
2018-08-23 18:16:10 -07:00
Dongwon Kang
52c8542213 Fix a typo in javadoc.
am: e1b0d4a253

Change-Id: I65e6b8b5110b4175c35e8bcdef5299418de623ca
2018-08-23 18:03:50 -07:00
Dongwon Kang
e1b0d4a253 Fix a typo in javadoc.
Test: javadoc fix.
Bug: 112882126
Change-Id: I69f55aaa49103690a796ff394fcd1934891a52f2
2018-08-23 21:14:23 +00:00
TreeHugger Robot
29bcb287b6 Merge "MTP: Add support of ObjectInfoChanged Event" 2018-08-23 01:38:39 +00:00
Wei Jia
43d77dd7b3 MediaPlayer2: add clearNextDataSources.
Test: cts
Bug: 111657231
Change-Id: Ibe4cb7c7c57b3245e408ae004041338f9fc32bc4
2018-08-22 14:16:27 -07:00
Ari Hausman-Cohen
d5b5161007 Merge "Add Dynamic Source Effects" 2018-08-20 19:47:35 +00:00
Mathew Inwood
49e1c134af resolve merge conflicts of 2382108d01 to stage-aosp-master
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I28c80f9ecb1c04a09d1be78503a716d26f66aff4
Merged-In: I3bd40136d7fc948f66eca6b2d139c15e39c5a248
2018-08-20 11:29:16 +01:00
Mathew Inwood
473b9d5bfc Add @UnsupportedAppUsage annotations
For packages:
  android.media.tv
  android.media.soundtrigger
  android.media.session
  android.media.projection
  android.media.midi
  android.media.effect.effects
  android.media.effect
  android.media.browse
  android.media.audiopolicy
  android.media.audiofx
  android.media

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I9b58cb2d1e02d9156a7b0d19c1feff4bcd2c53a9
Merged-In: I3bd40136d7fc948f66eca6b2d139c15e39c5a248
2018-08-17 09:07:01 +01:00
Mathew Inwood
31a792ac29 Add @UnsupportedAppUsage annotations
For packages:
  android.media.tv
  android.media.soundtrigger
  android.media.session
  android.media.projection
  android.media.midi
  android.media.effect.effects
  android.media.effect
  android.media.browse
  android.media.audiopolicy
  android.media.audiofx
  android.media

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I3bd40136d7fc948f66eca6b2d139c15e39c5a248
2018-08-17 08:54:26 +01:00
Mathew Inwood
345a4af9af Merge "Code reformatting for upcoming automated code changes." am: 43f3f60ec0 am: d9b640cbc2
am: 17ea268961

Change-Id: Ia86c739b9e02e963f3c74b25d67b7663860518bd
2018-08-16 18:44:12 -07:00
Mathew Inwood
d9b640cbc2 Merge "Code reformatting for upcoming automated code changes."
am: 43f3f60ec0

Change-Id: Id11efe22dffc7edd46d5dc2244b7121f664fba4d
2018-08-16 16:56:06 -07:00
Treehugger Robot
43f3f60ec0 Merge "Code reformatting for upcoming automated code changes." 2018-08-16 07:45:35 +00:00
Mathew Inwood
3ef2a833ba Merge "Add @UnsupportedAppUsage annotations"
am: 9feefd2f5f

Change-Id: Id93bdaf74cf2e9077f3af8367189ae98e8a2f95a
2018-08-15 06:52:39 -07:00
Gerry Fan
4f8c0a3d2b Merge "Add Nullable to MediaHTTPService's mCookies." am: 7955aec0ea am: 293800c9c9
am: d8a13d8215

Change-Id: Ibde8fec798d965ac6a2ecaf297008f93439f1419
2018-08-15 04:43:45 -07:00
Mathew Inwood
9feefd2f5f Merge "Add @UnsupportedAppUsage annotations" 2018-08-15 11:37:37 +00:00
Mathew Inwood
217f30b3a4 Merge "Add @UnsupportedAppUsage annotations" 2018-08-15 10:03:53 +00:00