The response class of
AppSearchClient.getSchema(String)
Nested Class Summary
class | GetSchemaResponse.Builder | Builder for GetSchemaResponse
objects. |
Inherited Constant Summary
Field Summary
public static final Creator<GetSchemaResponse> | CREATOR |
Public Method Summary
Map<String, PackageIdentifier> |
getPubliclyVisibleSchemas()
Returns a mapping of publicly visible schemas to the
PackageIdentifier
specifying the package the schemas are from.
|
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.
|
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
SchemaVisibilityConfig that have access to that schema type.
|
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
AppSearchClient.setSchema(SetSchemaRequest, String) .
|
int |
getVersion()
Returns the overall database schema version.
|
void |
writeToParcel(Parcel dest, int
flags)
|
Inherited Method Summary
Fields
public static final Creator<GetSchemaResponse> CREATOR
Public Methods
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.
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
- 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
andSetSchemaRequest.READ_ASSISTANT_APP_SEARCH_DATA
.
public Set<String> getSchemaTypesNotDisplayedBySystem ()
Returns all the schema types that are opted out of being displayed and visible on any system UI surface.
public Map<String, Set<SchemaVisibilityConfig>> getSchemaTypesVisibleToConfigs ()
Returns a mapping of schema types to the set of SchemaVisibilityConfig
that have access to that schema type.
public Map<String, Set<PackageIdentifier>> getSchemaTypesVisibleToPackages ()
Returns a mapping of schema types to the set of packages that have access to that schema type.
public Set<AppSearchSchema> getSchemas ()
Return the schemas most recently successfully provided to
AppSearchClient.setSchema(SetSchemaRequest, String)
.
public int getVersion ()
Returns the overall database schema version.
If the database is empty, 0 will be returned.