Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd4622af authored by Arthur Ishiguro's avatar Arthur Ishiguro
Browse files

Adds permission denied reason enum

Bug: 383132246
Flag: android.chre.flags.offload_api
Test: Compile
Change-Id: Ib3fbf352ee2b3c69bd25eec67c5d52cb97fa3f24
parent 7c5c1196
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 {
+7 −1
Original line number Diff line number Diff line
@@ -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