Merge "Remove the tech debt from the property_service" am: 8371ec25ab
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1698925 Change-Id: I5f459aa58a76a8e7856e6ee27c7cd40c894f7f88
This commit is contained in:
commit
9beeed390c
1 changed files with 0 additions and 45 deletions
|
@ -1165,55 +1165,10 @@ static void ProcessKernelDt() {
|
|||
|
||||
constexpr auto ANDROIDBOOT_PREFIX = "androidboot."sv;
|
||||
|
||||
// emulator specific, should be removed once emulator is migrated to
|
||||
// bootconfig, see b/182291166.
|
||||
static std::string RemapEmulatorPropertyName(const std::string_view qemu_key) {
|
||||
if (StartsWith(qemu_key, "dalvik."sv) || StartsWith(qemu_key, "opengles."sv) ||
|
||||
StartsWith(qemu_key, "config."sv)) {
|
||||
return std::string(qemu_key);
|
||||
} else if (qemu_key == "uirenderer"sv) {
|
||||
return "debug.hwui.renderer"s;
|
||||
} else if (qemu_key == "media.ccodec"sv) {
|
||||
return "debug.stagefright.ccodec"s;
|
||||
} else {
|
||||
return "qemu."s + std::string(qemu_key);
|
||||
}
|
||||
}
|
||||
|
||||
static void ProcessKernelCmdline() {
|
||||
ImportKernelCmdline([&](const std::string& key, const std::string& value) {
|
||||
constexpr auto qemu_prefix = "qemu."sv;
|
||||
|
||||
if (StartsWith(key, ANDROIDBOOT_PREFIX)) {
|
||||
InitPropertySet("ro.boot." + key.substr(ANDROIDBOOT_PREFIX.size()), value);
|
||||
} else if (StartsWith(key, qemu_prefix)) {
|
||||
// emulator specific, should be retired once emulator migrates to
|
||||
// androidboot.
|
||||
const auto new_name =
|
||||
RemapEmulatorPropertyName(std::string_view(key).substr(qemu_prefix.size()));
|
||||
if (!new_name.empty()) {
|
||||
InitPropertySet("ro.boot." + new_name, value);
|
||||
}
|
||||
} else if (key == "qemu") {
|
||||
// emulator specific, should be retired once emulator migrates to
|
||||
// androidboot.
|
||||
InitPropertySet("ro.boot." + key, value);
|
||||
} else if (key == "android.bootanim" && value == "0") {
|
||||
// emulator specific, should be retired once emulator migrates to
|
||||
// androidboot.
|
||||
InitPropertySet("ro.boot.debug.sf.nobootanimation", "1");
|
||||
} else if (key == "android.checkjni") {
|
||||
// emulator specific, should be retired once emulator migrates to
|
||||
// androidboot.
|
||||
std::string value_bool;
|
||||
if (value == "0") {
|
||||
value_bool = "false";
|
||||
} else if (value == "1") {
|
||||
value_bool = "true";
|
||||
} else {
|
||||
value_bool = value;
|
||||
}
|
||||
InitPropertySet("ro.boot.dalvik.vm.checkjni", value_bool);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue