From 8dd92811957dd34e1db8ddb3be99cf7558950e07 Mon Sep 17 00:00:00 2001 From: Anthony Stange Date: Thu, 11 Mar 2021 15:53:59 +0000 Subject: [PATCH] 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 --- .../android/hardware/location/ContextHubManager.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/core/java/android/hardware/location/ContextHubManager.java b/core/java/android/hardware/location/ContextHubManager.java index a65f36b14f130..eaa8bd403e241 100644 --- a/core/java/android/hardware/location/ContextHubManager.java +++ b/core/java/android/hardware/location/ContextHubManager.java @@ -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;