Commit Graph

6925 Commits

Author SHA1 Message Date
Gerry Fan
4f8c0a3d2b Merge "Add Nullable to MediaHTTPService's mCookies." am: 7955aec0ea am: 293800c9c9
am: d8a13d8215

Change-Id: Ibde8fec798d965ac6a2ecaf297008f93439f1419
2018-08-15 04:43:45 -07:00
Mathew Inwood
217f30b3a4 Merge "Add @UnsupportedAppUsage annotations" 2018-08-15 10:03:53 +00:00
Jeff Sharkey
d4be638911 Merge "Change MEDIA_TYPE through Files table." 2018-08-15 04:14:28 +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
Jeff Sharkey
fac57e600d Change MEDIA_TYPE through Files table.
As part of implementing strongly-typed storage in the Q release, we've
needed to limit the items visible in strongly-typed views.  (For
example, the Images view must only include images.)

This change fixes a place inside the OS that was implicitly relying on
update() leaking between these strong data types.  If we're changing
the media type of an already-scanned file, we need to do that through
the Files table first, and then we can update the details at the
strongly-typed Uri.

Bug: 112467162
Test: atest android.media.cts.MediaScannerTest
Change-Id: I61c8b62e04f6542882745a20e9aed96275427b5f
2018-08-14 15:07:32 -06:00
Wei Jia
7f0e9e3dfe MediaPlayer2: add MEDIA_INFO_DATA_SOURCE_REPEAT
Test: cts
Bug: 109928575
Change-Id: Id628d88f3115e034d6d17523399ecb3f6a9bd249
2018-08-10 17:35:15 -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
e3807372f7 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: I51645d8a8cdce3015749fc27e34830e822ef41ae
2018-08-10 09:51:03 +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
d99b96e0f8 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: Id97d70dc1003cd7c6ed585d647bf0df0fd7a946a
2018-08-09 17:22:11 +01:00
Ari Hausman-Cohen
971cac75f7 Merge changes from topic "dynamic_stream_effects_master"
* changes:
  Add Dynamic Stream Effects
  Add permission for dynamic AudioEffect attachment
2018-08-02 23:10:52 +00:00
TreeHugger Robot
f15bbe2e8d Merge "MediaPlayer2: fix MEDIA_INFO_DATA_SOURCE_* events" 2018-08-01 17:57:07 +00:00
Wei Jia
08827e4b9a MediaPlayer2: fix MEDIA_INFO_DATA_SOURCE_* events
Test: cts test
Bug: 109928575
Change-Id: Id333c9447f3621147afff21ee375340e0e6be5ce
2018-07-31 17:05:13 -07:00
Jeff Tinker
17716ac974 Fix typo in MediaDrm.java
bug:78248792
Change-Id: I584762c2b2febb4abf05361062bdd3d7d78f49e7
2018-07-30 15:21:22 -07:00
Wei Jia
de9c74d0f4 MediaPlayer2: clean up setNextDataSource/s
Test: cts tests
Bug: 109928575
Change-Id: I3e8c0113b35d8b5f4e95ef3748d056aa3b162038
2018-07-27 15:29:01 -07:00
Ari Hausman-Cohen
7d54c5d838 Add Dynamic Stream Effects
Adds support for adding/removing effects to the list of
default effects for a given stream usage.

Bug: 78527120
Test: Builds, manually tested with app that adds stream effects,
additionally tested by Android Things integration tests making use
of this API.
Change-Id: I9fc262260c08046e59d57710ee2028499b0c2b94
2018-07-27 12:41:47 -07:00
TreeHugger Robot
306afa8652 Merge "Fix data source for HEIF exif extractor" 2018-07-27 02:16:42 +00:00
Chong Zhang
c139d46910 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
test: open heic files of various sizes in Files (Downloads) app,
check that ExifInterface shouldn't encounter any exceptions.

Change-Id: I668ff900f4155dc310cb7ea8977bbe091791c5d7
2018-07-26 17:01:28 -07:00
Jaewan Kim
4f5e805907 MediaSessionManager: Prevent volume keys from being ignored
When the volume key is pressed and the foreground activity doesn't
handle the event, the foreground activity tells the MediaSessionService
for adjusting system volume with its package name returned by
Context#getPackageName().

However, if the foreground process runs on another application's process
by specifying android:process in the AndroidManifest.xml. (e.g.
ApnSettingsActivity in the Settings), its package name wouldn't match
with the UID returned by the Binder.getCallingUid(). Because of the
mismatch, the app ops check in the AudioService will fail and
SecurityException will be thrown.

This fixes the issue by two ways
  1. Use Context#getOpPackageName() for sending package name.
  2. Use system service's package name and UID when adjusting volume
     with the hardware volume key presses.

Bug: 110525559
Test: Verified manually that the issue doesn't happen.
      And run all media CTS
Change-Id: I8bba691a36cbe442212aab3f0b23c97533009052
2018-07-25 08:58:23 +00:00
TreeHugger Robot
bd2a8811f3 Merge "Replace streams with Lists in MtpStorageManager" 2018-07-25 06:16:27 +00:00
TreeHugger Robot
cc74108336 Merge "Update Dolby surround sound display names" 2018-07-19 23:31:35 +00:00
Jerry Zhang
9a018747be Replace streams with Lists in MtpStorageManager
Streams are dispreferred in Android java, so
use Lists for all cases instead.

Test: Mtp works and MtpStorageManager tests pass
Change-Id: I0579013fca690346c6c2561fe3079fd50f215833
2018-07-16 18:21:47 -07:00
Robert Shih
507537ee16 Merge changes from topic "am-9e4fa925-b00a-40e6-8fb0-e5a4244e6284" into oc-dev am: e43837e258 am: dccb62bcca am: 64cb4be887 am: c450d1401e
am: deb8dbad23

Change-Id: I15c3a600ff4e4802254bb41d4903eec10583febc
2018-07-16 14:20:21 -07: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
71ffe730af Merge "Fix broken javadoc link in MediaFormat" into pi-dev am: 15ae72085f
am: 741bcbee62

Change-Id: I87362a09b014b48ca1d8317d59bd355064cb463f
2018-07-16 12:33:46 -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
Dean Wheatley
1ba2d5ea79 Update Dolby surround sound display names
Bug: 63901775
Test: make
Change-Id: I27b969067c210c1684cbc53db3fade6175795498
2018-07-13 14:22:51 -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
Wei Jia
80f59318d2 MediaPlayer2: skip commands when in error state
Test: cts
Bug: 109928575
Change-Id: I1b2d4a2336e09856ed4ffba15f8c47577101c4b5
2018-07-12 14:52:06 -07:00
TreeHugger Robot
102dc30c29 Merge "MediaPlayer2: clean up setDataSource" 2018-07-11 17:52:31 +00:00
Wei Jia
67d1dd8439 MediaPlayer2: clean up setDataSource
Test: cts
Bug: 109928575
Change-Id: Ib50e99599e8c27c9d9c9340e0517bd81a4e6b2d2
2018-07-10 14:26:28 -07:00
Chong Zhang
55135d5d5f Fix broken javadoc link in MediaFormat
bug: 74979696
Change-Id: I83965f3d1d395cb0953da9605b27861a1d84cde7
2018-07-09 11:39:35 -07:00
Dake Gu
50b816222e TvInputManager: fix leaking Context when failed create Session
If TvInputManagerService fails and returns null token, TvInputManager
does not create a Session object, so the onSessionReleased() will not
be executed. mSessionCallbackRecordMap does not clear the entry
in this case.

Bug: 110959874
Test: Create a TVView, call tune() with invalid id, run adb shell
      dumpsys meminfo and check activity count is not leaking.
Change-Id: Id0c81a99cb222bac98778e5d494ebd8665cf950f
2018-07-06 17:55:04 +00:00
Wei Jia
726db8c9a3 MediaPlayer2: merge EventHandler with TaskHandler
Test: cts
Bug: 109928575
Change-Id: I0de22e4730dcb187194d72bf912013d5ad5a48ad
2018-07-03 16:57:38 -07:00
Wei Jia
ba145fec56 MediaPlayer2: move SubtitleData listener into EventCallback
Rename onMediaTimeChanged to onMediaTimeDiscontinuity
Remove stop
Test: MediaPlayer2Test
Bug: 109928575

Change-Id: I7e81a3255360fe780f07d8478634a4a41935db8c
2018-07-02 18:12:42 -07:00
TreeHugger Robot
576150623c Merge "MediaPlayer2: remove inheritance on MediaPlayerBase" 2018-06-22 05:52:26 +00:00
Wei Jia
e1b48b6534 MediaPlayer2: remove inheritance on MediaPlayerBase
rename getMediaPlayer2State to getState
Test: MediaPlayer2Test
Bug: 109928575
Change-Id: I93c1b645bfe2a8be55e41fb07e6ecd9c60155258
2018-06-21 16:29:12 -07:00
TreeHugger Robot
f0ac738a21 Merge "AudioManager: javadoc update for volume methods" 2018-06-20 22:55:58 +00:00
Marco Nelissen
a41654c583 Merge "Fix race condition in MediaHTTPConnection" into pi-dev am: d7c87b74d9
am: 7a72844fd5

Change-Id: Ie8a4a2ec2c6df33aba1d48d0b89f400a75c1233d
2018-06-20 15:40:22 -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
TreeHugger Robot
dc48c4bcaa Merge "MediaPlayer2: rename MediaPlayer2EventCallback to EventCallback" 2018-06-20 01:25:14 +00:00