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
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
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
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
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
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
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
Streams are dispreferred in Android java, so
use Lists for all cases instead.
Test: Mtp works and MtpStorageManager tests pass
Change-Id: I0579013fca690346c6c2561fe3079fd50f215833
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
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