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

Commit 696bbee9 authored by Igor Murashkin's avatar Igor Murashkin
Browse files

camera2: Fix TotalCaptureResult#getKeys not to return empty list

Bug: 16680352
Change-Id: Ie6b8a8bff6f9b87d058a21b07eb3447371a62b6b
parent 81f6d857
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ import java.util.List;
public abstract class CameraMetadata<TKey> {

    private static final String TAG = "CameraMetadataAb";
    private static final boolean VERBOSE = false;
    private static final boolean VERBOSE = Log.isLoggable(TAG, Log.VERBOSE);

    /**
     * Set a camera metadata field to a value. The field definitions can be
@@ -131,6 +131,11 @@ public abstract class CameraMetadata<TKey> {

        if (VERBOSE) Log.v(TAG, "getKeysStatic for " + type);

        // TotalCaptureResult does not have any of the keys on it, use CaptureResult instead
        if (type.equals(TotalCaptureResult.class)) {
            type = CaptureResult.class;
        }

        if (filterTags != null) {
            Arrays.sort(filterTags);
        }