13573 Commits

Author SHA1 Message Date
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
TreeHugger Robot
36e0320cf9 Merge "MediaPlayer2: remove libnetd_client dependency." 2018-11-03 06:46:40 +00:00
Dongwon Kang
354eb38f58 Merge "MediaPlayer2: remove unused libraries." 2018-11-02 22:51:20 +00: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
6f78be2b03 Merge "annotate intentional fallthroughs in switch()" 2018-11-02 01:38:36 +00:00
Dongwon Kang
a6e29ae210 MediaPlayer2: remove libnetd_client dependency.
Test: build
Bug: 112767419
Change-Id: Ib7f8535ee3074c6ce4c5c609a80f8230ea3d68e2
2018-11-01 17:41:50 -07:00
Dongwon Kang
fc676fe538 MediaPlayer2: remove unused libraries.
Test: build
Bug: 112767419
Change-Id: I40a2afcce027007d887afe1a9d0fcc234f3e4298
2018-11-01 16:32:47 -07:00
TreeHugger Robot
1322fa1efe Merge "Allow apps to construct AudioPresentation object" 2018-11-01 23:24:56 +00:00
Ray Essick
67004bc46d annotate intentional fallthroughs in switch()
also disable the temporary 'suppress the warning' flags

Bug: 118756460
Test: compilation
Change-Id: Iefeb66be13099021940ec8bce2515c62052b9304
2018-11-01 15:25:23 -07: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
Chih-hung Hsieh
51025d638d Merge "Allow implicit-fallthrough warnings locally." am: 36afe11a64 am: 9c5738238d
am: 469705cca4

Change-Id: I4bc5f389495ed535762438632e65ccd6c66f3739
2018-10-25 17:58:17 -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
Chih-hung Hsieh
469705cca4 Merge "Allow implicit-fallthrough warnings locally." am: 36afe11a64
am: 9c5738238d

Change-Id: I0a8803682ec00a85583bb82e0505335318571a2d
2018-10-24 15:24:23 -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
Nathan Harold
f5cf9f24ed Merge "Move some members to the "Q blacklist"." 2018-10-23 21:53:51 +00:00
Robert Shih
cf0f26974e MediaPlayer2: don't pass cookies to Media2HTTPService
Bug: 109928575
Test: MediaPlayer2Test#testPlayVideoWithCookies
Change-Id: Iba853e5bfd7e6a28615feb15f4d975fedecdc6a9
2018-10-23 11:45:32 -07:00
Treehugger Robot
31bbb473ce Merge "Fix data source for HEIF exif extractor" 2018-10-23 17:36:33 +00:00
Treehugger Robot
0915931939 Merge "Change caught exception in MediaScanner when ExifInterface is created" 2018-10-23 17:36:33 +00:00
Michael Dooley
291751e510 Revert "Revert "Adding getModelState API to sound trigger""
This reverts commit 81f71f1c27b7e877babe1f3293ac00256a66980c.

Reason for revert: rolling forward with fix

Change-Id: Ifc0c53581ac567cb968d91993f453220f8253aec
2018-10-23 07:44:51 +02:00
Mathew Inwood
45d2c252b1 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
Merged-In: I719b5c94e5b1f4fa562dd5d655953422958ad37e
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
(cherry picked from commit 8c854f86a477fbbee38092f449333e1425e5cd7e)
2018-10-22 17:28:24 -07:00
Chih-Hung Hsieh
e8abd06776 Allow implicit-fallthrough warnings locally.
It will be a global error by default.

Test: make checkbuild
Bug: 112564944
Change-Id: I26616fd50ccf3639fa7c01d850a14d079273ede7
Exempt-From-Owner-Approval: do not block on new warnings
2018-10-22 09:56:12 -07:00
Chong Zhang
f2b041dce0 Fix data source for HEIF exif extractor
Do not allow the source to read past available bytes, since
the underlying input stream may not be able to seek after that.

For input streams from files, the available bytes is usually the
file size, and we usually don't have problem when the file is
of decent size. But when the file is very small, some of the
extractors (other than mp4) would request bytes past the end
of the file, which goes over the available range. Once that
condition is hit, we can't reset to the offet needed for
mp4 extractor and heif parsing would fail.

bug: 111897855
bug: 117625929
test: open heic files of various sizes in Files (Downloads) app,
check that ExifInterface shouldn't encounter any exceptions.

Change-Id: I668ff900f4155dc310cb7ea8977bbe091791c5d7
2018-10-22 16:02:33 +00:00
Toshikazu Saito
a74c77991a Change caught exception in MediaScanner when ExifInterface is created
Some HEIF content happens RuntimeException in ExifInterface because
sniff is failed and MediaExtractor is not found. If exception happens,
scanning is aborted. So all contents may not be registered to database
correctly. To avoid that, this fix changes caught exception from
IOException to Exception for creating ExifInterface.

Bug: 117625929
Test: put some HEIF contents and check on photos

Change-Id: I6d32dec27c3be13993ec08f92d567b772d03ace9
2018-10-22 09:25:43 +00:00
James Wei
f7f608ccc3 MTP: media info can not be retrieved via MTP
Under the new MtpStorageManager design of Android P,
media info like MP3 Track title, album and artist, Genre, etc
can not be retrieved via MTP
by Windows Media Player, Linux Rhythmbox and BMW Car Kit

Bug: 112635346
Test: Windows Media Player
Test: Linux Rhythmbox

Change-Id: Ibbdaff52a24fa36c6090e799323b767dd5692207
(cherry picked from commit 7784da12b9b3394beb791b16befcd33075668270)
2018-10-22 02:16:28 +00:00