The hidden API is used by SystemUI process to adjust the system UI based
on when a certain camera is opened or closed.
Test: Manually observe callbacks in SystemUI when running camera CTS
Bug: 150540299
Change-Id: I04cae782d96f0e32be8ef588dcd328f84b32887a
Merged-In: I04cae782d96f0e32be8ef588dcd328f84b32887a
Do not call AudioSystem.setAllowedCapturePolicy directly in
AudioManager. Instead, send the request to AudioService and calling the
function in AudioService. In that case, AudioService can cached the
request so that it benefits returning correct playback configuration.
When querying capture policy, AudioManager will query AudioService first
to see if there is cached capture policy. If there is exception, return
cached capture policy in AudioManager.
Test: dumpsys audio, query active audio playback configuration
Test: atest AudioManagerTest, AudioAttributesTest
Test: atest AudioPlaybackCaptureTest, AudioPlaybackConfigurationTest
Bug: 145115448
Change-Id: I170571d8a67839bc5a53991d6c89127b99b5c794
Merged-In: I170571d8a67839bc5a53991d6c89127b99b5c794
(cherry picked from commit b33f36971d)
Cherry-picked from ag/9745767
Currently, the offset value returned from getAttributeRange() does
not take into account the offset to the EXIF data within the image
file. This CL fixes the code to return the correct offsets.
The existing test code could not detect this issue because it does
not explicitly seek to the given offset and retrieve/compare the
data. This CL also adds test code to do this. Make tag information
is also added because all test files have this information, while only
a select few have thumbnail/GPS tag information.
This CL also fixes a bug where the thumbnail offset was not being
updated if the data was passed with StripOffsets tag.
Bug: 143118731, Bug: 143663411
Test: atest ExifInterfaceTest
Change-Id: Ia147cdcacf4699c5e7efc43f52e58b945032a51f
Currently when application calls ImageWriter.newInstance(Surface, int,
int), the default format of UNKNOWN is overridden to surface format in
Java side before being overridden again to user specified format (from
RGBA to IMPLEMENTATION_DEFINED). This breaks backward compatibility with
certain gralloc implementations.
Do not override UNKNOWN format in Java side.
Test: testWriterFormatOverride
Bug: 143637345
Change-Id: Ie61157bca11f623eff2b8c0ed2a988c86da07cb2
Make the Javadoc about the data expected in CSD buffer #0 for FLAC
consistent with the code.
Bug: 140613717
Test: javadoc-only fix
Change-Id: Ic2a35c6bd308a4f79215d920a88ccc2dd6f8cd12
Fix AudioAttributes flags checking logic in
shouldEnablePowerSaving() to take into account
flags that are compatible with deep buffer.
Bug: 140899988
Test: check that playback with Spotify goes to deep buffer
Change-Id: I492410b7837b15e248d61ec50dbb468e78e04524
In Q, these APIs were either:
- removed from the greylist entirely without good reason
- Moved to the restricted greylist without any public alternative
information added
So they are being moved back to the greylist for Q.
Test: Treehugger
Bug: 136102585
Change-Id: I6518440a7b0de8292ad05b4df9f0f9580d18b2a5
This reverts commit 16c0c46f20.
Reason for revert: causes b/135763139 (volume adjustment for music does not work)
There is no clear explanation how this change breaks volume adjustment, but by bisection and by reverting the change locally it does somehow.
Bug: 133186424
Bug: 135763139
Change-Id: If6eed10f23c6b6006a6468c2a793230cd98c0501
libmedia_jni now pulls in libsfplugin_ccodec instead of deferring it
until an actual reference. This eliminates some codec startup latency
later. this is only "load it", there is no actual use of
libsfplugin_ccodec by libmedia_jni.
Bug: 133186424
Test: boot, logcat, forrest startup timing measurements
Change-Id: Iacf8783cb45d33f5cec67863d4bf89da6dff9c2d
Add content observer for RTT mode: when RTT is ON during a call,
The assistant is allowed to capture audio similarly to when an
accessibility service is in the foreground.
Bug: 132976361
Test: use voice input during a call with RTT enabled.
Change-Id: Ief04d886370b50ae3dac0a72dbd1a4ea5f2c66a3
MPEG4Writer::writeGeoDataBox() has always written latitude
before longitude since it was introduced. And the ISO-6709
is also to have +-{latitude}+-{longitude}/ so we should have
the correct information here.
This is likely to be important for Q since lat/long are no
longer accessible via MediaStore.
Bug: 134100244
Test: documentation change only
Change-Id: If157e3b0a639da9e012c0dd23fcfacfa0a59c28e
video files with mimetype “video/x-ms-asf” are considered as PlayList
file type due to below check in MediaFile.Java
Do not consider it as playlist file and remove case of “video/x-ms-asf”
Bug: 133940458
Test: The video is show in gallery
Change-Id: I6af45b597d9b8d9b277e1ae89f2afe019ee2eead
These APIs are used by older versions of the unity game engine, and many
of these games are not in a position where they are able to update
unity. To keep these games working now and in the future, leave these
APIs on the derestricted greylist.
Bug: 134049522
Test: m
Change-Id: I541ed6fbacfc1e405a319af5c2ff785625afb26a
USAGE_VOICE_COMMUNICATION_SIGNALLING shouldn't be considered
SUPPRESSIBLE_SYSTEM. It includes the ring tone sound when in a call.
Instead, it should not be suppressible like USAGE_VOICE_COMMUNICATION.
Test: manual
Fixes: 131756661
Change-Id: Ide8aafafe58c421f3b699e6de9358b4e73ad01c5
MediaHTTPConnection.seek() was creating new connections in a while
loop without checking whether another thread was busy concurrently
disconnecting.
When a new connection was created between the time the disconnect()ing
thread had disconnected the old one and acquired the synchronized
block, the new connection wouldn't be disconnected and therefore
seek() would not encounter an IOException; therefore, seek() would
not return quickly, leaving the disconnecting thread waiting to
acquire the synchronized block for a long time.
This CL fixes this by making seek() throw IOException quickly if
it discovers that another thread is trying to disconnect. This
is checked shortly before and after the new connection is created,
to avoid a race based on the order between the new connection
being created and the disconnecting thread reading the old
connection value. Note that this still doesn't stop a new
connection being created shortly after the previous one was torn
down - it only stops the disconnecting thread waiting for a long
time to acquire the synchronized lock.
Fixes: 131894499
Test: The following command hang 3/3 times before this CL, but
succeeded 3/3 times afterwards:
atest android.media.cts.NativeDecoderTest#testAMediaDataSourceClose
Change-Id: I3862a4367d0e46c64c0cbf7bcaa369aca5692871