Fix adb shell cmd config remove command when no (uid, id) pair is
specified.
- Previous logic was omitting commands when only 'adb shell cmd config
remove' was provided without any uid, id argument. This change fixes it.
- Recent disk guardrail change flips the convention of file name in
statsd directories to begin with timestamps. So delete with prefix was
changed to delete with suffix.
Bug: 72265185
Test: manual testing, statsd_test
Change-Id: Ia727fbc7acf0d9268b9f4952fa59975f4a9134cb
diff --git a/cmds/statsd/src/StatsService.cpp b/cmds/statsd/src/StatsService.cpp
index ca097d0..b779c3b 100644
--- a/cmds/statsd/src/StatsService.cpp
+++ b/cmds/statsd/src/StatsService.cpp
@@ -380,6 +380,8 @@
"The config can only be set for other UIDs on eng or userdebug "
"builds.\n");
}
+ } else if (argCount == 2 && args[1] == "remove") {
+ good = true;
}
if (!good) {