libprefetch: replay/record checks if they can run on its own
Currently, prefetch `record` or `replay` command is executed
when the respective property is set, which is done by `start`
command. However, due to the timing of which property trigger
gets executed, this results in prefetch not starting neither
`record` or `replay` until the very end of boot phase.
Instead of going through `start` to determine which command
to run using property, each command will check whether they
can execute on their own. this way we can tweak exactly when
we want to run each commands.
Bug: 380766679
Test: Builds
Test: On cuttlefish, observe replay correctly exiting when
replay condition is not met.
Test: On cuttlefish, observe record correctly exiting when
record condition is not met.
Change-Id: Iad926450f00984d703f72c9c7b1876a0b3d3ecfd
4 files changed