Populate ro.boot.qemu for the emulator device

Bug: 182291166
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: Ied78f42363c1f6580fe6e5660b14c257960aed98
This commit is contained in:
Roman Kiryanov 2021-03-09 17:05:26 -08:00
parent 1a705d4943
commit 4a47c74b75

View file

@ -1169,8 +1169,11 @@ 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 (StartsWith(key, "qemu."sv) || (key == "qemu")) {
} else if (StartsWith(key, "qemu."sv)) {
InitPropertySet("ro.kernel." + key, value);
} else if (key == "qemu") {
InitPropertySet("ro.kernel." + key, value); // emulator specific, deprecated
InitPropertySet("ro.boot." + key, value);
}
});
}