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

Commit 2df324fc 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 am: 2acd6320

parents 06be2e55 2acd6320
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1132,6 +1132,12 @@ public class CameraMetadataNative implements Parcelable {

    private boolean setGpsLocation(Location l) {
        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;
        }