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

Commit 76c6b3a6 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge changes I3b0c6325,I40f97f4b am: a55e7023

parents 620e09f5 a55e7023
Loading
Loading
Loading
Loading
+21 −4
Original line number Original line Diff line number Diff line
@@ -18,11 +18,9 @@ package {
    default_applicable_licenses: ["Android-Apache-2.0"],
    default_applicable_licenses: ["Android-Apache-2.0"],
}
}


cc_binary {
cc_defaults {
    name: "android.hardware.automotive.remoteaccess@V1-default-service",
    name: "remote-access-hal-defaults",
    vendor: true,
    vendor: true,
    vintf_fragments: ["remoteaccess-default-service.xml"],
    init_rc: ["remoteaccess-default-service.rc"],
    relative_install_path: "hw",
    relative_install_path: "hw",
    srcs: ["src/RemoteAccessImpl.cpp"],
    srcs: ["src/RemoteAccessImpl.cpp"],
    whole_static_libs: [
    whole_static_libs: [
@@ -41,10 +39,29 @@ cc_binary {
    ],
    ],
    cflags: [
    cflags: [
        "-Wno-unused-parameter",
        "-Wno-unused-parameter",
    ],
}

cc_binary {
    name: "android.hardware.automotive.remoteaccess@V1-default-service",
    defaults: ["remote-access-hal-defaults"],
    vintf_fragments: ["remoteaccess-default-service.xml"],
    init_rc: ["remoteaccess-default-service.rc"],
    cflags: [
        "-DGRPC_SERVICE_ADDRESS=\"localhost:50051\"",
        "-DGRPC_SERVICE_ADDRESS=\"localhost:50051\"",
    ],
    ],
}
}


cc_binary {
    name: "android.hardware.automotive.remoteaccess@V1-tcu-test-service",
    defaults: ["remote-access-hal-defaults"],
    vintf_fragments: ["remoteaccess-default-service.xml"],
    init_rc: ["remoteaccess-tcu-test-service.rc"],
    cflags: [
        "-DGRPC_SERVICE_ADDRESS=\"10.10.10.1:50051\"",
    ],
}

cc_library {
cc_library {
    name: "RemoteAccessService",
    name: "RemoteAccessService",
    vendor_available: true,
    vendor_available: true,
+4 −0
Original line number Original line Diff line number Diff line
service vendor.remoteaccess-default /vendor/bin/hw/android.hardware.automotive.remoteaccess@V1-tcu-test-service
    class hal
    user vehicle_network
    group system inet
+4 −1
Original line number Original line Diff line number Diff line
@@ -111,7 +111,9 @@ void RemoteAccessService::maybeStopTaskLoop() {
        // Try to stop the reading stream.
        // Try to stop the reading stream.
        if (mGetRemoteTasksContext) {
        if (mGetRemoteTasksContext) {
            mGetRemoteTasksContext->TryCancel();
            mGetRemoteTasksContext->TryCancel();
            mGetRemoteTasksContext.reset();
            // Don't reset mGetRemoteTaskContext here since the read stream might still be affective
            // and might still be using it. This will cause reader->Read to return false and
            // mGetRemoteTasksContext will be cleared after reader->Finish() is called.
        }
        }
        mTaskWaitStopped = true;
        mTaskWaitStopped = true;
        mCv.notify_all();
        mCv.notify_all();
@@ -155,6 +157,7 @@ void RemoteAccessService::runTaskLoop() {
            }
            }
        }
        }
        Status status = reader->Finish();
        Status status = reader->Finish();
        mGetRemoteTasksContext.reset();


        ALOGE("GetRemoteTasks stream breaks, code: %d, message: %s, sleeping for 10s and retry",
        ALOGE("GetRemoteTasks stream breaks, code: %d, message: %s, sleeping for 10s and retry",
              status.error_code(), status.error_message().c_str());
              status.error_code(), status.error_message().c_str());
+20 −2
Original line number Original line Diff line number Diff line
@@ -75,11 +75,18 @@ following behavior:


* Under android root: `source build/envsetup.sh`
* Under android root: `source build/envsetup.sh`


* Add
  ```
  PRODUCT_SOONG_NAMESPACES += hardware/interfaces/automotive/remoteaccess/test_grpc_server/lib`
  ```

  to `device/generic/car/common/car.mk`.

* `lunch sdk_car_x86_64-userdebug`
* `lunch sdk_car_x86_64-userdebug`


* `make -j TestWakeupClientServer`
* `make -j TestWakeupClientServer`


* `make -j ApPowerControlLib`
* `make -j ApPOwerControlLib`


## How to push the test wakeup client to a TCU which runs Android.
## How to push the test wakeup client to a TCU which runs Android.


@@ -99,7 +106,7 @@ following behavior:


* `adb push vendor/bin/TestWakeupClientServer /vendor/bin`
* `adb push vendor/bin/TestWakeupClientServer /vendor/bin`


* `adb push vendor/lib/ApPowerControlLib.so /vendor/lib`
* `adb push vendor/lib64/ApPowerControlLib.so /vendor/lib64`


* `adb shell`
* `adb shell`


@@ -116,6 +123,13 @@ interface.


* Under android root, `source build/envsetup.sh`
* Under android root, `source build/envsetup.sh`


* Add
  ```
  PRODUCT_SOONG_NAMESPACES += hardware/interfaces/automotive/remoteaccess/test_grpc_server/lib`
  ```

  to `device/generic/car/common/car.mk`.

* `lunch sdk_car_x86_64-userdebug`
* `lunch sdk_car_x86_64-userdebug`


* `m -j`
* `m -j`
@@ -150,8 +164,12 @@ interface.


* `make -j TestWakeupClientServer`
* `make -j TestWakeupClientServer`


* `make -j ApPOwerControlLib`

* `adb push $ANDROID_PRODUCT_OUT/vendor/bin/TestWakeupClientServer /vendor/bin`
* `adb push $ANDROID_PRODUCT_OUT/vendor/bin/TestWakeupClientServer /vendor/bin`


* `adb push $ANDROID_PRODUCT_OUT/vendor/lib64/ApPowerControlLib.so /vendor/lib64`

* `adb shell`
* `adb shell`


* `emulator_car_x86_64:/ # su`
* `emulator_car_x86_64:/ # su`