This breaks a local refcount cycle and allows the Java gc to finalize
the Ringtone and MediaPlayer objects quickly.
Bug: 31811091
Change-Id: I0e5a4a78fdc02cc0c8b7811a1f1a45db3c90a0ff
The USB data transfer is disabled we should not allow access MTP devices
(e.g.
usb sticks). We have two ways of accessing them: Either by mounting them
or by creating a MTPDevice in an app.
Of course an app could implement implement their own MTPDevice
implementation. In this case we cannot enforce the policy without
completely suppressing all MTP USB devices which would be too
restrictive.
Note: When the policy is set we do _not_ disconnect already connected
MTP devices
Fixes: 31472955
Change-Id: I6080c48c49657102774b2b3b4d89ff030245a266
* changes:
Make dispatchAudioRoutesChanged be called when BT A2DP status changed
Revert "Disable selecting the default audio route when a BT route is avaiable"
This causes frequent programming errors, when developers assume
that holding onto a Surface will keep its associated SurfaceTexture,
ImageReader, etc, also alive.
Bug: 31551063
Test: m offline-sdk-docs, manual viewing of result
Change-Id: I5fb5bb3e3c80c7d5d735417b1697e0fe9a62fc46
Always scan notification, ringtones and alarm files under /system
when the build fingerprint has changed since the last scan,
because the dates on those files is not set correctly
(by design), and hence cannot be trusted in the date-based
scanning logic.
Remove some dead code
Bug 30476971
Change-Id: I638c787dc177f7f5fb17c1c2a576be190c1c85f9
This method (currently @hide) discards all cached buffers for
the ImageReader, which can be useful to free up memory at the
cost of reallocation time if more buffers are needed later.
It has no effect on acquired Images, filled Images waiting to be
acquired, or buffers being actively used by the source rendering to the
Surface.
Bug: 28695173
Change-Id: I427a8ba4ad73a267083f843dbf228bfc53a730d9
ZenModeHelper was only considering a subset of all notification usage
types. The code was also iterating over the usage values, expecting
them to be contiguous, which will break with the addition of new
usage values.
The update consists in:
- defining in AudioAttributes an array of expected usage types
- defining the suppression behavior for each usage type
- have ZenModeHelper query the behavior for each usage in
order to apply the corresponding muting behavior.
Bug 29009099
Change-Id: If884dda6297f125c60c5775c757df4f782e22e53
This patch adds releasing of MediaScannerConnection in ClientProxy
after disconnecting and releasing of ClientProxy and
IMediaScannerService in disconnection sequence in
MediaScannerConnection.
Bug: 30150344
Change-Id: I1e162e4c9a0b7a741ace20480bcf06f3151a93bf
ExifInterface object can be created with a unsupported file format.
If saveAttribute is called with an unsupported file format, ExifInterface
makes the file corrupted. This CL prevents those cases by throwing
an exception before making any change on the file.
Bug: 30936376
Change-Id: I115a42601c774062485974042464abb0d65c35e9
(cherry picked from commit a8f9a075b14c526a0de75c2ade81ebc4e05e4ef8)
ExifInterface object can be created with a unsupported file format.
If saveAttribute is called with an unsupported file format, ExifInterface
makes the file corrupted. This CL prevents those cases by throwing
an exception before making any change on the file.
Bug: 30936376
Change-Id: I115a42601c774062485974042464abb0d65c35e9
Switch the device and client AudioFormat parameters in the
AudioRecordingConfiguration constructor, so it's the same
order as the rest of the code involved in sending a callback
when the recording configuration changes.
Bug 30282058
Change-Id: Iea417f02dcb644e3d4dacbc0e44ea4b2eac28840
This method (currently @hide) discards all cached buffers for
the ImageReader, which can be useful to free up memory at the
cost of reallocationt time if more buffers are needed later.
It has no effect on acquired Images, filled Images waiting to be
acquired, or buffers being actively used by the source rendering to the
Surface.
Bug: 28695173
Change-Id: I427a8ba4ad73a267083f843dbf228bfc53a730d9
Order the playback restriction checks from the most likely
restriction to the least likely.
Bug 30073948
Change-Id: I6431d15a2ed8b5831f937eab8db940d942082b0e