Commit Graph

7108 Commits

Author SHA1 Message Date
Dichen Zhang
b4b95f70cd Merge "MediaPlayer2: directly pass AudioAttributes to AudioTrack without native parcel conversion" 2018-11-13 17:14:34 +00:00
TreeHugger Robot
1e15d4e5ca Merge "MediaPlayer2: clean up more code" 2018-11-13 08:48:36 +00:00
Jeff Tinker
ac91c6eb47 Merge "Add new offline management APIs to MediaDrm" 2018-11-13 07:03:35 +00:00
mtk33169
7d95b92bf6 Merge "The JE about "android.process.media" will pop up when you eject the SD card after you set SD as internel phone storage" am: 83269acba7 am: a10effa6d4
am: 51a8342f5f

Change-Id: If85027b1fe54aca707906f93ac231f723815d34b
2018-11-12 20:14:47 -08:00
mtk33169
51a8342f5f Merge "The JE about "android.process.media" will pop up when you eject the SD card after you set SD as internel phone storage" am: 83269acba7
am: a10effa6d4

Change-Id: Ibae7dcc2c76062b5a64a6d0825abafc8fa015eea
2018-11-12 19:52:47 -08:00
Wei Jia
e6aa52d631 MediaPlayer2: clean up more code
Test: cts
Bug: 112549021
Change-Id: I40789f7ed16e1659df816ccb334b306c324c6e17
2018-11-12 16:12:04 -08:00
Michael Dooley
4d75ccd328 Merge "Converting sound trigger v2.2 getModelState to be asynchronous" 2018-11-12 19:27:39 +00:00
Chong Zhang
86f9fc7cf2 Merge "Wait for IMediaCasService to be ready" 2018-11-12 18:45:43 +00:00
mtk33169
03ae44a8ff The JE about "android.process.media" will pop up when you eject the
SD card after you set SD as internel phone storage

This JE is happening due to null pointer access in makeEntryFor() in
MediaScanner.Java.
Before accessing the cursor, check if cursor is available and not null.
It is a safe check.

Bug: 119392250
Test: manual, ran test 20 times and it passed every times.
Change-Id: I23039281b63a0a6a411860eb5989cf20a5663c8f
2018-11-12 10:49:55 +00:00
Dongwon Kang
ee42cb2fc3 MediaPlayer2: remove AudioManager private API usage
Private API AudioManager.getDevicesStatic() is being used in
MediaPlayer2 for conversion between id <=> AudioDeviceInfo.
This conversion was added to talk with internal native AudioTrack API,
but in MediaPlayer2 since we will use public java AudioTrack API,
the given AudioDeviceInfo can be directly passed to java AudioTrack
instance.

Test: CtsMediaTestCases:android.media.cts.RoutingTest
Bug: 112767549
Change-Id: I03f01d17ef10e4edb074a160c877ca3aa711cbe1
2018-11-09 16:38:23 -08:00
Dichen Zhang
923a173627 MediaPlayer2: directly pass AudioAttributes to AudioTrack without native parcel conversion
the AudioAttribute jobject now is directly passed to AudioTrack without native parcel conversion.

Change-Id: Iafde2fd3d600dece1695520acbf20381dff1e330
Test: android.media.cts.MediaPlayer2Test, android.media.cts.RoutingTest
2018-11-09 10:48:14 -08:00
mike dooley
b2ab04aefd Converting sound trigger v2.2 getModelState to be asynchronous
Test: built android with checkbuild flag

Change-Id: I4c6f2388c93b6e577113fc7f2cd19242628ee50f
Bug-Id: 70206501
2018-11-09 08:36:15 +01:00
Jeff Tinker
55d26249e1 Add new offline management APIs to MediaDrm
bug:110838441
bug:117570956
bug:116252891

test: android.media.cts.MediaDrmClearkeyTest#testOfflineKeyManagement
      make offline-sdk-docs

Change-Id: I5561502c308fbdc2b669120c3c7e8c0544b13b59
2018-11-08 17:30:57 -08:00
Dichen Zhang
149fd05f63 Add/remove routing change listener support
Bug: 112549970
Test: android.media.cts.MediaPlayer2Test, android.media.cts.RoutingTest

Change-Id: Ib3e4f4040aa70b72b3c80d1b0cc39c0fab03a1d4
2018-11-08 10:26:56 -08:00
Wei Jia
6e827f0375 MediaPlayer2: change getVideoWidth and getVideoHeight to getVideoSize
Test: cts
Bug: 112549021
Change-Id: I9b68b7ada3f60db7eccc0eb919515ba6308dddea
2018-11-07 17:14:53 -08:00
Chong Zhang
1f03895106 Wait for IMediaCasService to be ready
bug: 119050069
Change-Id: Ice47a28b08e920435fbcd77219d2bfc1881dd48f
2018-11-06 19:18:23 -08:00
TreeHugger Robot
6d9ece3c0d Merge "MediaPlayer2: clean up part of code" 2018-11-07 02:30:58 +00:00
Wei Jia
3734500e17 MediaPlayer2: clean up part of code
Test: cts
Bug: 112549021
Change-Id: Ifb350d2417c2e63d81d84a20e95364d87b761815
2018-11-05 17:10:48 -08:00
TreeHugger Robot
ba52b2b24f Merge "Audio: Add Dolby MAT format" 2018-11-05 18:32:18 +00:00
Marco Nelissen
6d9ce04b15 Merge "Add key for sample rate and bits per sample" am: f7c4c728fc am: f4f1adbf8f
am: 2ed56610e8

Change-Id: Ifa36a12171a95a8c67240ba55ed6b682a045a3e8
2018-11-03 18:37:15 -07:00
Marco Nelissen
2ed56610e8 Merge "Add key for sample rate and bits per sample" am: f7c4c728fc
am: f4f1adbf8f

Change-Id: I64ceb88b1d7b40e8019fb11ce47307cf7c18df65
2018-11-03 18:21:30 -07:00
Mikhail Naganov
98dbab1bbb Audio: Add Dolby MAT format
Dolby MAT is a transport for encapsulating Dolby TrueHD access
units, channel-based PCM or object audio PCM. Dolby MAT's
primary use case is for HDMI transmission in which MAT is
encapsulated in IEC61937 frames as per IEC61937-9 specification.

Re-format switch / case indentation for modified switch statements
to satisfy new formatting rules.

Bug: 117566604
Test: make
Change-Id: I7c4f47e39a55bfbf13dfe401cf885dff858fa464
2018-11-02 15:13:49 -07:00
Daniel Bonnevier
56a9a6631a Add key for sample rate and bits per sample
Add new keys for sample rate and bits per sample.
This makes it possible to indicate the specification of
the music files on application.

Bug: 112986969
Test: Check if sample rate and bits per sample can be retrieved

Change-Id: Ie5a90800297a0a7c2dd6f3a2bdf9e88c9221bee1
2018-11-02 19:49:48 +09:00
TreeHugger Robot
1322fa1efe Merge "Allow apps to construct AudioPresentation object" 2018-11-01 23:24:56 +00:00
TreeHugger Robot
eb3d6d9d08 Merge "Use canonical order for audio formats, add missing conversions" 2018-11-01 21:12:22 +00:00
Wei Jia
40f1b94151 MediaPlayer2: async commands return token
Also make releaseDrm and restoreDrmKeys synchronous.
Test: cts
Bug: 112549021

Change-Id: I76485d8fd62499321391276189c3b21e6ce0da4c
2018-10-31 15:49:27 -07:00
Mikhail Naganov
5272e68cde Allow apps to construct AudioPresentation object
Added a Builder class to gather necessary parameters
for creating an AudioPresentation object.

Unhidden two getters--getPresentationId/getProgramId to keep API
symmetry.

Bug: 63901775
Test: android.media.cts.AudioPresentationTest
      android.media.cts.AudioTrackTest#testSetPresentationDefaultTrack
Change-Id: I5f4878973fcfd5e79494d2f530776f096713ac5f
2018-10-30 16:52:01 -07:00
Mikhail Naganov
0972565bb5 Use canonical order for audio formats, add missing conversions
Re-order audio formats in the "canonical" order of their
definition as public constants where needed.

Add missing conversions between format constants.

Test: make
Change-Id: I81b1bd625cc130df8ac06a585e9b51eafff76eb6
2018-10-30 16:07:53 -07:00
TreeHugger Robot
02bf047593 Merge "MediaPlayer2: make prepareDrm asynchronous only" 2018-10-28 01:16:42 +00:00
Wei Jia
1bb6c63e10 MediaPlayer2: make prepareDrm asynchronous only
Test: MediaPlayer2DrmTest
Bug: 112549021
Change-Id: I680f1d9e3d02635d1f90f73b4dc33359a8a4c7c7
2018-10-26 16:53:32 -07:00
Jeff Sharkey
ad2c7ac087 Move away from deprecated "_data" column.
As part of the new privacy work in Q, apps no longer have access to
raw filesystem paths, since they may live outside of the current
sandbox.  Instead, we need to use CR.openFileDescriptor().

Bug: 111960973
Test: builds, boots
Change-Id: I6e52a7dcb39850d9835183c44f5f638a5bf77202
2018-10-26 14:02:51 -06:00
Chong Zhang
87e5a5e051 Merge "Add keys to retrieve color aspects from metadata" am: 6636b0227d am: a2ec9e32c6
am: 194a3a7587

Change-Id: Ic37c9fa91cc637ec2ab61ea10afa8e928442d16f
2018-10-25 21:46:21 -07:00
Chong Zhang
d31872bc6a Merge "Color aspects keys information stored database" am: e4c918ba8e am: 89c615866a
am: e8c39f3ba0

Change-Id: I08c65f1b032fe92994202b64900cccc4f61adaef
2018-10-25 21:36:59 -07:00
Toshikazu Saito
5dfd47aacd Merge "Change caught exception in MediaScanner when ExifInterface is created" am: 0915931939 am: 544c774381
am: 92ccb271ce

Change-Id: If5c4f35573d0c73bf412b22406d04e70fba1f17c
2018-10-25 18:41:28 -07:00
TreeHugger Robot
bef47d02d5 Merge "DataSourceDesc: set max time in ms and us" 2018-10-25 22:11:19 +00:00
Wei Jia
f4d209cd36 DataSourceDesc: set max time in ms and us
Test: cts
Bug: 112549021
Change-Id: I1ff062a26be896c62500457da18ce3b5a869765a
2018-10-25 11:41:09 -07:00
Jean-Michel Trivi
8d32c45729 AudioTrack: fix javadoc
Bug: N/A
Test: make offline-sdk-docs
Change-Id: Ie2ebeddc477d5bd083280cfb91bd8c82e7047fb4
2018-10-25 09:30:37 -07:00
Chong Zhang
194a3a7587 Merge "Add keys to retrieve color aspects from metadata" am: 6636b0227d
am: a2ec9e32c6

Change-Id: I20dd7e842ae0a8172a188b4d1889daea759e14b2
2018-10-24 20:27:47 -07:00
Chong Zhang
e8c39f3ba0 Merge "Color aspects keys information stored database" am: e4c918ba8e
am: 89c615866a

Change-Id: Ida5168cf1cea927dd79a9c2bacee0a156af60b76
2018-10-24 20:22:18 -07:00
Chong Zhang
6636b0227d Merge "Add keys to retrieve color aspects from metadata" 2018-10-25 02:04:48 +00:00
Nathan Harold
41e2d7494f Merge "Move some members to the "Q blacklist"." am: f5cf9f24ed
am: 13c9e7e2f3

Change-Id: Ia2419cce28d26d9464da2a5172cb332b629e943e
2018-10-24 16:14:06 -07:00
Jean-Michel Trivi
03f51393d8 Offload support for android.media.AudioTrack
Unhide AudioManager method to query whether a given
  format can be offloaded on the device.
Unhide AudioTrack.Builder method to request offload.
Unhide callback for new AudioTrack events and
  associated methods.
Implement registration and callback for stream events.
JNI: configure native AudioTrack for offload.
Remove unused imports.

Bug 113352077
Bug 86837964
Test: "make offline-sdk-docs" and "adb shell clof --source /sdcard/Music/my.mp3"

Change-Id: I565668913076a57ea2c444f1f9268b21024ccde0
2018-10-24 16:10:04 -07:00
Chong Zhang
65a4a60827 Merge "Fix data source for HEIF exif extractor" am: 31bbb473ce
am: e655bf6d4b

Change-Id: I72f1593d281f3c9aca56d9cc87fe13b08c36316b
2018-10-24 16:04:34 -07:00
Toshikazu Saito
92ccb271ce Merge "Change caught exception in MediaScanner when ExifInterface is created" am: 0915931939
am: 544c774381

Change-Id: Ie3c04473e274b49b6c4bb7cb40f4d675453efd5c
2018-10-24 15:58:40 -07:00
TreeHugger Robot
2d8edbc953 Merge "audio: move private APIs to dark grey list" 2018-10-24 17:33:26 +00:00
Michael Dooley
0bf1666c51 Merge changes from topic "getmodelstate-redo"
* changes:
  Rolling forward with indentation fix.
  Revert "Revert "Adding getModelState API to sound trigger""
2018-10-24 06:04:42 +00:00
Eric Laurent
b3d8392d51 audio: move private APIs to dark grey list
Add proper @UnsupportedAppUsage annotation for the following methods:
- AudioTrack.getLatency().
- AudioSystm.getPrimaryOutputSamplingRate()
- AudioSystem.getPrimaryOutputFrameCount()

Bug: 112561552
Test: make
Change-Id: I8480ad4699ab530e0b83a00a0897756e676c3cda
2018-10-23 17:55:53 -07:00
Toshikazu Saito
26b3de310f Add keys to retrieve color aspects from metadata
Add keys to retrieve color standard, color transfer and color range from
MediaMetadataRetriever.

Bug: 114329709
Test: put hdr/non-hdr contents and check media db

Change-Id: Ifa90f12a572b330f87acd6ef06e1e83ddceb8483
2018-10-23 23:37:31 +00:00
Robert Shih
a553f3c600 Merge "MediaPlayer2: don't pass cookies to Media2HTTPService" 2018-10-23 22:32:28 +00:00
nobuhiko saitou
839cc00889 Color aspects keys information stored database
Add keys for color aspects to VideoColumns in MediaStore.
And standard, transfer and range is stored to database.

Bug: 114329709
Test: put hdr/non-hdr contents and check media db

Change-Id: Id4bf27a35720f5cf5a60f08eb3f30314e1a1a167
2018-10-23 22:03:30 +00:00