SamsungPreviewTargetAspectRatioQuirk

@RequiresApi(21) open class SamsungPreviewTargetAspectRatioQuirk : Quirk
kotlin.Any
   ↳ androidx.camera.camera2.internal.compat.quirk.SamsungPreviewTargetAspectRatioQuirk

Quirk that produces stretched preview on certain Samsung devices.

On certain Samsung devices, the HAL provides 16:9 preview even when the Surface size is set to 4:3, which causes the preview to be stretched in PreviewView.

Summary

Public constructors

Quirk that produces stretched preview on certain Samsung devices.

Public methods
open Boolean
require16_9(@NonNull config: Config)

Whether to overwrite the aspect ratio in the config to be 16:9.

Public constructors

SamsungPreviewTargetAspectRatioQuirk

SamsungPreviewTargetAspectRatioQuirk()

Quirk that produces stretched preview on certain Samsung devices.

On certain Samsung devices, the HAL provides 16:9 preview even when the Surface size is set to 4:3, which causes the preview to be stretched in PreviewView.

Public methods

require16_9

open fun require16_9(@NonNull config: Config): Boolean

Whether to overwrite the aspect ratio in the config to be 16:9.