Commit Graph

7085 Commits

Author SHA1 Message Date
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
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
Michael Dooley
291751e510 Revert "Revert "Adding getModelState API to sound trigger""
This reverts commit 81f71f1c27.

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 8c854f86a4)
2018-10-22 17:28:24 -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
TreeHugger Robot
a354de4c96 Merge "Clarify getMaxSecurityLevel in MediaDrm java doc" 2018-10-18 23:01:24 +00:00
weichinweng
5f86ce578c Merge "AudioService: Add Hearing Aid Switch Control" am: f3b7821fbd am: c91b0fdfeb
am: 4ee1409540

Change-Id: I62ae26865245023e7f28d2964d876031e6c19d07
2018-10-18 14:54:21 -07:00
weichinweng
4ee1409540 Merge "AudioService: Add Hearing Aid Switch Control" am: f3b7821fbd
am: c91b0fdfeb

Change-Id: If26a9b0c561a8ba8da761aaba634d705e063f315
2018-10-18 14:38:10 -07:00
weichinweng
c91b0fdfeb Merge "AudioService: Add Hearing Aid Switch Control"
am: f3b7821fbd

Change-Id: I6abbbc268a8c391e2d400e7a9811ea0e04362bfc
2018-10-18 14:18:06 -07:00
Dongwon Kang
2bb45aa869 MediaPlayer2: add fallback logic for ringtone default actual uri.
Also, private API, getAuthorityWithoutUserId(), usage is replaced
with RingtoneManager.getDefaultType(). The code is using authority
to check if the uri is ringtone default uri, but it can be also checked
with getDefaultType() since it returns -1 for non ringtone default uri.

Test: MediaPlayer2Test
Bug: 112767549
Change-Id: I4c41314364e8bc398ffe75cb0ecc20a06a4502c8
2018-10-18 09:41:14 -07:00
weichinweng
c30a3e8d1c AudioService: Add Hearing Aid Switch Control
1) Add setBluetoothHearingAidDeviceConnectionState interface to control
suppressNoisyIntent flag.
2) Add check to confirm the previous device is active or not when want
to clean it.

Bug: 112279820
Test: Build Pass, BT off/on when play A2DP, Switch active device
Change-Id: I73f1236d44213c6cf4a2708f3c96144416cfa67d
2018-10-18 07:28:39 +08:00
Wei Jia
2a1407a747 MediaPlayer2: pass positions to native
Test: cts
Bug: 112549021
Change-Id: I7576611f94f6538bbb96b95d44cb1d9624c77710
2018-10-17 14:32:05 -07:00
Dongwon Kang
edf4d2275d Merge "Add RingtoneManager.openDefaultRingtoneUri()" 2018-10-17 17:40:33 +00:00
Dongwon Kang
bfe89a9927 Merge "MediaPlayer2: remove hidden api, setMetadataFilter and getMetadata" 2018-10-17 02:28:15 +00:00
Dichen Zhang
3cb7afb2c4 Merge "setVolume() function using single input Test: run CTS" 2018-10-16 17:09:12 +00:00
TreeHugger Robot
65182e5171 Merge "Revive ApiLoader to enable updatable apk on Media2 APIs" 2018-10-16 02:54:36 +00:00
Insun Kang
1667faa4ca Revive ApiLoader to enable updatable apk on Media2 APIs
Bug: 117107246
Test: build

Change-Id: I788958b42d8da6c8aa5d105e03eeb6a3be43e6dc
2018-10-16 11:52:14 +09:00
Dichen Zhang
e7db7ef15e setVolume() function using single input
Test: run CTS

Change-Id: Ib06fb92feb6202e867aee790f5ef793a40448e07
2018-10-15 12:15:05 -07:00
TreeHugger Robot
f52fe5feed Merge "ExifInterface: Fix checking possible overflow" 2018-10-12 14:53:20 +00:00
TreeHugger Robot
8025b01ebc Merge "MediaPlayer2: skip consecutive seeks except last one" 2018-10-12 01:53:14 +00:00