Otherwise we'll miss a trick and not take the settings provider
shortcut for playing work ringtones.
Bug: 30658854
Change-Id: I378cabe0ba426a2c91919b3df33a525d41fe3d0d
Update Java serialization code to allow interacting with native
serialization code. One notable change is due to the fact that
properties of non-primitive types can not be read back by native code,
the properties are serialized in two versions: one only contains
properties having primitive types, and another contains all
the properties. The latter is ignored by native code.
Bug: 25945784
Test: using a PoC app
Change-Id: I047a5bdec3006bcbce34c1c63aa7746e01f7a71e
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
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
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
FileDescriptor can be natively marshaled, and can be used with both
Java and native code, whereas PFD can not.
Bug: 25945784
Change-Id: I5299f0a1555d3531f7dcf1e23c027fb420dc3569
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
When the implementation of MediaBrowserService returns null,
ItemCallback.onError was called, but the JavaDoc is saying that
ItemCallback.onItemLoaded can be called with a null result.
This CL makes ItemCallback.onItemLoaded be able to take a null result,
and ItemCallback.onError be called when the implementation doesn't override
the onLoadItem method or when the returned object is not MediaItem.
Bug: 27808084
Change-Id: I97cfd83786f8f857dc9551e5b0a358962f98e4a2
Prevent apps reading the title of null ringtones from getting "Unknown
ringtone" as the title for a silent ringtone
Bug: 31084929
Change-Id: Ie9f84bd279633f065722dbde1fbd66289eaca07b
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