Add TaskType to ScheduleInfo.

Add a task type field to schedule serverless remote task. We want
to introduce an ENTER_GARAGE_MODE type where the external system
can set the AP_POWER_BOOT_UP_REASON and makes android enter
garage mode.

Test: atest RemoteAccessServiceUnitTest
Bug: 316233421
Change-Id: Iddbd2a14aa6f4672a2e27f0a05ec2b73b7d1aab2
diff --git a/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp b/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp
index 0944d86..5521134 100644
--- a/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp
+++ b/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp
@@ -40,6 +40,7 @@
 using ::aidl::android::hardware::automotive::remoteaccess::ApState;
 using ::aidl::android::hardware::automotive::remoteaccess::IRemoteTaskCallback;
 using ::aidl::android::hardware::automotive::remoteaccess::ScheduleInfo;
+using ::aidl::android::hardware::automotive::remoteaccess::TaskType;
 using ::aidl::android::hardware::automotive::vehicle::VehicleProperty;
 using ::android::base::Error;
 using ::android::base::ParseInt;
@@ -319,6 +320,13 @@
     return ScopedAStatus::ok();
 }
 
+ndk::ScopedAStatus RemoteAccessService::getSupportedTaskTypesForScheduling(
+        std::vector<TaskType>* out) {
+    // TODO(b/316233421): support ENTER_GARAGE_MODE type.
+    out->push_back(TaskType::CUSTOM);
+    return ScopedAStatus::ok();
+}
+
 ScopedAStatus RemoteAccessService::scheduleTask(const ScheduleInfo& scheduleInfo) {
     ClientContext context;
     ScheduleTaskRequest request = {};