diff options
author | Tao Bao <tbao@google.com> | 2019-03-29 15:53:23 -0700 |
---|---|---|
committer | Tao Bao <tbao@google.com> | 2019-03-29 15:54:02 -0700 |
commit | e0cfab3de9d0e1b09799c7e488f171b31ddfe7bf (patch) | |
tree | bca9e55c10ab5d09e5fb76cf9c71bc5ff8138cdd /recovery_main.cpp | |
parent | bc982a4f8845e5fa0cd2630ddcc3d8f70066b083 (diff) |
recovery: Remove SetUsbConfig() out of common.h.
libinstall now has its own copy.
Test: mmma -j bootable/recovery
Change-Id: Ibbe7084e15baeb7e744f2175d5944477092acc9e
Diffstat (limited to 'recovery_main.cpp')
-rw-r--r-- | recovery_main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/recovery_main.cpp b/recovery_main.cpp index 56ebe16f..b41368d7 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) { |