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

Commit 3ed1a29a authored by Ryan Mitchell's avatar Ryan Mitchell Committed by android-build-merger
Browse files

Merge "Fix atoi build errors" into qt-dev am: 9fe4ba7a am: ab3e54dc

am: af1cf998

Change-Id: I42d487805a75d76ce2a777d08b627e1f7920187d
parents 99338728 af1cf998
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -69,7 +69,10 @@ struct InputOverlay {

bool VendorIsQOrLater() {
  constexpr int kQSdkVersion = 29;
  int version = std::atoi(android::base::GetProperty("ro.vndk.version", "29").data());
  constexpr int kBase = 10;
  std::string version_prop = android::base::GetProperty("ro.vndk.version", "29");
  int version = strtol(version_prop.data(), nullptr, kBase);

  // If the string cannot be parsed, it is a development sdk codename.
  return version >= kQSdkVersion || version == 0;
}