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

This commit is contained in:
Shuzhen Wang
2023-03-08 19:59:38 +00:00
committed by Android (Google) Code Review

View File

@@ -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;
}