dump_modemlog: always move modem logs

Dynamic log mask events can occur without leaving the logging status
property as enabled, which means when dumpstate should always try to
stop modem logging so that the new logs can be copied over.

Having the copying of logs and stopping of modem logging combined in
one command is no longer an ideal design, so b/289435256 was created
to find a better solution to this.

Test: build, flash, trigger log mask event, check logs in bugreport.
Bug: 302435001
Change-Id: I56358d3f08ac1f2a6099ede14c5e17b5ebffabbd
This commit is contained in:
kierancyphus 2023-11-15 15:04:21 +08:00 committed by Kieran Cyphus
parent da3ebae5ad
commit c7da8aa098

View File

@ -15,7 +15,11 @@ void ModemLogDumper::DumpModemLogs() {
kModemLoggingNumberBugreportProperty.data(),
kDefaultBugreportNumberFiles);
if (shouldRestartModemLogging) {
// Should always trigger `stopModemLogging`. This is because currently copying
// modem logs and stopping modem logging are entangled.
// TODO: b/289435256 - Always copy logs and return this to checking if logging
// is actively running.
if (allowedToStopModemLogging()) {
// If modem logging is running at time of bugreport, it needs to be stopped
// to ensure that the most recent logs are included in the bugreport. If
// this command fails, only older log files will be included, as seen in