Rename to getAllPendingScheduledTasks.

Rename getAllScheduledTasks to getAllPendingScheduledTasks.

Test: Presubmit
Bug: 305285376
Change-Id: I0a908d3c4cc77ff718883e17468a2ff75df470d3
diff --git a/automotive/remoteaccess/hal/default/fuzzer/fuzzer.cpp b/automotive/remoteaccess/hal/default/fuzzer/fuzzer.cpp
index 9224ebc..7707ee6 100644
--- a/automotive/remoteaccess/hal/default/fuzzer/fuzzer.cpp
+++ b/automotive/remoteaccess/hal/default/fuzzer/fuzzer.cpp
@@ -75,8 +75,9 @@
         return Status::OK;
     }
 
-    Status GetAllScheduledTasks(ClientContext* context, const GetAllScheduledTasksRequest& request,
-                                GetAllScheduledTasksResponse* response) {
+    Status GetAllPendingScheduledTasks(ClientContext* context,
+                                       const GetAllPendingScheduledTasksRequest& request,
+                                       GetAllPendingScheduledTasksResponse* response) {
         return Status::OK;
     }
 
@@ -165,17 +166,19 @@
         return nullptr;
     }
 
-    ClientAsyncResponseReaderInterface<GetAllScheduledTasksResponse>* AsyncGetAllScheduledTasksRaw(
+    ClientAsyncResponseReaderInterface<GetAllPendingScheduledTasksResponse>*
+    AsyncGetAllPendingScheduledTasksRaw(
             [[maybe_unused]] ClientContext* context,
-            [[maybe_unused]] const GetAllScheduledTasksRequest& request,
+            [[maybe_unused]] const GetAllPendingScheduledTasksRequest& request,
             [[maybe_unused]] CompletionQueue* cq) {
         return nullptr;
     }
 
-    ClientAsyncResponseReaderInterface<GetAllScheduledTasksResponse>*
-    PrepareAsyncGetAllScheduledTasksRaw([[maybe_unused]] ClientContext* context,
-                                        [[maybe_unused]] const GetAllScheduledTasksRequest& request,
-                                        [[maybe_unused]] CompletionQueue* c) {
+    ClientAsyncResponseReaderInterface<GetAllPendingScheduledTasksResponse>*
+    PrepareAsyncGetAllPendingScheduledTasksRaw(
+            [[maybe_unused]] ClientContext* context,
+            [[maybe_unused]] const GetAllPendingScheduledTasksRequest& request,
+            [[maybe_unused]] CompletionQueue* c) {
         return nullptr;
     }
 };
diff --git a/automotive/remoteaccess/hal/default/include/RemoteAccessService.h b/automotive/remoteaccess/hal/default/include/RemoteAccessService.h
index 23b4ebe..6266de8 100644
--- a/automotive/remoteaccess/hal/default/include/RemoteAccessService.h
+++ b/automotive/remoteaccess/hal/default/include/RemoteAccessService.h
@@ -96,7 +96,7 @@
     ndk::ScopedAStatus isTaskScheduled(const std::string& clientId, const std::string& scheduleId,
                                        bool* out) override;
 
-    ndk::ScopedAStatus getAllScheduledTasks(
+    ndk::ScopedAStatus getAllPendingScheduledTasks(
             const std::string& clientId,
             std::vector<aidl::android::hardware::automotive::remoteaccess::ScheduleInfo>* out)
             override;
diff --git a/automotive/remoteaccess/hal/default/proto/wakeup_client.proto b/automotive/remoteaccess/hal/default/proto/wakeup_client.proto
index e061016..14ba0a5 100644
--- a/automotive/remoteaccess/hal/default/proto/wakeup_client.proto
+++ b/automotive/remoteaccess/hal/default/proto/wakeup_client.proto
@@ -99,7 +99,8 @@
      *
      * <p>The finished scheduled tasks will not be included.
      */
-    rpc GetAllScheduledTasks(GetAllScheduledTasksRequest) returns (GetAllScheduledTasksResponse) {}
+    rpc GetAllPendingScheduledTasks(GetAllPendingScheduledTasksRequest)
+            returns (GetAllPendingScheduledTasksResponse) {}
 }
 
 message GetRemoteTasksRequest {}
@@ -154,10 +155,10 @@
     bool isTaskScheduled = 1;
 }
 
-message GetAllScheduledTasksRequest {
+message GetAllPendingScheduledTasksRequest {
     string clientId = 1;
 }
 
-message GetAllScheduledTasksResponse {
+message GetAllPendingScheduledTasksResponse {
     repeated GrpcScheduleInfo allScheduledTasks = 1;
 }
diff --git a/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp b/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp
index 5521134..2a7f209 100644
--- a/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp
+++ b/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp
@@ -399,13 +399,13 @@
     return ScopedAStatus::ok();
 }
 
-ScopedAStatus RemoteAccessService::getAllScheduledTasks(const std::string& clientId,
-                                                        std::vector<ScheduleInfo>* out) {
+ScopedAStatus RemoteAccessService::getAllPendingScheduledTasks(const std::string& clientId,
+                                                               std::vector<ScheduleInfo>* out) {
     ClientContext context;
-    GetAllScheduledTasksRequest request = {};
-    GetAllScheduledTasksResponse response = {};
+    GetAllPendingScheduledTasksRequest request = {};
+    GetAllPendingScheduledTasksResponse response = {};
     request.set_clientid(clientId);
-    Status status = mGrpcStub->GetAllScheduledTasks(&context, request, &response);
+    Status status = mGrpcStub->GetAllPendingScheduledTasks(&context, request, &response);
     if (!status.ok()) {
         return rpcStatusToScopedAStatus(status, "Failed to call isTaskScheduled");
     }
diff --git a/automotive/remoteaccess/hal/default/test/RemoteAccessServiceUnitTest.cpp b/automotive/remoteaccess/hal/default/test/RemoteAccessServiceUnitTest.cpp
index 4af0003..a46a983 100644
--- a/automotive/remoteaccess/hal/default/test/RemoteAccessServiceUnitTest.cpp
+++ b/automotive/remoteaccess/hal/default/test/RemoteAccessServiceUnitTest.cpp
@@ -95,9 +95,9 @@
     MOCK_METHOD(Status, IsTaskScheduled,
                 (ClientContext * context, const IsTaskScheduledRequest& request,
                  IsTaskScheduledResponse* response));
-    MOCK_METHOD(Status, GetAllScheduledTasks,
-                (ClientContext * context, const GetAllScheduledTasksRequest& request,
-                 GetAllScheduledTasksResponse* response));
+    MOCK_METHOD(Status, GetAllPendingScheduledTasks,
+                (ClientContext * context, const GetAllPendingScheduledTasksRequest& request,
+                 GetAllPendingScheduledTasksResponse* response));
     // Async methods which we do not care.
     MOCK_METHOD(ClientAsyncReaderInterface<GetRemoteTasksResponse>*, AsyncGetRemoteTasksRaw,
                 (ClientContext * context, const GetRemoteTasksRequest& request, CompletionQueue* cq,
@@ -141,13 +141,13 @@
                 PrepareAsyncIsTaskScheduledRaw,
                 (ClientContext * context, const IsTaskScheduledRequest& request,
                  CompletionQueue* cq));
-    MOCK_METHOD(ClientAsyncResponseReaderInterface<GetAllScheduledTasksResponse>*,
-                AsyncGetAllScheduledTasksRaw,
-                (ClientContext * context, const GetAllScheduledTasksRequest& request,
+    MOCK_METHOD(ClientAsyncResponseReaderInterface<GetAllPendingScheduledTasksResponse>*,
+                AsyncGetAllPendingScheduledTasksRaw,
+                (ClientContext * context, const GetAllPendingScheduledTasksRequest& request,
                  CompletionQueue* cq));
-    MOCK_METHOD(ClientAsyncResponseReaderInterface<GetAllScheduledTasksResponse>*,
-                PrepareAsyncGetAllScheduledTasksRaw,
-                (ClientContext * context, const GetAllScheduledTasksRequest& request,
+    MOCK_METHOD(ClientAsyncResponseReaderInterface<GetAllPendingScheduledTasksResponse>*,
+                PrepareAsyncGetAllPendingScheduledTasksRaw,
+                (ClientContext * context, const GetAllPendingScheduledTasksRequest& request,
                  CompletionQueue* cq));
 };
 
@@ -573,13 +573,13 @@
     EXPECT_EQ(grpcRequest.scheduleid(), kTestScheduleId);
 }
 
-TEST_F(RemoteAccessServiceUnitTest, testGetAllScheduledTasks) {
+TEST_F(RemoteAccessServiceUnitTest, testGetAllPendingScheduledTasks) {
     std::vector<ScheduleInfo> result;
-    GetAllScheduledTasksRequest grpcRequest = {};
-    EXPECT_CALL(*getGrpcWakeupClientStub(), GetAllScheduledTasks)
+    GetAllPendingScheduledTasksRequest grpcRequest = {};
+    EXPECT_CALL(*getGrpcWakeupClientStub(), GetAllPendingScheduledTasks)
             .WillOnce([&grpcRequest]([[maybe_unused]] ClientContext* context,
-                                     const GetAllScheduledTasksRequest& request,
-                                     GetAllScheduledTasksResponse* response) {
+                                     const GetAllPendingScheduledTasksRequest& request,
+                                     GetAllPendingScheduledTasksResponse* response) {
                 grpcRequest = request;
                 GrpcScheduleInfo* newInfo = response->add_allscheduledtasks();
                 newInfo->set_clientid(kTestClientId);
@@ -591,7 +591,7 @@
                 return Status();
             });
 
-    ScopedAStatus status = getService()->getAllScheduledTasks(kTestClientId, &result);
+    ScopedAStatus status = getService()->getAllPendingScheduledTasks(kTestClientId, &result);
 
     ASSERT_TRUE(status.isOk());
     EXPECT_EQ(grpcRequest.clientid(), kTestClientId);