Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0cfab3d authored by Tao Bao's avatar Tao Bao
Browse files

recovery: Remove SetUsbConfig() out of common.h.

libinstall now has its own copy.

Test: mmma -j bootable/recovery
Change-Id: Ibbe7084e15baeb7e744f2175d5944477092acc9e
parent bc982a4f
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -36,5 +36,3 @@ extern std::string stage;
extern const char* reason;

bool is_ro_debuggable();

bool SetUsbConfig(const std::string& state);
+0 −6
Original line number Diff line number Diff line
@@ -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" };
+6 −0
Original line number Diff line number Diff line
@@ -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) {