A corrupted image file may create two problems.
1. A corrupted IFD pointer may point to an IFD that has already
been read, thus creating an infinite loop and a stack overflow.
2. A corrupted IFD offset value may have a negative value, thus
prompting a random reading of the file and creating an infinite
loop.
This CL addresses these issues.
Bug: 63800695
Test: Run cts (ExifInterfaceTest)
Change-Id: I706a0c3eae6af8301af69407333ea88e5681df3c
Source of deadlock between PlayerBase.mLock and
PlaybackActivityMonitor.mPlayerLock:
android.media.MediaPlayer.release()
> android.media.PlayerBase.baseRelease()
> synchronized (mLock)
> com.android.server.audio.PlaybackActivityMonitor.releasePlayer()
> synchronized(mPlayerLock)
and:
com.android.server.audio.PlaybackActivityMonitor.unmutePlayersForCall()
> synchronized (mPlayerLock)
> android.media.PlayerProxy.setVolume()
> android.media.PlayerBase$IPlayerWrapper.setVolume()
> android.media.PlayerBase.baseSetVolume()
> synchronized (mLock)
playerSetVolume()
Since system_server can have its own players, the calls to
AudioService from PlayerBase can be synchronous, hence the
deadlock.
The fix consists in never holding the lock in PlayerBase
while calling into AudioService.
Refactor the playstate update into a method used for
start / stop / pause.
Bug: 72294559
Test: see bug
Change-Id: I6451aa3bf19a0365472ba007b116a9e6151ab33e
Use the heif embedded thumbnail as long as it's not
too small to avoid decoding the full image and downscale.
bug: 74395267
Test: CTS MediaMetadataRetriever test; manual test of thumbnail
extraction by browsing new folders containing heif files in
Downloads app.
Change-Id: I5b2be0521452376153a773cb7671fefe7f9bc439
For microphone enumeration APIs, it could fail due to hal v2,
which is WAI. We shouldn't log as error. Using warning instead.
Bug: 64038649
Test: build
Change-Id: I1a64b8537e27e712a09f122d4763e0e5a345b08f
The mic enumeration APIs only support on audio hal v4. Marlin failed due
to on audio hal v2. Make the APIs return mic with unknown
characteristics if the native call fail.
Bug: 77732156
Bug: 77732289
Test: run cts on marlin and walleye
Change-Id: I64b3e6a249ad76b754e841d630e8cf178dde9a86
In the native audio policy management, the default stream type
for volume is STREAM_MUSIC, i.e. any player by default is
considered a "media" player. Do the same for audio attributes
with regards to suppressible behaviors.
Bug: 74052135
Test: ZenModeHelperTest + see bug
Change-Id: I8f65044807fd3e745f21e031a0aa01a5e6f74cd2
"ImageReader" and "ImageWriter" must pass information about the
specific buffer scaling mode.
Bug: 76022384
Test: Manual using application,
Camera CTS
Change-Id: I116f00cbf3b1487d8e44661e8fd15e2aa16e6e0d
Also, disabled updatable apk usage on Media2 APIs since
they are hidden and they shouldn't be used in P.
Test: build and boot on aosp and non-aosp build
Bug: 67908547
Change-Id: Ic93cc0f07604020ec47be25725b05af8a9794572
How that we have the SoundTriggerDetectionService we don't need the
pending intent based mechanism anymore.
Test: Checked that ambient music still detects music
Change-Id: If16c59028b31ff7d2e7f4d7f764460ac948ba946
Fixes: 73829108