Commit Graph

6770 Commits

Author SHA1 Message Date
Chong Zhang
6636b0227d Merge "Add keys to retrieve color aspects from metadata" 2018-10-25 02:04:48 +00: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
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
Treehugger Robot
31bbb473ce Merge "Fix data source for HEIF exif extractor" 2018-10-23 17:36:33 +00: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
weichinweng
c91b0fdfeb Merge "AudioService: Add Hearing Aid Switch Control"
am: f3b7821fbd

Change-Id: I6abbbc268a8c391e2d400e7a9811ea0e04362bfc
2018-10-18 14:18:06 -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
Jeff Sharkey
f8ad474935 Merge changes from topic "bugfix_content_path"
am: aa642187cd

Change-Id: Ice15a2cffcaf96a370f8e73ebe0a25bdea67f1c3
2018-10-01 11:25:38 -07:00
nobuhiko saitou
436b7b5634 Add OEM_SOUNDS_DIR variable
Add OEM_SOUNDS_DIR variable
And add judgment of OEM_SOUNDS_DIR in isSystemSoundWithMetadata.

Test: build and check sound like ringtone etc
Bug: 79123178

Change-Id: Ib432910c7a99695e73c88480b7028be1c9d04702
2018-09-20 16:05:54 +09:00
Tomoharu Kasahara
96b6adc014 Merge "Convert AudioAttribute to Stream correctly for TTS"
am: 874e10f4a6

Change-Id: I52a610027d11574ab51cd83683de64ff2dddadfe
2018-09-11 13:35:21 -07:00
Treehugger Robot
874e10f4a6 Merge "Convert AudioAttribute to Stream correctly for TTS" 2018-09-11 19:26:56 +00:00
Tomoharu Kasahara
be0103c0a5 Convert AudioAttribute to Stream correctly for TTS
Add FLAG_BEACON for STREAM_TTS then use it for
conversion from AudioAttribute to stream type.

Bug: 113303490
Test: Use AudioAttributes.toLegacyStreamType

Change-Id: I7fa2b3f095437f8077545d1fff795bb0d8fe6b89
2018-09-11 20:21:59 +09:00
Par-Gunnar Hjalmdahl
96e68bc2e6 Convert AudioAttribute to Stream correctly
When converting an AudioAttribute with FLAG_SCO set, it should
be converted to STREAM_BLUETOOTH_SCO. However, since getFlags()
returns only public flags, and FLAG_SCO isn't public,
the conversion will fail. Change to getAllFlags() to get right
flags.

Bug: 113314374
Test: Use AudioAttributes.toLegacyStreamType

Change-Id: Ic283f055d746d5c3df645dc310c92dac3c80827f
2018-08-28 20:34:01 +09:00
Mathew Inwood
49e1c134af resolve merge conflicts of 2382108d01 to stage-aosp-master
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I28c80f9ecb1c04a09d1be78503a716d26f66aff4
Merged-In: I3bd40136d7fc948f66eca6b2d139c15e39c5a248
2018-08-20 11:29:16 +01:00
Mathew Inwood
473b9d5bfc Add @UnsupportedAppUsage annotations
For packages:
  android.media.tv
  android.media.soundtrigger
  android.media.session
  android.media.projection
  android.media.midi
  android.media.effect.effects
  android.media.effect
  android.media.browse
  android.media.audiopolicy
  android.media.audiofx
  android.media

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I9b58cb2d1e02d9156a7b0d19c1feff4bcd2c53a9
Merged-In: I3bd40136d7fc948f66eca6b2d139c15e39c5a248
2018-08-17 09:07:01 +01:00
Mathew Inwood
d9b640cbc2 Merge "Code reformatting for upcoming automated code changes."
am: 43f3f60ec0

Change-Id: Id11efe22dffc7edd46d5dc2244b7121f664fba4d
2018-08-16 16:56:06 -07:00
Treehugger Robot
43f3f60ec0 Merge "Code reformatting for upcoming automated code changes." 2018-08-16 07:45:35 +00:00
Mathew Inwood
3ef2a833ba Merge "Add @UnsupportedAppUsage annotations"
am: 9feefd2f5f

Change-Id: Id93bdaf74cf2e9077f3af8367189ae98e8a2f95a
2018-08-15 06:52:39 -07:00
Mathew Inwood
9feefd2f5f Merge "Add @UnsupportedAppUsage annotations" 2018-08-15 11:37:37 +00:00
Gerry Fan
293800c9c9 Merge "Add Nullable to MediaHTTPService's mCookies."
am: 7955aec0ea

Change-Id: Ic2073e516495b37d6e22867180eb687afebaf7f8
2018-08-14 20:19:50 -07:00
gfan
73371d7503 Add Nullable to MediaHTTPService's mCookies.
Bug: 29321867
Test: manually tested with ndk sample native-audio
Change-Id: Ic30fe7c28db0111ee5bcb91b037b7c4536dcfd06
2018-08-14 15:10:49 -07:00
Mathew Inwood
f82c47fc72 Merge "Add @UnsupportedAppUsage annotations" am: 3610ca221d
am: 72667caaa6

Change-Id: Ie078503a741307be16ce19587b6b29cf6fa32d01
2018-08-10 08:29:10 -07:00
Mathew Inwood
d237a74ff4 Add @UnsupportedAppUsage annotations
For packages:
  android.service.wallpaper
  android.service.vr
  android.service.voice
  android.service.trust
  android.service.textservice
  android.service.restrictions
  android.service.resolver
  android.service.quicksettings
  android.service.power
  android.service.pm
  android.service.persistentdata
  android.service.oemlock
  android.service.notification
  android.service.media
  android.service.gatekeeper
  android.service.fingerprint
  android.service.euicc
  android.service.dreams
  android.service.diskstats
  android.service.chooser
  android.service.carrier
  android.service.battery
  android.service.autofill
  android.service.appwidget
  android.service

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I50fb66b55bbc82cc505b483c98f8bd09ae0b5020
Merged-In: I51645d8a8cdce3015749fc27e34830e822ef41ae
2018-08-10 09:58:47 +01:00
Mathew Inwood
c97c5c04f1 Add @UnsupportedAppUsage annotations
For packages:
  android.mtp

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I6af7c9405b0ac3c2d30307dd04d6d330cd22bda4
Merged-In: Id97d70dc1003cd7c6ed585d647bf0df0fd7a946a
2018-08-09 17:29:53 +01:00
Mathew Inwood
a44c098996 Code reformatting for upcoming automated code changes.
Adding annotations to individual fields cannot be easily done when there
are two fields defined in a single statement. Put each definition in a
statement of its own.

See go/UnsupportedAppUsage for more context.

Bug: 110868826
Test: m
Change-Id: I7c521973bd8856414b2d2e39573d887e426c69fc
2018-08-08 15:25:51 +01:00
Robert Shih
deb8dbad23 Merge changes from topic "am-9e4fa925-b00a-40e6-8fb0-e5a4244e6284" into oc-dev am: e43837e258 am: dccb62bcca am: 64cb4be887
am: c450d1401e

Change-Id: I7aba9ed971773ac2ea8cc7df5fe42ed9c022a5ab
2018-07-16 13:58:38 -07:00
Robert Shih
c450d1401e Merge changes from topic "am-9e4fa925-b00a-40e6-8fb0-e5a4244e6284" into oc-dev am: e43837e258 am: dccb62bcca
am: 64cb4be887

Change-Id: Id7d4599c5d7d7c803e86afa88be582773c80741f
2018-07-16 13:38:43 -07:00
Robert Shih
64cb4be887 Merge changes from topic "am-9e4fa925-b00a-40e6-8fb0-e5a4244e6284" into oc-dev am: e43837e258
am: dccb62bcca

Change-Id: I9e6762b25f001e31da7df0bb25984856989b9fd9
2018-07-16 13:13:13 -07:00
Robert Shih
dccb62bcca Merge changes from topic "am-9e4fa925-b00a-40e6-8fb0-e5a4244e6284" into oc-dev
am: e43837e258

Change-Id: Ib0ef741f0188ff3e6edc52e20eae997e9dba56e4
2018-07-16 12:51:28 -07:00
Chong Zhang
741bcbee62 Merge "Fix broken javadoc link in MediaFormat" into pi-dev
am: 15ae72085f

Change-Id: Id7af6bea28f60e93ce1a1cce94f053b9484ceb37
2018-07-16 12:25:32 -07:00
Android Build Merger (Role)
7b414ce710 [automerger] Fix TrackInfo parcel write am: 0d2dc943dc am: 00b57fc9b7 am: 1bce1217ca am: 47c831e675 am: d6143e9307
Change-Id: I67d3d47cf3ba616d8b8d963d7092895621f63200
2018-07-13 06:57:21 +00:00
Android Build Merger (Role)
47c831e675 [automerger] Fix TrackInfo parcel write am: 0d2dc943dc am: 00b57fc9b7 am: 1bce1217ca
Change-Id: I29f00c9b6dca76c5b780d659d122e08a0d7e581c
2018-07-13 06:57:08 +00:00
Android Build Merger (Role)
1bce1217ca [automerger] Fix TrackInfo parcel write am: 0d2dc943dc am: 00b57fc9b7
Change-Id: Ida72e9fed175aa9497af5c5f607640c07cb04cf5
2018-07-13 06:57:02 +00:00
Android Build Merger (Role)
00b57fc9b7 [automerger] Fix TrackInfo parcel write am: 0d2dc943dc
Change-Id: I7ea941c8cffa147d2c6a46f0428899bf001a2672
2018-07-13 06:56:56 +00:00
Robert Shih
0d2dc943dc Fix TrackInfo parcel write
Bug: 77600398
Change-Id: Ia316f1c5dc4879f6851fdb78fe8b9039579be7bc
2018-07-12 23:56:38 -07:00
Chong Zhang
55135d5d5f Fix broken javadoc link in MediaFormat
bug: 74979696
Change-Id: I83965f3d1d395cb0953da9605b27861a1d84cde7
2018-07-09 11:39:35 -07:00
Marco Nelissen
7a72844fd5 Merge "Fix race condition in MediaHTTPConnection" into pi-dev
am: d7c87b74d9

Change-Id: I65de507c2b98b81a25141994baba38831aea9142
2018-06-20 15:28:32 -07:00
Marco Nelissen
d4f64f27b0 Fix race condition in MediaHTTPConnection
getSize() and getMIMEType() rely on seekTo() having completed.
If seekTo() was called on a different thread, for example because
NuCachedSource2 was doing reads on a background thread, getSize()
could return -1 if it was called after connection was established,
but before the response had been parsed.

Bug: 110230427
Test: manual
Change-Id: I469b47e025f1c7a7ef3123d3347668f0541e6f2d
2018-06-20 07:42:05 -07:00
Robert Shih
ef157649d5 Merge "MediaCodec.CryptoInfo: expose subsample encryption pattern" into pi-dev
am: e3348a2593

Change-Id: I6eaaabc353304ee29aa677bf03d94384ddede51c
2018-05-30 11:13:45 -07:00
Robert Shih
e3348a2593 Merge "MediaCodec.CryptoInfo: expose subsample encryption pattern" into pi-dev 2018-05-30 17:43:58 +00:00
Robert Shih
97825a4fd0 MediaCodec.CryptoInfo: expose subsample encryption pattern
Bug: 31215085
Test: com.google.android.media.gts.WidevineMp4TempTests
Change-Id: I6965adc646684053633530e39258b171724b34bc
2018-05-25 17:44:56 -07:00
Jaewan Kim
0349869c06 Merge "Differentiate MediaBrowsers in a process for MediaBrowserService" into pi-dev
am: 0e7a307e14

Change-Id: I455466d79d0c1b534d87b33cdb787194422a51bf
2018-05-24 12:39:29 -07:00
Daisuke Teranishi
2e92e5c30b Merge "Use correct filename when adding to ringtone" am: daff857ffd
am: 24062f05d3

Change-Id: Id9d89491c5604b1611b22f215827f55de98f8ac2
2018-05-24 12:18:14 -07:00
TreeHugger Robot
0e7a307e14 Merge "Differentiate MediaBrowsers in a process for MediaBrowserService" into pi-dev 2018-05-24 09:59:28 +00:00
Daisuke Teranishi
ce4d67b6d0 Use correct filename when adding to ringtone
If the title of the music file includes "/", it's recognized
as a directory separator.
Use correct filename to select the file properly.

Bug: 80202253
Test: Add mp3 which title includes "/" to ringtone

Change-Id: I9bb05f6fe2d7d4dbbdf4f67db7ac6fde04707979
2018-05-24 11:39:33 +09:00
Ajay Panicker
d8e8126abe Merge "Add field to set A2DP device volume on connect (1/2)" into pi-dev 2018-05-23 18:58:28 +00:00
Eric Laurent
3e6fb63090 Add field to set A2DP device volume on connect (1/2)
Add a field to setBluetoothA2dpDeviceConnectionStateInt() to allow
Bluetooth to set a volume for the new device when it connects.

Bug: 79529581
Test: Switch repeatedly between devices and see that the old volume isn't
used on the new device or the new volume isn't used on the old device.
Change-Id: I909fa3f40818c595fc977695fbfa1214f9a4de72
2018-05-23 17:24:55 +00:00