The unparceling code for face metadata in API1 dynamically allocates
a camera_metadata structure, and a recent fix forgot to delete that
structure in an error path.
Fix this by making the metadata structure statically allocated; it's
tiny anyway.
Test: atest CtsCameraTestCases
Bug: 155512103
Change-Id: I9b81cdb3ab47c7b6c94c6ed65213ddafef529dc9
Ensure the count can't cause an overflow in bytes to be read.
Test: atest CtsCameraTestCases; also add bad face count data from camera
service and manually verify the error logs appear when running
android.hardware.cts.CameraTest#testFaceDetection.
Bug: 150156131
Change-Id: Ic78ec0ccf67ef8665f80f69aabbb1ae71dd609cd
Add new binder calls to pass video native handle so the video native
handle can be passed between 32-bit and 64-bit processes.
Remove problematic code that used IMemory to pass video native
handle because the sizes of VideoNativeMetadata are different in
32-bit and 64-bit processes.
Bug: 28403412
Change-Id: I3341b1812ecc41d61846bb72ca926ecb1674c9ec
If the video buffer contains a native handle, serialize and
deserialize it properly.
Author: spodder@codeaurora.org
Bug: 26268807
Change-Id: I1905be81e2045667e00c95ab75d1bf144756b894