From 0331772902c70a2987bb583342eb2b241f1f24a9 Mon Sep 17 00:00:00 2001 From: Kevin Jeon Date: Thu, 13 Apr 2023 12:14:11 -0400 Subject: [PATCH] Add missing newline to health/wifi AIDL interfaces This change adds a missing newline character to the end of dump() for the default health and wifi int Add missing newline to health/wifi AIDL interfaces This change adds a missing newline character to the end of dump() for health and wifi. Test: Take a bugreport and verify that the "X was the duration of dumpsys Y" lines aren't preceded by the final line of the dump. Test: Run "dumpsys android.hardware.health.IHealth/default" and verify that the new line exists. Test: Run "dumpsys android.hardware.wifi.IWifi/default" and verify that the new line exists. Bug: 278081288 Change-Id: I173dd174b5bab808c6296f7163982393e60ba0c6 --- health/aidl/default/Health.cpp | 1 + wifi/aidl/default/wifi.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/health/aidl/default/Health.cpp b/health/aidl/default/Health.cpp index f401643cde..acdd3362b6 100644 --- a/health/aidl/default/Health.cpp +++ b/health/aidl/default/Health.cpp @@ -214,6 +214,7 @@ binder_status_t Health::dump(int fd, const char**, uint32_t) { } else { ::android::base::WriteStringToFd(res.getDescription(), fd); } + ::android::base::WriteStringToFd("\n", fd); fsync(fd); return STATUS_OK; diff --git a/wifi/aidl/default/wifi.cpp b/wifi/aidl/default/wifi.cpp index e30c38abcf..35f27e21d2 100644 --- a/wifi/aidl/default/wifi.cpp +++ b/wifi/aidl/default/wifi.cpp @@ -16,6 +16,7 @@ #include "wifi.h" +#include #include #include "aidl_return_util.h" @@ -88,6 +89,7 @@ binder_status_t Wifi::dump(int fd, const char** args, uint32_t numArgs) { if (!chip.get()) continue; chip->dump(fd, args, numArgs); } + ::android::base::WriteStringToFd("\n", fd); return STATUS_OK; }