GetSchemaResponse
public
final
class
GetSchemaResponse
extends Object
| java.lang.Object | |
| ↳ | android.app.appsearch.GetSchemaResponse |
The response class of AppSearchSession#getSchema
Summary
Nested classes | |
|---|---|
class |
GetSchemaResponse.Builder
Builder for |
Public methods | |
|---|---|
Map<String, Set<Set<Integer>>>
|
getRequiredPermissionsForSchemaTypeVisibility()
Returns a mapping of schema types to the Map 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<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. |
Inherited methods | |
|---|---|
Public methods
getRequiredPermissionsForSchemaTypeVisibility
public Map<String, Set<Set<Integer>>> getRequiredPermissionsForSchemaTypeVisibility ()
Returns a mapping of schema types to the Map of Manifest.permission
combinations 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 holds both PermissionA and PermissionB has access.
- A querier holds both PermissionC and PermissionD has access.
- A querier holds only PermissionE has access.
- A querier holds both PermissionA and PermissionE has access.
- A querier holds only PermissionA doesn't have access.
- A querier holds both 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. |
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.
It is inefficient to call this method repeatedly.
| 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 |
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 2023-02-08 UTC.