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

Commit 504e5895 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11520864 from 73c85334 to 24Q2-release

Change-Id: I7a7dd48bba17580c5d357c5e2be5ac2511a1a860
parents 757488a7 73c85334
Loading
Loading
Loading
Loading
+18 −5
Original line number Diff line number Diff line
@@ -33,6 +33,8 @@
#include <grpcpp/server.h>
#include <grpcpp/server_builder.h>

namespace {

using ::android::hardware::automotive::remoteaccess::BOOTUP_REASON_SYSTEM_ENTER_GARAGE_MODE;
using ::android::hardware::automotive::remoteaccess::BOOTUP_REASON_SYSTEM_REMOTE_ACCESS;
using ::android::hardware::automotive::remoteaccess::BOOTUP_REASON_USER_POWER_ON;
@@ -45,13 +47,18 @@ using ::grpc::ServerWriter;

constexpr int SHUTDOWN_REQUEST = 289410889;
constexpr int VEHICLE_IN_USE = 287313738;
const char* COMMAND_RUN_EMU = "source ~/.aae-toolbox/bin/bashrc && aae emulator run";
const char* COMMAND_SET_VHAL_PROP =
constexpr char COMMAND_RUN_EMU_LOCAL_IMAGE[] =
        "source ~/.aae-toolbox/bin/bashrc && aae emulator run";
constexpr char COMMAND_RUN_EMU[] = "./launch_emu.sh -v \"-writable-system -selinux permissive\"";
constexpr char COMMAND_SET_VHAL_PROP[] =
        "adb -s emulator-5554 wait-for-device && adb -s emulator-5554 root "
        "&& sleep 1 && adb -s emulator-5554 wait-for-device && adb -s emulator-5554 shell "
        "dumpsys android.hardware.automotive.vehicle.IVehicle/default --set %d -i %d";

pid_t emuPid = 0;
const char* runEmuCommand = COMMAND_RUN_EMU;

}  // namespace

void RunServer(const std::string& serviceAddr, std::shared_ptr<ServiceImpl> service) {
    ServerBuilder builder;
@@ -95,7 +102,7 @@ bool powerOnEmu(ServiceImpl* service, int32_t bootupReason) {
        return false;
    }
    service->setBootupReason(bootupReason);
    emuPid = runCommand(COMMAND_RUN_EMU);
    emuPid = runCommand(runEmuCommand);
    printf("Emulator started in process: %d\n", emuPid);
    return true;
}
@@ -247,10 +254,16 @@ class MyServiceImpl final : public ServiceImpl {
    };
};

// Usage: TestWakeupClientServerHost [--local-image] [service_address_to_start]
int main(int argc, char** argv) {
    std::string serviceAddr = GRPC_SERVICE_ADDRESS;
    if (argc > 1) {
        serviceAddr = argv[1];
    for (int i = 1; i < argc; i++) {
        char* arg = argv[1];
        if (strcmp(arg, "--local-image") == 0) {
            runEmuCommand = COMMAND_RUN_EMU_LOCAL_IMAGE;
            continue;
        }
        serviceAddr = arg;
    }
    // Let the server thread run, we will force kill the server when we exit the program.
    std::shared_ptr<ServiceImpl> service = std::make_shared<MyServiceImpl>();
+2 −0
Original line number Diff line number Diff line
@@ -907,6 +907,7 @@ FakeVehicleHardware::ValueResultType FakeVehicleHardware::getVehicleInUse(
    auto result = mValuePool->obtainBoolean(response.isvehicleinuse());
    result->prop = toInt(VehicleProperty::VEHICLE_IN_USE);
    result->areaId = 0;
    result->status = VehiclePropertyStatus::AVAILABLE;
    result->timestamp = elapsedRealtimeNano();
    return result;
}
@@ -924,6 +925,7 @@ FakeVehicleHardware::ValueResultType FakeVehicleHardware::getApPowerBootupReason
    auto result = mValuePool->obtainInt32(response.bootupreason());
    result->prop = toInt(VehicleProperty::AP_POWER_BOOTUP_REASON);
    result->areaId = 0;
    result->status = VehiclePropertyStatus::AVAILABLE;
    result->timestamp = elapsedRealtimeNano();
    return result;
}
+15 −0
Original line number Diff line number Diff line
@@ -316,6 +316,21 @@ TEST_P(WifiStaIfaceAidlTest, RoamingControl) {
    EXPECT_TRUE(wifi_sta_iface_->setRoamingState(StaRoamingState::ENABLED).isOk());
}

/*
 * RoamingModeControl
 */
TEST_P(WifiStaIfaceAidlTest, RoamingModeControl) {
    if (interface_version_ < 2) {
        GTEST_SKIP() << "Roaming mode control is available as of sta_iface V2";
    }
    if (!isFeatureSupported(IWifiStaIface::FeatureSetMask::ROAMING_MODE_CONTROL)) {
        GTEST_SKIP() << "Roaming mode control is not supported.";
    }

    // Enable aggressive roaming.
    EXPECT_TRUE(wifi_sta_iface_->setRoamingState(StaRoamingState::AGGRESSIVE).isOk());
}

/*
 * EnableNDOffload
 */