OptionPriority

class OptionPriority
kotlin.Any
   ↳ kotlin.Enum<androidx.camera.core.impl.Config.OptionPriority>
   ↳ androidx.camera.core.impl.Config.OptionPriority

Defines the priorities for resolving conflicting options.

Priority must be declared from high priority to low priority.

Summary

Enum values

Should only be used externally by apps.

The lowest priority, it can be overridden by any other option value.

It's a required option value in order to achieve expected CameraX behavior.

Enum values

ALWAYS_OVERRIDE

enum val ALWAYS_OVERRIDE : Config.OptionPriority

Should only be used externally by apps. It takes precedence over any other option values at the risk of causing unexpected behavior.

This should not used internally in CameraX. It conflicts when merging different values set to ALWAY_OVERRIDE.

OPTIONAL

enum val OPTIONAL : Config.OptionPriority

The lowest priority, it can be overridden by any other option value. When two option values are set as OPTIONAL, the newer value takes precedence over the old one.

REQUIRED

enum val REQUIRED : Config.OptionPriority

It's a required option value in order to achieve expected CameraX behavior. It takes precedence over OPTIONAL option values.

If apps set ALWAYS_OVERRIDE options, it'll override REQUIRED option values and can potentially cause unexpected behaviors. It conflicts when merging different values set to REQUIRED.