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

Commit 3e777886 authored by Arthur Ishiguro's avatar Arthur Ishiguro
Browse files

Adds exception documentation for new Context Hub APIs

Bug: 381172617
Flag: DOCS_ONLY
Test: Compilation
Change-Id: I771f328bc2ed39adec1d698f6db5a0d4ecf67603
parent 65e1a22b
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -69,6 +69,8 @@ public class HubEndpointSession implements AutoCloseable {
     * @return For messages that does not require a response, the transaction will immediately
     * @return For messages that does not require a response, the transaction will immediately
     *     complete. For messages that requires a response, the transaction will complete after
     *     complete. For messages that requires a response, the transaction will complete after
     *     receiving the response for the message.
     *     receiving the response for the message.
     * @throws SecurityException if the application doesn't have the right permissions to send this
     *     message.
     */
     */
    @NonNull
    @NonNull
    @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)
    @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)
+5 −0
Original line number Original line Diff line number Diff line
@@ -841,6 +841,7 @@ public final class ContextHubManager {
     * @param endpointId The identifier of the hub endpoint.
     * @param endpointId The identifier of the hub endpoint.
     * @param callback The callback to be invoked.
     * @param callback The callback to be invoked.
     * @param executor The executor to invoke the callback on.
     * @param executor The executor to invoke the callback on.
     * @throws UnsupportedOperationException If the operation is not supported.
     */
     */
    @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)
    @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)
    @FlaggedApi(Flags.FLAG_OFFLOAD_API)
    @FlaggedApi(Flags.FLAG_OFFLOAD_API)
@@ -881,6 +882,7 @@ public final class ContextHubManager {
     * @param callback The callback to be invoked.
     * @param callback The callback to be invoked.
     * @param executor The executor to invoke the callback on.
     * @param executor The executor to invoke the callback on.
     * @throws IllegalArgumentException if the serviceDescriptor is empty.
     * @throws IllegalArgumentException if the serviceDescriptor is empty.
     * @throws UnsupportedOperationException If the operation is not supported.
     */
     */
    @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)
    @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)
    @FlaggedApi(Flags.FLAG_OFFLOAD_API)
    @FlaggedApi(Flags.FLAG_OFFLOAD_API)
@@ -911,6 +913,7 @@ public final class ContextHubManager {
     *
     *
     * @param callback The callback previously registered.
     * @param callback The callback previously registered.
     * @throws IllegalArgumentException If the callback was not previously registered.
     * @throws IllegalArgumentException If the callback was not previously registered.
     * @throws UnsupportedOperationException If the operation is not supported.
     */
     */
    @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)
    @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)
    @FlaggedApi(Flags.FLAG_OFFLOAD_API)
    @FlaggedApi(Flags.FLAG_OFFLOAD_API)
@@ -1311,6 +1314,8 @@ public final class ContextHubManager {
     *     endpoint discovery results (e.g. from {@link ContextHubManager#findEndpoints(long)}).
     *     endpoint discovery results (e.g. from {@link ContextHubManager#findEndpoints(long)}).
     * @param serviceDescriptor A string that describes the service associated with this session.
     * @param serviceDescriptor A string that describes the service associated with this session.
     *     The information will be sent to the destination as part of open request.
     *     The information will be sent to the destination as part of open request.
     * @throws IllegalStateException if hubEndpoint was not successfully registered, or if there is
     *     insufficient capacity for creating a session.
     */
     */
    @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)
    @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)
    @FlaggedApi(Flags.FLAG_OFFLOAD_API)
    @FlaggedApi(Flags.FLAG_OFFLOAD_API)