diff options
| -rw-r--r-- | core/api/system-current.txt | 4 | ||||
| -rw-r--r-- | core/java/android/hardware/contexthub/HubEndpointSession.java | 3 | ||||
| -rw-r--r-- | core/java/android/hardware/contexthub/IContextHubEndpoint.aidl | 6 | 
3 files changed, 2 insertions, 11 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt index a7a5f366addc..612a48ac00a7 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -5254,9 +5254,9 @@ package android.hardware.contexthub {    }    @FlaggedApi("android.chre.flags.offload_api") public class HubEndpointSession implements java.lang.AutoCloseable { -    method @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB) public void close(); +    method public void close();      method @Nullable public android.hardware.contexthub.HubServiceInfo getServiceInfo(); -    method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB) public android.hardware.location.ContextHubTransaction<java.lang.Void> sendMessage(@NonNull android.hardware.contexthub.HubMessage); +    method @NonNull public android.hardware.location.ContextHubTransaction<java.lang.Void> sendMessage(@NonNull android.hardware.contexthub.HubMessage);    }    @FlaggedApi("android.chre.flags.offload_api") public class HubEndpointSessionResult { diff --git a/core/java/android/hardware/contexthub/HubEndpointSession.java b/core/java/android/hardware/contexthub/HubEndpointSession.java index b3d65c1a4cae..cf952cbdbfdc 100644 --- a/core/java/android/hardware/contexthub/HubEndpointSession.java +++ b/core/java/android/hardware/contexthub/HubEndpointSession.java @@ -19,7 +19,6 @@ package android.hardware.contexthub;  import android.annotation.FlaggedApi;  import android.annotation.NonNull;  import android.annotation.Nullable; -import android.annotation.RequiresPermission;  import android.annotation.SystemApi;  import android.chre.flags.Flags;  import android.hardware.location.ContextHubTransaction; @@ -71,7 +70,6 @@ public class HubEndpointSession implements AutoCloseable {       *     receiving the response for the message.       */      @NonNull -    @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)      public ContextHubTransaction<Void> sendMessage(@NonNull HubMessage message) {          if (mIsClosed.get()) {              throw new IllegalStateException("Session is already closed."); @@ -122,7 +120,6 @@ public class HubEndpointSession implements AutoCloseable {       * <p>When this function is invoked, the messaging associated with this session is invalidated.       * All futures messages targeted for this client are dropped.       */ -    @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)      public void close() {          if (!mIsClosed.getAndSet(true)) {              mCloseGuard.close(); diff --git a/core/java/android/hardware/contexthub/IContextHubEndpoint.aidl b/core/java/android/hardware/contexthub/IContextHubEndpoint.aidl index 4a724ceb6665..1c98b4b3f4f5 100644 --- a/core/java/android/hardware/contexthub/IContextHubEndpoint.aidl +++ b/core/java/android/hardware/contexthub/IContextHubEndpoint.aidl @@ -38,7 +38,6 @@ interface IContextHubEndpoint {       * @throws IllegalArgumentException If the HubEndpointInfo is not valid.       * @throws IllegalStateException If there are too many opened sessions.       */ -    @EnforcePermission("ACCESS_CONTEXT_HUB")      int openSession(in HubEndpointInfo destination, in @nullable HubServiceInfo serviceInfo);      /** @@ -49,7 +48,6 @@ interface IContextHubEndpoint {       *       * @throws IllegalStateException If the session wasn't opened.       */ -    @EnforcePermission("ACCESS_CONTEXT_HUB")      void closeSession(int sessionId, int reason);      /** @@ -61,13 +59,11 @@ interface IContextHubEndpoint {       *       * @throws IllegalStateException If the session wasn't opened.       */ -    @EnforcePermission("ACCESS_CONTEXT_HUB")      void openSessionRequestComplete(int sessionId);      /**       * Unregister this endpoint from the HAL, invalidate the EndpointInfo previously assigned.       */ -    @EnforcePermission("ACCESS_CONTEXT_HUB")      void unregister();      /** @@ -79,7 +75,6 @@ interface IContextHubEndpoint {       * @param transactionCallback Nullable. If the hub message requires a reply, the transactionCallback       *                            will be set to non-null.       */ -    @EnforcePermission("ACCESS_CONTEXT_HUB")      void sendMessage(int sessionId, in HubMessage message,                       in @nullable IContextHubTransactionCallback transactionCallback); @@ -91,6 +86,5 @@ interface IContextHubEndpoint {       * @param messageSeqNumber The message sequence number, this should match a previously received HubMessage.       * @param errorCode The message delivery status detail.       */ -    @EnforcePermission("ACCESS_CONTEXT_HUB")      void sendMessageDeliveryStatus(int sessionId, int messageSeqNumber, byte errorCode);  }  |