diff options
-rw-r--r-- | common.h | 2 | ||||
-rw-r--r-- | recovery.cpp | 6 | ||||
-rw-r--r-- | recovery_main.cpp | 6 |
3 files changed, 6 insertions, 8 deletions
@@ -36,5 +36,3 @@ extern std::string stage; extern const char* reason; bool is_ro_debuggable(); - -bool SetUsbConfig(const std::string& state); diff --git a/recovery.cpp b/recovery.cpp index 02cc53c2c..034918498 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -271,12 +271,6 @@ static bool erase_volume(const char* volume) { return (result == 0); } -// Sets the usb config to 'state' -bool SetUsbConfig(const std::string& state) { - android::base::SetProperty("sys.usb.config", state); - return android::base::WaitForProperty("sys.usb.state", state); -} - static bool yes_no(Device* device, const char* question1, const char* question2) { std::vector<std::string> headers{ question1, question2 }; std::vector<std::string> items{ " No", " Yes" }; diff --git a/recovery_main.cpp b/recovery_main.cpp index 56ebe16fa..b41368d7b 100644 --- a/recovery_main.cpp +++ b/recovery_main.cpp @@ -178,6 +178,12 @@ static std::string load_locale_from_cache() { return android::base::Trim(content); } +// Sets the usb config to 'state'. +static bool SetUsbConfig(const std::string& state) { + android::base::SetProperty("sys.usb.config", state); + return android::base::WaitForProperty("sys.usb.state", state); +} + static void ListenRecoverySocket(RecoveryUI* ui, std::atomic<Device::BuiltinAction>& action) { android::base::unique_fd sock_fd(android_get_control_socket("recovery")); if (sock_fd < 0) { |