For gralloc HAL v0.1 devices, if the producer buffer format is NV21 or YV12,
the returned flexFormat will be NV21 or YV12, which causes CTS failure
for ImageReader decoder test. This change overrides the NV21 or YV12 image
formats to HAL_PIXEL_FORMAT_YCbCr_420_888 for such case. With this, the
ImageReader will work for the devices with older gralloc HAL implementations
for HAL_PIXEL_FORMAT_YCbCr_420_888 compatible formats.
Bug: 27136665
Change-Id: Ib4722f1f8dc20ad6561088755e4ab9d2e68f1b47
Part of media security hardening
This is an intermediate step toward moving
mediadrm to a new service separate from mediaserver.
This first step allows mediadrmservice to run based
on the system property media.mediadrmservice.enable
so it can be selectively enabled on devices that
support using native_handles for secure buffers.
bug: 22990512
Change-Id: I9af073d8383f25657938d07be90c21c0dc6126b7
Also introduce new supported RAW image file formats, PEF and SRW.
RAW image file formats are not defined in PTP 1.2 specification except
for DNG. They are mostly built on top of TIFF or TIFF/EP. (Fuji's RAF
is the exception).
In this CL, image file formats are classified newly as below:
DNG: dng
TIFF: cr2, nrw, arw, rw2, orf, pef, srw
TIFF/EP: nef
Unknown Image Formats(FORMAT_DEFINED): wbmap, webp, raf
I referred to the following documents for defining MTP formats of RAW
images:
* http://www.rags-int-inc.com/PhotoTechStuff/RawStandards/RawSummary.html
* https://en.wikipedia.org/wiki/Raw_image_format
Bug: 26552863, Bug: 26626825
Change-Id: Ia218f6320c4c1ff051a23ca0060ceac46134b0d7
This CL depends on piex (github.com/google/piex),
which is owned by Google Photos's RAW team.
piex is capable of reading EXIF data that contains
metadata, and finding the positions in an image of
thumbnail and preview images from RAW images.
piex supports DNG, CR2, NEF, NRW, ARW, RW2, ORF
and RAF image file formats.
ExifInterface gets thumbnail and metadata information
from the above RAW image formats via piex.
Bug: 26177215
Change-Id: I529f8032bcb2a9d3d9e857ff1365a26a4f040066
long.
To represents full range of 32-bit unsigned integer, we should use
jlong instead of jint.
BUG=26284424
Change-Id: Id3fa9e3daa778c204ab8e38f821d454c709c317a
The CL was previously reviewed at ag/842930.
> We can obtain detailed information of MtpEvent from devices. e.g. object
> handle of changed object. The CL adds the detailed information as
> properties of MtpEvent class.
>
> BUG=26480986
Change-Id: I93afad9caf118d74cd0923d70242133c4fb2a648
Because not all MTP devices support getPartialObject, we need to check
supported operation of MTP devices. The CL adds operationsSupported
field to MtpDeviceInfo class.
BUG=26147375
Change-Id: Iaad968fb4497a5ad11bf6489097abea99c3cbac7
* Hook up the native allocation registration with ImageWriter, such that GC
can get some hint when clean up the large memory object.
* Close all pending images when closing ImageReader. This could avoid native
mem leaks for some bad app practice. For example, some apps may hold images
in background service when activity is paused/destroyed, which could cause
huge native memory leaks even ImageReader is closed.
* make Image close thread safe: it is possible the clients close the image
in listener thread and the client main thread.
* Some minor code refactor to reduce the code duplication.
Bug: 25088440
Change-Id: I37d22b52aeb8d2521bf9c702b0f54c05905473e0
The message being logged is "Unknown error" even for
known error types. This change provides more descriptive
error strings, for the case when the message isn't
explicitly provided by the DRM plugin.
Change-Id: Ic86478d7685cd33e21ecd2f875ef7dbed351e52e
related-to-bug: 25477595