This change adds support for privileged apps with the MODIFY_PHONE_STATE
permission to mute the bluetooth sco stream using the adjustStreamVolume
method.
The change adds specific handling for BLUETOOTH_SCO as a mutable stream.
Bug: 111195322
Test: Mute works by AudioManager.adjustStreamVolume
(STREAM_BLUETOOTH_SCO, ADJUST_MUTE, 0)
Change-Id: I932f9e152e9b6df93a749b083a7bcc7e08c2ad70
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.
Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.
For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.
Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.
Bug: 115609023
Test: m
Change-Id: Ia937d8c41512e7f1b6e7f67b9104c1878b5cc3a0
Merged-In: I020a9c09672ebcae64c5357abc4993e07e744687
Everything that is marked SystemApi or TestApi, but not @hide is still
part of the public SDK, it is therefore not sound to have that combination.
In the future, specifing such a combination will be considered an error
to prevent inadvertently exposing SystemApi and TestApi as public API.
Bug: 115333477
Change-Id: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Merged-In: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Test: METALAVA_PREPEND_ARGS="--error UnhiddenSystemApi" m checkapi
Exempt-From-Owner-Approval: API cleanup
available() bytes is counted after the last read position,
after the seek to new position, size should be compared
with the avaliable directly (without adding position).
bug: 120086693
test: Open .heic files in Downloads/Photos that's either
very small (b/117625929, b/111897855), or with the meta
at the very end (b/120086693). There shouldn't be error
in ExifInterface.
Change-Id: I37ac57823b26f03bb0ba555ee6213cf999942d21
The libnativehelper ScopedBytes class is being deprecated. It's use in
android_media_AudioTrack.cpp is unnecessary because the JNI method
takes a direct buffer as an argument whereas ScopedBytes classes exist
to mask the difference between byte arrays and byte buffers.
Bug: 119840313
Test: m -j32
Change-Id: I2a6478dbaa861c5391cc298871df0f8cd1f1439c
SD card after you set SD as internel phone storage
This JE is happening due to null pointer access in makeEntryFor() in
MediaScanner.Java.
Before accessing the cursor, check if cursor is available and not null.
It is a safe check.
Bug: 119392250
Test: manual, ran test 20 times and it passed every times.
Change-Id: I23039281b63a0a6a411860eb5989cf20a5663c8f
Add new keys for sample rate and bits per sample.
This makes it possible to indicate the specification of
the music files on application.
Bug: 112986969
Test: Check if sample rate and bits per sample can be retrieved
Change-Id: Ie5a90800297a0a7c2dd6f3a2bdf9e88c9221bee1
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
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
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)
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
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
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
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
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
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
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I28c80f9ecb1c04a09d1be78503a716d26f66aff4
Merged-In: I3bd40136d7fc948f66eca6b2d139c15e39c5a248
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
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
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
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