comply with VTS requirements
Bug: 275142299 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 Built pass on target-userdebug and aosp_target-userdebug Change-Id: Ifd980bc1fbb543c43e729d52735c97e2cde6a641
This commit is contained in:
parent
f272a85a53
commit
1915b3df20
6 changed files with 16 additions and 1 deletions
|
@ -154,7 +154,11 @@ ndk::ScopedAStatus Dumpstate::dumpstateBoard(const std::vector<::ndk::ScopedFile
|
|||
int64_t in_timeoutMillis) {
|
||||
// Unused arguments.
|
||||
(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) {
|
||||
ALOGE("no FDs\n");
|
||||
|
@ -171,6 +175,7 @@ ndk::ScopedAStatus Dumpstate::dumpstateBoard(const std::vector<::ndk::ScopedFile
|
|||
|
||||
if (in_fds.size() < 2) {
|
||||
ALOGE("no FD for dumpstate_board binary\n");
|
||||
dumpTextSection(fd, "");
|
||||
} else {
|
||||
int fd_bin = in_fds[1].get();
|
||||
dumpLogSection(fd, fd_bin);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue