Add inject-task-next-reboot debug command.

Support a debug command that will inject a fake remote task for
testing on next reboot with specified latency. This is used to
simulate the situation when a remote task arrives while the device
is not booted up and the task will be delivered once the device
boots up.

Test: Manually test on seahawk.
Bug: 275880463
Change-Id: I6eb064893bea0700da80dfa2dcf3079ddb0b59a1
diff --git a/automotive/remoteaccess/hal/default/include/RemoteAccessService.h b/automotive/remoteaccess/hal/default/include/RemoteAccessService.h
index 9aabad6..b18986a 100644
--- a/automotive/remoteaccess/hal/default/include/RemoteAccessService.h
+++ b/automotive/remoteaccess/hal/default/include/RemoteAccessService.h
@@ -105,6 +105,8 @@
     size_t mRetryWaitInMs = 10'000;
     std::shared_ptr<DebugRemoteTaskCallback> mDebugCallback;
 
+    std::thread mInjectDebugTaskThread;
+
     void runTaskLoop();
     void maybeStartTaskLoop();
     void maybeStopTaskLoop();
@@ -116,6 +118,8 @@
     void printCurrentStatus(int fd);
     std::string clientIdToTaskCountToStringLocked() REQUIRES(mLock);
     void debugInjectTask(int fd, std::string_view clientId, std::string_view taskData);
+    void debugInjectTaskNextReboot(int fd, std::string_view clientId, std::string_view taskData,
+                                   const char* latencyInSecStr);
     void updateGrpcConnected(bool connected);
     android::base::Result<void> deliverRemoteTaskThroughCallback(const std::string& clientId,
                                                                  std::string_view taskData);