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

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

Merge "contexthub: add @ServiceFormat to getter & doc fix" into main

parents fac1e2d4 7e2817f6
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -112,6 +112,7 @@ public final class HubServiceInfo implements Parcelable {
     * <p>The value can be one of {@link HubServiceInfo#FORMAT_CUSTOM}, {@link
     * HubServiceInfo#FORMAT_AIDL} or {@link HubServiceInfo#FORMAT_PW_RPC_PROTOBUF}.
     */
    @ServiceFormat
    public int getFormat() {
        return mFormat;
    }
@@ -178,7 +179,8 @@ public final class HubServiceInfo implements Parcelable {
         *   <li>Pigweed RPC with Protobuf: com.example.proto.ExampleService
         * </ol>
         *
         * @param serviceDescriptor The service descriptor.
         * @param serviceDescriptor The service descriptor for the interface, provided by the
         *     vendor.
         * @param format One of {@link HubServiceInfo#FORMAT_CUSTOM}, {@link
         *     HubServiceInfo#FORMAT_AIDL} or {@link HubServiceInfo#FORMAT_PW_RPC_PROTOBUF}.
         * @param majorVersion Breaking changes should be a major version bump.
+13 −1
Original line number Diff line number Diff line
@@ -718,7 +718,19 @@ public final class ContextHubManager {
    /**
     * Find a list of endpoints that provides a specific service.
     *
     * @param serviceDescriptor Statically generated ID for an endpoint.
     * <p>Service descriptor should uniquely identify the interface (scoped to type). Convention of
     * the descriptor depend on interface type.
     *
     * <p>Examples:
     *
     * <ol>
     *   <li>AOSP-defined AIDL: android.hardware.something.IFoo/default
     *   <li>Vendor-defined AIDL: com.example.something.IBar/default
     *   <li>Pigweed RPC with Protobuf: com.example.proto.ExampleService
     * </ol>
     *
     * @param serviceDescriptor The service descriptor for a service provided by the hub. The value
     *     cannot be null or empty.
     * @return A list of {@link HubDiscoveryInfo} objects that represents the result of discovery.
     * @throws IllegalArgumentException if the serviceDescriptor is empty/null.
     */