comply with VTS requirements
Bug: 275036679 Bug: 275034315 Test: atest VtsHalDumpstateTargetTest:PerInstanceAndMode/DumpstateAidlPerModeTest#TestOk/0_android_hardware_dumpstate_IDumpstateDevice_default_FULL atest VtsHalDumpstateTargetTest:PerInstance/DumpstateAidlGeneralTest#TestInvalidModeArgument_Negative/0_android_hardware_dumpstate_IDumpstateDevice_default Change-Id: I734325c39c66dc536de42fb9d77631ccd1016c84
This commit is contained in:
parent
1c828e13c9
commit
44ca8b2554
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue