GetSchemaResponse.Builder.SetSchemaTypeVisibleToConfigs Method

Definition

Sets the documents from the provided schemaType can be read by the caller if they match the ALL visibility requirements set in SchemaVisibilityConfig.

[Android.Runtime.Register("setSchemaTypeVisibleToConfigs", "(Ljava/lang/String;Ljava/util/Set;)Landroid/app/appsearch/GetSchemaResponse$Builder;", "", ApiSince=35)]
public Android.App.AppSearch.GetSchemaResponse.Builder SetSchemaTypeVisibleToConfigs(string schemaType, System.Collections.Generic.ICollection<Android.App.AppSearch.SchemaVisibilityConfig> visibleToConfigs);
[<Android.Runtime.Register("setSchemaTypeVisibleToConfigs", "(Ljava/lang/String;Ljava/util/Set;)Landroid/app/appsearch/GetSchemaResponse$Builder;", "", ApiSince=35)>]
member this.SetSchemaTypeVisibleToConfigs : string * System.Collections.Generic.ICollection<Android.App.AppSearch.SchemaVisibilityConfig> -> Android.App.AppSearch.GetSchemaResponse.Builder

Parameters

schemaType
String

The schema type to set visibility on. This value cannot be null.

visibleToConfigs
ICollection<SchemaVisibilityConfig>

The SchemaVisibilityConfig s hold all requirements that a call must to match to access the schema. This value cannot be null.

Returns

Attributes

Remarks

Sets the documents from the provided schemaType can be read by the caller if they match the ALL visibility requirements set in SchemaVisibilityConfig. The requirements in a SchemaVisibilityConfig is "AND" relationship. A caller must match ALL requirements to access the schema. For example, a caller must hold required permissions AND it is a specified package. The querier could have access if they match ALL requirements in ANY of the given SchemaVisibilityConfig s For example, if the Set contains {{PackageA and Permission1}, {PackageB and Permission2}}. A querier from packageA could read if they holds Permission1. A querier from packageA could NOT read if they only holds Permission2 instead of Permission1. A querier from packageB could read if they holds Permission2. A querier from packageC could never read. A querier holds both PermissionA and PermissionE has access.

Android reference for android.app.appsearch.GetSchemaResponse.Builder.setSchemaTypeVisibleToConfigs.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to