diff options
-rw-r--r-- | core/api/system-current.txt | 1 | ||||
-rw-r--r-- | core/java/android/hardware/contexthub/HubEndpoint.java | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 9590e1ab19c9..e5dcc7d8ba7f 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -5088,6 +5088,7 @@ package android.hardware.contexthub { field public static final int REASON_ENDPOINT_STOPPED = 6; // 0x6 field public static final int REASON_FAILURE = 0; // 0x0 field public static final int REASON_OPEN_ENDPOINT_SESSION_REQUEST_REJECTED = 3; // 0x3 + field public static final int REASON_PERMISSION_DENIED = 9; // 0x9 } public static final class HubEndpoint.Builder { diff --git a/core/java/android/hardware/contexthub/HubEndpoint.java b/core/java/android/hardware/contexthub/HubEndpoint.java index 1f12bbf4d074..ee4675c6a46f 100644 --- a/core/java/android/hardware/contexthub/HubEndpoint.java +++ b/core/java/android/hardware/contexthub/HubEndpoint.java @@ -66,13 +66,14 @@ public class HubEndpoint { REASON_CLOSE_ENDPOINT_SESSION_REQUESTED, REASON_ENDPOINT_INVALID, REASON_ENDPOINT_STOPPED, + REASON_PERMISSION_DENIED, }) public @interface Reason {} /** Unclassified failure */ public static final int REASON_FAILURE = 0; - // The values 1 and 2 are reserved at the Context Hub HAL but not exposed to apps. + // The values 1-2 are reserved at the Context Hub HAL but not exposed to apps. /** The peer rejected the request to open this endpoint session. */ public static final int REASON_OPEN_ENDPOINT_SESSION_REQUEST_REJECTED = 3; @@ -83,6 +84,11 @@ public class HubEndpoint { /** The peer endpoint is invalid. */ public static final int REASON_ENDPOINT_INVALID = 5; + // The values 6-8 are reserved at the Context Hub HAL but not exposed to apps. + + /** The endpoint did not have the required permissions. */ + public static final int REASON_PERMISSION_DENIED = 9; + /** * The endpoint is now stopped. The app should retrieve the endpoint info using {@link * android.hardware.location.ContextHubManager#findEndpoints} or register updates through |