GetSchemaResponse
public
final
class
GetSchemaResponse
extends Object
implements
Parcelable
java.lang.Object | |
↳ | android.app.appsearch.GetSchemaResponse |
The response class of AppSearchSession.getSchema
Summary
Nested classes | |
---|---|
class |
GetSchemaResponse.Builder
Builder for |
Inherited constants |
---|
Fields | |
---|---|
public
static
final
Creator<GetSchemaResponse> |
CREATOR
|
Public methods | |
---|---|
Map<String, PackageIdentifier>
|
getPubliclyVisibleSchemas()
Returns a mapping of publicly visible schemas to the |
Map<String, Set<Set<Integer>>>
|
getRequiredPermissionsForSchemaTypeVisibility()
Returns a mapping of schema types to the set of |
Set<String>
|
getSchemaTypesNotDisplayedBySystem()
Returns all the schema types that are opted out of being displayed and visible on any system UI surface. |
Map<String, Set<SchemaVisibilityConfig>>
|
getSchemaTypesVisibleToConfigs()
Returns a mapping of schema types to the set of |
Map<String, Set<PackageIdentifier>>
|
getSchemaTypesVisibleToPackages()
Returns a mapping of schema types to the set of packages that have access to that schema type. |
Set<AppSearchSchema>
|
getSchemas()
Return the schemas most recently successfully provided to |
int
|
getVersion()
Returns the overall database schema version. |
void
|
writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel. |
Inherited methods | |
---|---|
Fields
CREATOR
public static final Creator<GetSchemaResponse> CREATOR
Public methods
getPubliclyVisibleSchemas
public Map<String, PackageIdentifier> getPubliclyVisibleSchemas ()
Returns a mapping of publicly visible schemas to the PackageIdentifier
specifying the
package the schemas are from.
If no schemas have been set as publicly visible, an empty set will be returned.
Returns | |
---|---|
Map<String, PackageIdentifier> |
This value cannot be null . |
getRequiredPermissionsForSchemaTypeVisibility
public Map<String, Set<Set<Integer>>> getRequiredPermissionsForSchemaTypeVisibility ()
Returns a mapping of schema types to the set of Manifest.permission
combination sets that querier must hold to access that schema type.
The querier could read the GenericDocument
objects under the schemaType
if
they holds ALL required permissions of ANY of the individual value sets.
For example, if the Map contains {{permissionA, PermissionB}, {
PermissionC, PermissionD}, {PermissionE}}
.
- A querier holding both PermissionA and PermissionB has access.
- A querier holding both PermissionC and PermissionD has access.
- A querier holding only PermissionE has access.
- A querier holding both PermissionA and PermissionE has access.
- A querier holding only PermissionA doesn't have access.
- A querier holding only PermissionA and PermissionC doesn't have access.
Returns | |
---|---|
Map<String, Set<Set<Integer>>> |
The map contains schema type and all combinations of required permission for querier
to access it. The supported Permission are SetSchemaRequest.READ_SMS , SetSchemaRequest.READ_CALENDAR , SetSchemaRequest.READ_CONTACTS , SetSchemaRequest.READ_EXTERNAL_STORAGE , SetSchemaRequest.READ_HOME_APP_SEARCH_DATA and SetSchemaRequest.READ_ASSISTANT_APP_SEARCH_DATA .
This value cannot be null . |
getSchemaTypesNotDisplayedBySystem
public Set<String> getSchemaTypesNotDisplayedBySystem ()
Returns all the schema types that are opted out of being displayed and visible on any system UI surface.
Returns | |
---|---|
Set<String> |
This value cannot be null . |
getSchemaTypesVisibleToConfigs
public Map<String, Set<SchemaVisibilityConfig>> getSchemaTypesVisibleToConfigs ()
Returns a mapping of schema types to the set of SchemaVisibilityConfig
that have
access to that schema type.
Returns | |
---|---|
Map<String, Set<SchemaVisibilityConfig>> |
This value cannot be null . |
getSchemaTypesVisibleToPackages
public Map<String, Set<PackageIdentifier>> getSchemaTypesVisibleToPackages ()
Returns a mapping of schema types to the set of packages that have access to that schema type.
Returns | |
---|---|
Map<String, Set<PackageIdentifier>> |
This value cannot be null . |
getSchemas
public Set<AppSearchSchema> getSchemas ()
Return the schemas most recently successfully provided to AppSearchSession.setSchema
.
Returns | |
---|---|
Set<AppSearchSchema> |
This value cannot be null . |
getVersion
public int getVersion ()
Returns the overall database schema version.
If the database is empty, 0 will be returned.
Returns | |
---|---|
int |
Value is 0 or greater |
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 |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-12-18 UTC.