ObserverSpec


public final class ObserverSpec
extends Object implements Parcelable

java.lang.Object
   ↳ android.app.appsearch.observer.ObserverSpec


Configures the types, namespaces and other properties that ObserverCallback instances match against.

Summary

Nested classes

class ObserverSpec.Builder

Builder for ObserverSpec instances. 

Inherited constants

Fields

public static final Creator<ObserverSpec> CREATOR

Public methods

Set<String> getFilterSchemas()

Returns the list of schema types which observers using this spec will trigger on.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Fields

CREATOR

public static final Creator<ObserverSpec> CREATOR

Public methods

getFilterSchemas

Added in API level 33
public Set<String> getFilterSchemas ()

Returns the list of schema types which observers using this spec will trigger on.

If empty, the observers will trigger on all schema types.

Returns
Set<String> This value cannot be null.

writeToParcel

public void writeToParcel (Parcel dest, 
                int flags)

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.

flags int: Additional flags about how the object should be written. May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES