Support Enter Garage Mode in remote access HAL.
Handles task type in reference remote access HAL and passes to
remote access server through GRPC.
Update host-side TestWakeupClientService to handle vehicleInUse
and ApPowerBootupReason VHAL properties.
Update reference VHAL to get the property values rom a remote grpc
server.
Test: atest --host TestWakeupClientServiceImplUnitTest
Manual run TestWakeupClientServerHost verifies that reference
VHAL can get power properties.
Bug: 316233421
Change-Id: I188aa9eed2dedb3b81b4eb6f5685ca33b646b2f5
diff --git a/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp b/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp
index dbd5bed..91689b1 100644
--- a/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp
+++ b/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp
@@ -346,8 +346,8 @@
return ScopedAStatus::ok();
}
- // TODO(b/316233421): support ENTER_GARAGE_MODE type.
out->push_back(TaskType::CUSTOM);
+ out->push_back(TaskType::ENTER_GARAGE_MODE);
return ScopedAStatus::ok();
}
@@ -380,6 +380,8 @@
}
request.mutable_scheduleinfo()->set_clientid(scheduleInfo.clientId);
+ request.mutable_scheduleinfo()->set_tasktype(
+ static_cast<ScheduleTaskType>(scheduleInfo.taskType));
request.mutable_scheduleinfo()->set_scheduleid(scheduleInfo.scheduleId);
request.mutable_scheduleinfo()->set_data(scheduleInfo.taskData.data(),
scheduleInfo.taskData.size());
@@ -485,6 +487,7 @@
const GrpcScheduleInfo& rpcScheduleInfo = response.allscheduledtasks(i);
ScheduleInfo scheduleInfo = {
.clientId = rpcScheduleInfo.clientid(),
+ .taskType = static_cast<TaskType>(rpcScheduleInfo.tasktype()),
.scheduleId = rpcScheduleInfo.scheduleid(),
.taskData = stringToBytes(rpcScheduleInfo.data()),
.count = rpcScheduleInfo.count(),