Clear up authorization state docs
- Indicates which int values can be sent via the EXTRA_CLIENT_AUTHORIZATION_STATE extra - Explicitly mentions how much time clients have to clean up their state with a nanoapp so there's no ambiguity. Fixes: 181350428 Test: presubmits Change-Id: Id39c233b8678450e3c7687ed2bcb1c1f4516f8d7
This commit is contained in:
@@ -60,7 +60,8 @@ public final class ContextHubManager {
|
||||
private static final String TAG = "ContextHubManager";
|
||||
|
||||
/**
|
||||
* An extra of type int describing the client's authorization state.
|
||||
* An extra containing an int from {@link AuthorizationState} describing the client's
|
||||
* authorization state.
|
||||
*/
|
||||
public static final String EXTRA_CLIENT_AUTHORIZATION_STATE =
|
||||
"android.hardware.location.extra.CLIENT_AUTHORIZATION_STATE";
|
||||
@@ -115,11 +116,9 @@ public final class ContextHubManager {
|
||||
|
||||
/**
|
||||
* Indicates the {@link ContextHubClient} will soon lose its authorization to communicate with a
|
||||
* nanoapp. The {@link ContextHubClient} must perform any cleanup with the nanoapp as soon as
|
||||
* possible.
|
||||
*
|
||||
* Note that the time between this state event and {@link AUTHORIZATION_DENIED} must be enough
|
||||
* for the {@link ContextHubClient} to send at least one message to the nanoapp.
|
||||
* nanoapp. After receiving this state event, the {@link ContextHubClient} has one minute to
|
||||
* perform any cleanup with the nanoapp such that the nanoapp is no longer performing work on
|
||||
* behalf of the {@link ContextHubClient}.
|
||||
*/
|
||||
public static final int AUTHORIZATION_DENIED_GRACE_PERIOD = 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user