AppFunctionSearchSpec


public final class AppFunctionSearchSpec


Defines the specifications for filtering and searching app function snapshots.

Summary

Public constructors

AppFunctionSearchSpec(
    Set<@NonNull String> packageNames,
    String schemaCategory,
    String schemaName,
    int minSchemaVersion
)

Creates a new instance of AppFunctionSearchSpec.

Public methods

final int

The minimum version of the function's schema.

final Set<@NonNull String>

A set of package names to filter functions by.

final String

The category of the function's schema.

final String

The name of the function's schema.

Public constructors

AppFunctionSearchSpec

Added in 1.0.0-alpha01
public AppFunctionSearchSpec(
    Set<@NonNull String> packageNames,
    String schemaCategory,
    String schemaName,
    int minSchemaVersion
)

Creates a new instance of AppFunctionSearchSpec.

Public methods

getMinSchemaVersion

Added in 1.0.0-alpha01
public final int getMinSchemaVersion()

The minimum version of the function's schema. Functions with a schema version equal to or greater than this value will be included when filtering. Defaults to 0, which means this field is ignored when filtering. This value cannot be negative.

getPackageNames

Added in 1.0.0-alpha01
public final Set<@NonNull StringgetPackageNames()

A set of package names to filter functions by. Only functions belonging to these packages will be considered. Defaults to null, which means this field is ignored when filtering.

The calling app can only search metadata for functions in packages that it is allowed to query via android.content.pm.PackageManager.canPackageQuery. If a package is not queryable by the calling app, its functions' metadata will not be visible.

getSchemaCategory

Added in 1.0.0-alpha01
public final String getSchemaCategory()

The category of the function's schema. Defaults to null, which means this field is ignored when filtering.

getSchemaName

Added in 1.0.0-alpha01
public final String getSchemaName()

The name of the function's schema. Defaults to null, which means this field is ignored when filtering.