Loading fs_mgr/liblp/writer.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -138,8 +138,8 @@ static bool ValidateAndSerializeMetadata([[maybe_unused]] const IPartitionOpener PERROR << partition_name << ": ioctl"; return false; } if (info.size != block_device.size) { LERROR << "Block device " << partition_name << " size mismatch (expected" if (info.size < block_device.size) { LERROR << "Block device " << partition_name << " size is too small (expected" << block_device.size << ", got " << info.size << ")"; return false; } Loading init/property_service.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -768,13 +768,13 @@ static void LoadPropertiesFromSecondStageRes(std::map<std::string, std::string>* // So we need to apply the same rule of build/make/tools/post_process_props.py // on runtime. static void update_sys_usb_config() { bool is_debuggable = android::base::GetBoolProperty("ro.debuggable", false); bool is_eng = !android::base::GetBoolProperty("ro.adb.secure", true); std::string config = android::base::GetProperty("persist.sys.usb.config", ""); // b/150130503, add (config == "none") condition here to prevent appending // ",adb" if "none" is explicitly defined in default prop. if (config.empty() || config == "none") { InitPropertySet("persist.sys.usb.config", is_debuggable ? "adb" : "none"); } else if (is_debuggable && config.find("adb") == std::string::npos && InitPropertySet("persist.sys.usb.config", is_eng ? "adb" : "none"); } else if (is_eng && config.find("adb") == std::string::npos && config.length() + 4 < PROP_VALUE_MAX) { config.append(",adb"); InitPropertySet("persist.sys.usb.config", config); Loading Loading
fs_mgr/liblp/writer.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -138,8 +138,8 @@ static bool ValidateAndSerializeMetadata([[maybe_unused]] const IPartitionOpener PERROR << partition_name << ": ioctl"; return false; } if (info.size != block_device.size) { LERROR << "Block device " << partition_name << " size mismatch (expected" if (info.size < block_device.size) { LERROR << "Block device " << partition_name << " size is too small (expected" << block_device.size << ", got " << info.size << ")"; return false; } Loading
init/property_service.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -768,13 +768,13 @@ static void LoadPropertiesFromSecondStageRes(std::map<std::string, std::string>* // So we need to apply the same rule of build/make/tools/post_process_props.py // on runtime. static void update_sys_usb_config() { bool is_debuggable = android::base::GetBoolProperty("ro.debuggable", false); bool is_eng = !android::base::GetBoolProperty("ro.adb.secure", true); std::string config = android::base::GetProperty("persist.sys.usb.config", ""); // b/150130503, add (config == "none") condition here to prevent appending // ",adb" if "none" is explicitly defined in default prop. if (config.empty() || config == "none") { InitPropertySet("persist.sys.usb.config", is_debuggable ? "adb" : "none"); } else if (is_debuggable && config.find("adb") == std::string::npos && InitPropertySet("persist.sys.usb.config", is_eng ? "adb" : "none"); } else if (is_eng && config.find("adb") == std::string::npos && config.length() + 4 < PROP_VALUE_MAX) { config.append(",adb"); InitPropertySet("persist.sys.usb.config", config); Loading