Loading init/property_service.cpp +10 −3 Original line number Original line Diff line number Diff line Loading @@ -1218,13 +1218,20 @@ static void ProcessKernelCmdline() { }); }); } } // bootconfig does not allow to populate `key=value` simultaneously with // `key.subkey=value` which does not work with the existing code for // `hardware` (e.g. we want both `ro.boot.hardware=value` and // `ro.boot.hardware.sku=value`) and for `qemu` (Android Stidio Emulator // specific). static bool IsAllowedBootconfigKey(const std::string_view key) { return (key == "hardware"sv) || (key == "qemu"sv); } static void ProcessBootconfig() { static void ProcessBootconfig() { ImportBootconfig([&](const std::string& key, const std::string& value) { ImportBootconfig([&](const std::string& key, const std::string& value) { if (StartsWith(key, ANDROIDBOOT_PREFIX)) { if (StartsWith(key, ANDROIDBOOT_PREFIX)) { InitPropertySet("ro.boot." + key.substr(ANDROIDBOOT_PREFIX.size()), value); InitPropertySet("ro.boot." + key.substr(ANDROIDBOOT_PREFIX.size()), value); } else if (key == "hardware") { } else if (IsAllowedBootconfigKey(key)) { // "hardware" in bootconfig replaces "androidboot.hardware" kernel // cmdline parameter InitPropertySet("ro.boot." + key, value); InitPropertySet("ro.boot." + key, value); } } }); }); Loading Loading
init/property_service.cpp +10 −3 Original line number Original line Diff line number Diff line Loading @@ -1218,13 +1218,20 @@ static void ProcessKernelCmdline() { }); }); } } // bootconfig does not allow to populate `key=value` simultaneously with // `key.subkey=value` which does not work with the existing code for // `hardware` (e.g. we want both `ro.boot.hardware=value` and // `ro.boot.hardware.sku=value`) and for `qemu` (Android Stidio Emulator // specific). static bool IsAllowedBootconfigKey(const std::string_view key) { return (key == "hardware"sv) || (key == "qemu"sv); } static void ProcessBootconfig() { static void ProcessBootconfig() { ImportBootconfig([&](const std::string& key, const std::string& value) { ImportBootconfig([&](const std::string& key, const std::string& value) { if (StartsWith(key, ANDROIDBOOT_PREFIX)) { if (StartsWith(key, ANDROIDBOOT_PREFIX)) { InitPropertySet("ro.boot." + key.substr(ANDROIDBOOT_PREFIX.size()), value); InitPropertySet("ro.boot." + key.substr(ANDROIDBOOT_PREFIX.size()), value); } else if (key == "hardware") { } else if (IsAllowedBootconfigKey(key)) { // "hardware" in bootconfig replaces "androidboot.hardware" kernel // cmdline parameter InitPropertySet("ro.boot." + key, value); InitPropertySet("ro.boot." + key, value); } } }); }); Loading