Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3015cd44 authored by Shuzhen Wang's avatar Shuzhen Wang Committed by Automerger Merge Worker
Browse files

Merge "Camera: Remove GPS_LOCATION if set is called with null" into udc-dev...

Merge "Camera: Remove GPS_LOCATION if set is called with null" into udc-dev am: 2acd6320 am: 4b1e4ff1

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21853665



Change-Id: Iebacd24c62376cc1f024c866594d2df7b2153aba
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents de95ec6e 4b1e4ff1
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -1132,6 +1132,12 @@ public class CameraMetadataNative implements Parcelable {


    private boolean setGpsLocation(Location l) {
    private boolean setGpsLocation(Location l) {
        if (l == null) {
        if (l == null) {
            // If Location value being set is null, remove corresponding keys.
            // This is safe because api1/client2/CameraParameters.cpp already erases
            // the keys for JPEG_GPS_LOCATION for certain cases.
            setBase(CaptureRequest.JPEG_GPS_TIMESTAMP, null);
            setBase(CaptureRequest.JPEG_GPS_COORDINATES, null);
            setBase(CaptureRequest.JPEG_GPS_PROCESSING_METHOD, null);
            return false;
            return false;
        }
        }