comply with VTS requirements am: 44ca8b2554

Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs201/+/22241497

Change-Id: I4d9d31601fed11bd6eab57aba7706107984725fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Adam Shih 2023-03-27 05:31:56 +00:00 committed by Automerger Merge Worker
commit 44d46ae73d

View file

@ -534,7 +534,10 @@ ndk::ScopedAStatus Dumpstate::dumpstateBoard(const std::vector<::ndk::ScopedFile
ATRACE_BEGIN("dumpstateBoard"); ATRACE_BEGIN("dumpstateBoard");
// Unused arguments. // Unused arguments.
(void) in_timeoutMillis; (void) in_timeoutMillis;
(void) in_mode; if (in_mode < IDumpstateDevice::DumpstateMode::FULL || in_mode > IDumpstateDevice::DumpstateMode::PROTO) {
ALOGE("Invalid mode: %d\n", in_mode);
return ndk::ScopedAStatus::fromExceptionCodeWithMessage(EX_ILLEGAL_ARGUMENT, "Invalid mode");
}
if (in_fds.size() < 1) { if (in_fds.size() < 1) {
ALOGE("no FDs\n"); ALOGE("no FDs\n");
@ -551,6 +554,7 @@ ndk::ScopedAStatus Dumpstate::dumpstateBoard(const std::vector<::ndk::ScopedFile
if (in_fds.size() < 2) { if (in_fds.size() < 2) {
ALOGE("no FD for dumpstate_board binary\n"); ALOGE("no FD for dumpstate_board binary\n");
dumpTextSection(fd, "");
} else { } else {
int fd_bin = in_fds[1].get(); int fd_bin = in_fds[1].get();
dumpLogSection(fd, fd_bin); dumpLogSection(fd, fd_bin);