BootControl: qualify android::base with :: to avoid aidl namespace collision

This commit is contained in:
oxmc
2026-06-04 05:40:57 -07:00
parent bb013dd685
commit 01c32da313
+5 -5
View File
@@ -63,7 +63,7 @@ void BootControl::initDefaultMisc(PawletBootControl* ctrl) {
}
bool BootControl::readMisc(PawletBootControl* ctrl) {
android::base::unique_fd fd(
::android::base::unique_fd fd(
open(misc_device_.c_str(), O_RDONLY | O_CLOEXEC));
if (fd.get() < 0) {
PLOG(ERROR) << "Cannot open misc for reading: " << misc_device_;
@@ -104,7 +104,7 @@ bool BootControl::writeMisc(const PawletBootControl& in) {
ctrl.crc32 = 0;
ctrl.crc32 = computeCrc32(&ctrl, sizeof(ctrl) - sizeof(uint32_t));
android::base::unique_fd fd(
::android::base::unique_fd fd(
open(misc_device_.c_str(), O_WRONLY | O_CLOEXEC));
if (fd.get() < 0) {
PLOG(ERROR) << "Cannot open misc for writing: " << misc_device_;
@@ -124,12 +124,12 @@ bool BootControl::writeMisc(const PawletBootControl& in) {
bool BootControl::copyBootPartition(const std::string& src,
const std::string& dst) {
android::base::unique_fd src_fd(open(src.c_str(), O_RDONLY | O_CLOEXEC));
::android::base::unique_fd src_fd(open(src.c_str(), O_RDONLY | O_CLOEXEC));
if (src_fd.get() < 0) {
PLOG(ERROR) << "Cannot open source boot partition: " << src;
return false;
}
android::base::unique_fd dst_fd(open(dst.c_str(), O_WRONLY | O_CLOEXEC));
::android::base::unique_fd dst_fd(open(dst.c_str(), O_WRONLY | O_CLOEXEC));
if (dst_fd.get() < 0) {
PLOG(ERROR) << "Cannot open dest boot partition: " << dst;
return false;
@@ -178,7 +178,7 @@ ndk::ScopedAStatus BootControl::getCurrentSlot(int32_t* out) {
// The RPi firmware writes the booted slot into the kernel cmdline via
// androidboot.slot_suffix, which init propagates to ro.boot.slot_suffix.
const std::string suffix =
android::base::GetProperty("ro.boot.slot_suffix", "");
::android::base::GetProperty("ro.boot.slot_suffix", "");
if (suffix == "_b") {
*out = 1;
} else {