mirror of
https://github.com/Evolution-X-Devices/device_google_zuma
synced 2026-02-01 07:40:34 +00:00
dumpstate should not be restricted to phones only
Bug: 240530709 Test: adb bugreport Change-Id: I77d9bc3e75879293802b8d1956bfffee1513e3d7
This commit is contained in:
@@ -481,6 +481,7 @@ ndk::ScopedAStatus Dumpstate::dumpstateBoard(const std::vector<::ndk::ScopedFile
|
||||
int64_t in_timeoutMillis) {
|
||||
// Unused arguments.
|
||||
(void) in_timeoutMillis;
|
||||
(void) in_mode;
|
||||
|
||||
if (in_fds.size() < 1) {
|
||||
ALOGE("no FDs\n");
|
||||
@@ -495,17 +496,6 @@ ndk::ScopedAStatus Dumpstate::dumpstateBoard(const std::vector<::ndk::ScopedFile
|
||||
"Invalid file descriptor");
|
||||
}
|
||||
|
||||
if (in_mode == IDumpstateDevice::DumpstateMode::WEAR) {
|
||||
// We aren't a Wear device.
|
||||
ALOGE("Unsupported mode: %d\n", in_mode);
|
||||
return ndk::ScopedAStatus::fromServiceSpecificErrorWithMessage(ERROR_UNSUPPORTED_MODE,
|
||||
"Unsupported mode");
|
||||
} else 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() < 2) {
|
||||
ALOGE("no FD for dumpstate_board binary\n");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user