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

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

Merge "Adds exception documentation for new Context Hub APIs" into main

parents 283cd08f 3e777886
Loading
Loading
Loading
Loading
+2 −0
Original line number 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
     *     complete. For messages that requires a response, the transaction will complete after
     *     receiving the response for the message.
     * @throws SecurityException if the application doesn't have the right permissions to send this
     *     message.
     */
    @NonNull
    @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)
+5 −0
Original line number Diff line number Diff line
@@ -841,6 +841,7 @@ public final class ContextHubManager {
     * @param endpointId The identifier of the hub endpoint.
     * @param callback The callback to be invoked.
     * @param executor The executor to invoke the callback on.
     * @throws UnsupportedOperationException If the operation is not supported.
     */
    @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)
    @FlaggedApi(Flags.FLAG_OFFLOAD_API)
@@ -881,6 +882,7 @@ public final class ContextHubManager {
     * @param callback The callback to be invoked.
     * @param executor The executor to invoke the callback on.
     * @throws IllegalArgumentException if the serviceDescriptor is empty.
     * @throws UnsupportedOperationException If the operation is not supported.
     */
    @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)
    @FlaggedApi(Flags.FLAG_OFFLOAD_API)
@@ -911,6 +913,7 @@ public final class ContextHubManager {
     *
     * @param callback The callback 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)
    @FlaggedApi(Flags.FLAG_OFFLOAD_API)
@@ -1311,6 +1314,8 @@ public final class ContextHubManager {
     *     endpoint discovery results (e.g. from {@link ContextHubManager#findEndpoints(long)}).
     * @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.
     * @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)
    @FlaggedApi(Flags.FLAG_OFFLOAD_API)