Commit Graph

7319 Commits

Author SHA1 Message Date
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
weichinweng
0de4adc7ca 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
Merged-In: I73f1236d44213c6cf4a2708f3c96144416cfa67d
2018-10-18 13:31:11 -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
Wei Jia
5cbdad4117 MediaPlayer2: skip consecutive seeks except last one
Test: cts
Bug: 112549021
Change-Id: I2a899f399956e14ffcde886156da1347c500d4b0
2018-10-10 17:28:16 -07:00
Dongwon Kang
c049bd26ea Add RingtoneManager.openDefaultRingtoneUri()
This enables a way for client to open ringtone cache from DE storage
area before user is unlocked.

Test: RingtoneManagerTest and MediaPlayer2Test
Bug: 112767549
Change-Id: Ica929f079dbc14f8541d92b5c9b9a0db502d3d64
2018-10-10 17:09:18 -07:00
TreeHugger Robot
f25495c51b Merge "Clarify use of initData in MediaCrypto constructor" 2018-10-10 21:09:04 +00:00
TreeHugger Robot
6d87cc49c5 Merge "Fix compilation warning on MediaDrm" 2018-10-10 19:59:48 +00:00
TreeHugger Robot
1929a72d57 Merge "MediaPlayer2: remove hidden oob subtitle/timed text APIs" 2018-10-10 17:13:57 +00:00
TreeHugger Robot
a1d5e0e921 Merge "MediaPlayer2: add Context to create MediaPlayer2" 2018-10-10 04:55:59 +00:00
Wei Jia
ae4ff743e7 MediaPlayer2: add Context to create MediaPlayer2
Test: cts
Bug: 112549021
Change-Id: I7eb4f5483f07a71d962bd447c20f765dd8f5bdf6
2018-10-09 15:19:25 -07:00
kopriva
b6093ae7bd Merge "docs: bug 37007350, missing word" into pi-dev am: 2f38a21898
am: fcc09fe17e

Change-Id: I8236f86a9a605c7d912a6f3cf61d30fa1b62e189
2018-10-08 19:18:37 -07:00
kopriva
fcc09fe17e Merge "docs: bug 37007350, missing word" into pi-dev
am: 2f38a21898

Change-Id: I3357eaa30229fb1831e42ae63ba8bef9fca1376e
2018-10-08 19:06:03 -07:00
kopriva
d104c81916 docs: bug 37007350, missing word
Test: make ds-docs

Bug: 37007350

Change-Id: Ibbff4232f67e7c955b182ff9f3b97250bb15c310
Exempt-From-Owner-Approval: Docs-only change
2018-10-08 15:24:21 -07:00
Jeff Tinker
6c174f848f Fix compilation warning on MediaDrm
getMaxSecurityLevel does not return an element of the
@SecurityLevel enumeration, it only returns SECURITY_LEVEL_MAX
which is unrelated. Remove the annotation.

bug:116746514
Change-Id: I1683c14b25f76df36c2287135af3940df6aff4a0
2018-10-05 11:28:30 -07:00
Jeff Tinker
46a5d76810 Clarify use of initData in MediaCrypto constructor
Documentation bug: MediaCrypto constructor doc is unclear

bug: 29094355
Change-Id: I6c723874c0a8705216913d680fe5318a8c585dd4
2018-10-05 10:02:27 -07:00
TreeHugger Robot
9f9c47db93 Merge "Check album art for video thumbnails." 2018-10-05 15:18:56 +00:00
TreeHugger Robot
314cf1174e Merge "MediaPlayer2: update javadoc" 2018-10-05 01:41:11 +00:00
kopriva
a7a1a152bc docs: bug 37127405, typo am: cce5e4f4a2
am: b0fdbca951

Change-Id: I0c5cf3c2c1cdced9c42709f55055c632624983b2
2018-10-04 16:56:44 -07:00
Wei Jia
d92e59985c MediaPlayer2: update javadoc
Test: compiles
Bug: 112549021
Change-Id: Ie889963a831be9bf39ddae157a21ea06d486d8a3
2018-10-04 16:52:09 -07:00