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

Commit 8787afa9 authored by Lei Ju's avatar Lei Ju
Browse files

Introduce a new callback function to get client's UUID

Bug: 247124878
Test: compilation and manual test
Change-Id: I96b386fc232c4f65615858cf9b65317ae5bdc499
parent 13c75354
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@
    </hal>
    <hal format="aidl" optional="true">
        <name>android.hardware.contexthub</name>
        <version>2</version>
        <version>3</version>
        <interface>
            <name>IContextHub</name>
            <instance>default</instance>
+1 −1
Original line number Diff line number Diff line
@@ -49,6 +49,6 @@ aidl_interface {
        },

    ],
    frozen: true,
    frozen: false,

}
+1 −0
Original line number Diff line number Diff line
@@ -39,5 +39,6 @@ interface IContextHubCallback {
  void handleContextHubAsyncEvent(in android.hardware.contexthub.AsyncEventType evt);
  void handleTransactionResult(in int transactionId, in boolean success);
  void handleNanSessionRequest(in android.hardware.contexthub.NanSessionRequest request);
  byte[16] getUuid();
  const int CONTEXTHUB_NAN_TRANSACTION_TIMEOUT_MS = 10000;
}
+8 −0
Original line number Diff line number Diff line
@@ -90,6 +90,14 @@ interface IContextHubCallback {
     */
    void handleNanSessionRequest(in NanSessionRequest request);

    /**
     * This callback is passed to the HAL implementation to allow the HAL to request a UUID that
     * uniquely identifies an IContextHubCallback.
     *
     * @return a byte array representating the UUID
     */
    byte[16] getUuid();

    /**
     * Amount of time, in milliseconds, that a handleNanSessionRequest can be pending before the
     * Contexthub service must respond.
+2 −2
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ cc_library_static {
    shared_libs: [
        "libbase",
        "libbinder_ndk",
        "android.hardware.contexthub-V2-ndk",
        "android.hardware.contexthub-V3-ndk",
    ],
    export_include_dirs: ["include"],
    srcs: [
@@ -50,7 +50,7 @@ cc_binary {
    shared_libs: [
        "libbase",
        "libbinder_ndk",
        "android.hardware.contexthub-V2-ndk",
        "android.hardware.contexthub-V3-ndk",
    ],
    static_libs: [
        "libcontexthubexampleimpl",
Loading