ImageCaptureRotationOptionQuirk

public final class ImageCaptureRotationOptionQuirk implements Quirk


Checks whether ImageCapture supports a specific capture config option.

When capturing images, JPEG related options will be applied. But not all devices can support those options. For example, CaptureConfig.OPTION_ROTATION is used to provide the target rotation information to the HAL. So that the HAL can rotate the image buffer directly and provide the correct orientation information in the embedded exif data. But Huawei Mate 20 Lite and Honor 9X can't handle the capture rotation option correctly and the embedded exif's orientation value is wrong. For these devices, the rotation option can't be used and we should calculate the rotation value according to the target rotation setting for the final output image. See: b/171492111.

Summary

Public methods

@NonNull boolean

Returns true if the capture config option can be supported.

Public methods

isSupported

@NonNull
public boolean isSupported(@NonNull Config.Option<@NonNull Object> option)

Returns true if the capture config option can be supported.