|
|
|
@ -1234,6 +1234,14 @@ static void ProcessKernelCmdline() {
|
|
|
|
|
ImportKernelCmdline([&](const std::string& key, const std::string& value) {
|
|
|
|
|
if (StartsWith(key, ANDROIDBOOT_PREFIX)) {
|
|
|
|
|
InitPropertySet("ro.boot." + key.substr(ANDROIDBOOT_PREFIX.size()), value);
|
|
|
|
|
} else if (key == "lcd") {
|
|
|
|
|
std::size_t found = value.find_first_of(",");
|
|
|
|
|
InitPropertySet("ro.boot.panel", value.substr(0, found));
|
|
|
|
|
if (found != std::string::npos) {
|
|
|
|
|
auto dpi = std::atoi(value.substr(found + 1).c_str());
|
|
|
|
|
if (dpi >= 80 && dpi <= 640)
|
|
|
|
|
InitPropertySet("ro.sf.lcd_density", android::base::StringPrintf("%d", dpi));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|