@MustBeDocumented
@Retention(value = AnnotationRetention.BINARY)
@Target(allowedTargets = [AnnotationTarget.ANNOTATION_CLASSAnnotationTarget.CLASSAnnotationTarget.FUNCTIONAnnotationTarget.PROPERTY_GETTERAnnotationTarget.PROPERTY_SETTERAnnotationTarget.CONSTRUCTORAnnotationTarget.FIELDAnnotationTarget.FILE])
public annotation RequiresFlag


Indicates an API is part of a feature that is guarded by an aconfig flag, and only available if the flag is enabled.

Unless the API has been finalized and has become part of the SDK, callers of the annotated API must check that the flag is enabled before making any assumptions about the existence of the API.

Summary

Public constructors

Public methods

final @NonNull String

The string value for the aconfig flag used to guard the feature this API is part of, for example "android.os.flags.my_feature".

Public constructors

RequiresFlag

public RequiresFlag(@NonNull String value)

Public methods

getValue

public final @NonNull String getValue()

The string value for the aconfig flag used to guard the feature this API is part of, for example "android.os.flags.my_feature".