From 3d012b65dd711aed01894b131c5244bfc519adb6 Mon Sep 17 00:00:00 2001 From: Adam Shih Date: Thu, 16 Feb 2023 10:51:58 +0800 Subject: [PATCH] dumpstate should not be restricted to phones only Bug: 240530709 Test: adb bugreport Change-Id: I77d9bc3e75879293802b8d1956bfffee1513e3d7 --- dumpstate/Dumpstate.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/dumpstate/Dumpstate.cpp b/dumpstate/Dumpstate.cpp index f7bd41aa..a6ac2305 100644 --- a/dumpstate/Dumpstate.cpp +++ b/dumpstate/Dumpstate.cpp @@ -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 {