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

Commit 023c47db authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Adds permission denied reason enum" into main

parents ab98d89c cd4622af
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