diff options
author | Hridya Valsaraju <hridya@google.com> | 2018-09-10 00:38:01 +0200 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-09-10 00:38:01 +0200 |
commit | 94e5553f4e346df0b81885c6a57a0283a937e791 (patch) | |
tree | 6317b863fe3e7cb8abd2b10f4ff48984dbe64208 /recovery.cpp | |
parent | Merge "Remove res-560dpi symlink." (diff) | |
parent | Merge "Fix sideload for user devices by adding a new sideload config" (diff) | |
download | android_bootable_recovery-94e5553f4e346df0b81885c6a57a0283a937e791.tar android_bootable_recovery-94e5553f4e346df0b81885c6a57a0283a937e791.tar.gz android_bootable_recovery-94e5553f4e346df0b81885c6a57a0283a937e791.tar.bz2 android_bootable_recovery-94e5553f4e346df0b81885c6a57a0283a937e791.tar.lz android_bootable_recovery-94e5553f4e346df0b81885c6a57a0283a937e791.tar.xz android_bootable_recovery-94e5553f4e346df0b81885c6a57a0283a937e791.tar.zst android_bootable_recovery-94e5553f4e346df0b81885c6a57a0283a937e791.zip |
Diffstat (limited to '')
-rw-r--r-- | recovery.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/recovery.cpp b/recovery.cpp index 01bd83b5e..5934b61d7 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -286,6 +286,12 @@ 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); +} + // Returns the selected filename, or an empty string. static std::string browse_directory(const std::string& path, Device* device) { ensure_path_mounted(path.c_str()); |