Commit Graph

7308 Commits

Author SHA1 Message Date
Andy Hung
d0e81d2fb7 Merge "AudioFormat: Make member variables final for immutable class" 2018-12-08 00:30:03 +00:00
TreeHugger Robot
fc4fc2c9e3 Merge "MediaTimestamp: add Builder" 2018-12-07 23:27:56 +00:00
Adrian Roos
b7136fcc5a Merge "Revert "AML: Make MediaSessionManager.createSession() as @SystemApi"" 2018-12-07 22:08:52 +00:00
Adrian Roos
d6d5ee736f Revert "AML: Make MediaSessionManager.createSession() as @SystemApi"
This reverts commit 0852ebab41.

Reason for revert: Return and parameter types of added SystemApi are not themselves part of the API.

Bug: 119749862
Change-Id: I9f89abc25d2f3f6cff60c2465fca8e471e7f1f2a
2018-12-07 14:11:51 +00:00
TreeHugger Robot
abe028ab5b Merge "MediaPlayer2: fix sdk docs" 2018-12-07 05:48:59 +00:00
Hyundo Moon
04f55a3391 Merge "AML: Unhide 4-params constructor of RemoteUserInfo" 2018-12-07 02:24:57 +00:00
Andy Hung
7d8aa3f36c AudioFormat: Make member variables final for immutable class
Test: CTS AudioFormatTest
Bug: 120626200
Change-Id: I56f9b569546622e4ababa306b0f5bb6cad2b1d4a
2018-12-06 16:14:52 -08:00
Wei Jia
efb8cd1337 MediaTimestamp: add Builder
Test: cts
Bug: 112549021
Change-Id: I696fea67407c5a9b8fd4e2e17ac88c26be05a157
2018-12-06 14:59:29 -08:00
Michael Chan
2de156d15f Add AudioTrack.isDirectPlaybackSupported method
The method checks whether the provided AudioFormat can be played
via currently connected output devices w/o SRC or downmixing
by the framework.

Bug: 120044865
Test: atest CtsMediaTestCases:AudioTrackTest#testIsDirectPlaybackSupported
Change-Id: I63e8334a60d48c17999f500d87360f9c71185dfb
2018-12-06 14:41:03 -08:00
Wei Jia
2e47eea512 MediaPlayer2: fix sdk docs
Test: make offline-sdk-docs
Bug: 112549021
Change-Id: I422da92262428b63934e4268001903dfdf01836b
2018-12-06 12:52:08 -08:00
Chong Zhang
6e4fa27afd Add MediaCodec constants for HDR10+
bug: 118507186

Change-Id: I742b93ba4475fb82b7a9f9aaf237f43cfa66a915
2018-12-06 10:42:24 -08:00
Hyundo Moon
b505f0aab3 AML: Unhide 4-params constructor of RemoteUserInfo
Bug: 119752205
Test: make update-api
Change-Id: Idabdd68a335afae58392ef3bb357991d10718a97
2018-12-06 11:58:46 +09:00
TreeHugger Robot
eb8464dc0a Merge "MediaPlayer2: unhide MediaPlayer2 and related classes." 2018-12-06 01:08:26 +00:00
TreeHugger Robot
67caf70322 Merge "SubtitleData: add Builder in SubtileData and TimedMetaData" 2018-12-06 01:05:15 +00:00
Robert Shih
cbfc0b405c Merge "MediaPlayer2: per-source native drm prepare/release" 2018-12-05 19:37:02 +00:00
Yanning Bai
cdf22ef7cb Add eac3-joc MIME type
Bug: 120549104
Test: make
Change-Id: I443af3f50cb3f2a00ccce1bb8f222f63b1522cb8
2018-12-05 10:28:49 -08:00
Jakub Pawlowski
15a81d7f78 JavaDoc fix
Test: make offline-sdk-docs
Change-Id: I0ae64b0b7c2d46d6b196ae98beecd4cf4e910db2
2018-12-05 13:47:29 +00:00
Jakub Pawlowski
b0b3a64a37 Java doc fix: @throw -> @throws
Test: compile javadoc
Change-Id: I243b824d0573470455d297c6d45a14e1b503e8ff
2018-12-05 10:58:28 +01:00
Hyundo Moon
8d2cfac24a Merge "AML: Make MediaSessionManager.createSession() as @SystemApi" 2018-12-05 06:48:30 +00:00
Jeff Sharkey
9246fc7616 Merge "Stop indexing location metadata." 2018-12-05 05:46:18 +00:00
Wei Jia
c926a4da7d MediaPlayer2: unhide MediaPlayer2 and related classes.
Test: cts
Bug: 112549021
Change-Id: Ie38311db0c48c53f614e521f5a6c93dc525f8064
2018-12-04 18:37:05 -08:00
Robert Shih
caddb5f593 MediaPlayer2: per-source native drm prepare/release
Bug: 119675660
Test: MediaPlayer2DrmTest
Change-Id: If8fe320bfe9a9194e7db3a4bb4cfb26071b8e996
2018-12-04 17:19:06 -08:00
Wei Jia
e17be8f3f5 SubtitleData: add Builder in SubtileData and TimedMetaData
Test: cts
Bug: 112549021
Change-Id: I5142f0d414931cd151f9377c328b7c3947ec0cfe
2018-12-04 17:07:40 -08:00
Dongwon Kang
11ed9e33c9 Merge "MediaPlayer2: have a CloseGuard copy for media mainline as package-private." 2018-12-05 00:30:51 +00:00
Lajos Molnar
8d57b6ca54 Merge "MediaFormat: add more getters, setters as well as iterators" 2018-12-05 00:10:54 +00:00
Eric Laurent
171dba2c12 Merge "Audio: add getters for port ID in AudioTrack and AudioRecord JNI" 2018-12-04 21:22:16 +00:00
Jeff Sharkey
33e70bd6d2 Stop indexing location metadata.
The new ACCESS_MEDIA_LOCATION permission is designed to protect
the location metadata of items the caller doesn't own, but we can't
easily perform partial filtering of metadata from returned Cursor
objects based on per-row ownership, so we're forced to outright stop
indexing and returning location metadata via queries.

Apps can still easily obtain location metadata using ExifInterface.

Bug: 111892141
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I4d99e6aa7d94bb0e7a50ce86eb1ab0f1ed142d4a
2018-12-04 13:17:09 -07:00
TreeHugger Robot
50f3bbde56 Merge "Update and fix Visualizer class docs" 2018-12-04 19:59:51 +00:00
Mikhail Naganov
ca6a9f8fef Update and fix Visualizer class docs
1) Fix the formula for the 'kth frequency' in getFft method:
   since the 'fft' array holds n / 2 frequencies ranging from
   0 to Fs / 2, the correct formula is k*Fs/n.
   Also fix the last frequency index in the table.

2) Move the sample code for calculating magnitudes and phases
   from the fft array from 'onFftDataCapture' to 'getFft', provide
   a link.

3) Fix the sample code which wasn't taking into account that
   fft[0] is the real part of FFT at DC, and fft[1] is the real part
   of FFT at Fs / 2. Improve the sample code by linking the variable
   names closer to the variable names in the documentation.

Bug: 113790190
Test: atest CtsMediaTestCases:VisualizerTest
Change-Id: I07cc9cfcda5b8c44aae2742a26173e7a9475120a
2018-12-04 17:36:40 +00:00
Jeff Sharkey
f660c012b0 Merge "Add support for "Audiobooks"." 2018-12-04 16:58:17 +00:00
Dongwon Kang
94eaad6470 MediaPlayer2: have a CloseGuard copy for media mainline as package-private.
Test: build
Bug: 112766913, Bug: 120419300
Change-Id: I3da443b0742a8459beab9860342ec8164aaa303b
2018-12-04 08:45:47 -08:00
Hyundo Moon
0852ebab41 AML: Make MediaSessionManager.createSession() as @SystemApi
Bug: 119749862
Test: make update-api
Change-Id: Ic3df0c3312c789130624fc42efc77ea3e1e01ad0
2018-12-04 16:52:46 +09:00
Chong Zhang
c13bfd871d Merge "Fix ExifInterface for .heic when meta is at the end" am: 98c9cd7b20 am: 17fc70b1ee
am: 79fa7d39c3

Change-Id: I33880ecff74ecdc2a60b0857b3cb8e8164232030
2018-12-03 19:37:53 -08:00
Chong Zhang
79fa7d39c3 Merge "Fix ExifInterface for .heic when meta is at the end" am: 98c9cd7b20
am: 17fc70b1ee

Change-Id: Ib3073cfac59888d707583efd9a9fda1d3731f103
2018-12-03 19:24:28 -08:00
TreeHugger Robot
3af0f3a7c3 Merge "Specify AudioTrack HWAVSync timestamp units as nanoseconds" 2018-12-04 02:49:33 +00:00
Eric Laurent
2dc5483936 Audio: add getters for port ID in AudioTrack and AudioRecord JNI
Add JNI functions to retrieve unique port IDs allocated by audio policy
manager for AudioTrack and AudioRecord clients.

Test: basic manual playback and capture tests
Bug: 111438757
Change-Id: I41f2679329b76b7b28cf506c64b6ffa9192d940a
2018-12-03 16:28:33 -08:00
Dean Wheatley
bff3dae809 Specify AudioTrack HWAVSync timestamp units as nanoseconds
Clarify the documentation by specifying the units of
the timestamp for the HWAVSync case

Bug: 63901775
Test: make
Change-Id: Ida39a3ee5e6b4b0d3255bfef95601890afd80709
2018-12-03 09:29:47 -08:00
TreeHugger Robot
5b101d1348 Merge "RingtoneManager: add @Nullable to openDefaultRingtoneUri()." 2018-12-03 15:00:39 +00:00
Robert Shih
cd0ee52248 Merge "MediaPlayer2: Move Drm APIs into DrmHandle subclass" 2018-12-01 04:29:34 +00:00
Dongwon Kang
0d8fe14ad7 RingtoneManager: add @Nullable to openDefaultRingtoneUri().
Bug: 120072398
Test: make update-api
Change-Id: I9fd43ac80f643fe81b4ed16d84b4253f19899c1c
2018-11-30 16:18:44 -08:00
Chong Zhang
317316fb2b Fix ExifInterface for .heic when meta is at the end
available() bytes is counted after the last read position,
after the seek to new position, size should be compared
with the avaliable directly (without adding position).

bug: 120086693
test: Open .heic files in Downloads/Photos that's either
very small (b/117625929, b/111897855), or with the meta
at the very end (b/120086693). There shouldn't be error
in ExifInterface.
Change-Id: I37ac57823b26f03bb0ba555ee6213cf999942d21
2018-11-30 15:37:03 -08:00
Lajos Molnar
ad9814849a MediaFormat: add more getters, setters as well as iterators
Add getters with default value.
Add numeric getters for arbitrary numeric format.
Add ability to enumerate and remove keys and feature keys.
Add copy constructor.
Add nullable annotations.

Bug: 112369509
Change-Id: Ifcb4ab7c4b3599aae5f6bf49001e9e8bb24b0a33
2018-11-30 13:32:00 -08:00
Jeff Sharkey
10887d5e5a Add support for "Audiobooks".
Bug: 113356944
Test: manual
Change-Id: Ifed54c41a533ed2d556dc6561ea498ec293991a6
2018-11-30 13:53:19 -07:00
Hyundo Moon
9a908db9f4 Rename KeyEvent.isMediaKey() to isMediaSessionKey()
Since not all KEYCODE_MEDIA_* keycodes return true in isMediaKey(),
the naming can give confusion. This CL renames the method to
isMediaSessionKey() and revises its Javadoc.

Bug: 119789707
Test: make -j
Change-Id: I36786ccf5606977e6d971c13d77d950356561bda
2018-11-30 13:54:32 +09:00
Robert Shih
488be992a4 MediaPlayer2: Move Drm APIs into DrmHandle subclass
Bug: 119675660
Test: MediaPlayer2DrmTest
Change-Id: I7a48ec1c2b4ba86752b12935b275140f03978495
2018-11-29 20:42:03 -08:00
TreeHugger Robot
5f0c9331cc Merge "Make AudioManager.FLAG_FROM_KEY as @SystemApi" 2018-11-30 04:03:30 +00:00
TreeHugger Robot
83fc1328d7 Merge "Commenting exit condition from read thread." 2018-11-30 00:16:14 +00:00
Paul McLean
0d8753073a Commenting exit condition from read thread.
Silence spurious exception error reporting.

Test: Run CTS and CTSVerifier Midi tests.
Bug: 114123487
Bug: 120225301

Change-Id: I82b13e563c30ba42e02625cfe57bd27897cb8035
2018-11-29 13:43:22 -07:00
TreeHugger Robot
04eaec037e Merge "MediaPlayer2: rename Media2DataSource to DataSourceCallback" 2018-11-29 16:27:21 +00:00
Hyundo Moon
888b791f29 Make AudioManager.FLAG_FROM_KEY as @SystemApi
Bug: 119790339
Test: make update-api
Change-Id: I649cd5cbf64274e5fe840eb773a450c3c581b210
2018-11-29 13:35:51 +09:00