From 8569552ec26c39c44310ec8b002427221fe58a79 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Mon, 11 May 2020 15:59:44 +0900 Subject: [PATCH] /vendor/default.prop is removed. It is merged to /vendor/build.prop. However, for backwards compatibility, the old file is read on devices running R or earlier. Bug: 117892318 Test: TH passes Test: inspect /vendor/build.prop and check if it has contents from the old /vendor/default.prop file Change-Id: I994cc85fc0765bc9233e9799bcb670a23180f068 --- init/property_service.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/init/property_service.cpp b/init/property_service.cpp index 842b2e5b7..2fea8a30d 100644 --- a/init/property_service.cpp +++ b/init/property_service.cpp @@ -891,14 +891,21 @@ void PropertyLoadBootDefaults() { } load_properties_from_file("/system/build.prop", nullptr, &properties); load_properties_from_file("/system_ext/build.prop", nullptr, &properties); - load_properties_from_file("/vendor/default.prop", nullptr, &properties); + + // TODO(b/117892318): uncomment the following condition when vendor.imgs for + // aosp_* targets are all updated. +// if (SelinuxGetVendorAndroidVersion() <= __ANDROID_API_R__) { + load_properties_from_file("/vendor/default.prop", nullptr, &properties); +// } load_properties_from_file("/vendor/build.prop", nullptr, &properties); + if (SelinuxGetVendorAndroidVersion() >= __ANDROID_API_Q__) { load_properties_from_file("/odm/etc/build.prop", nullptr, &properties); } else { load_properties_from_file("/odm/default.prop", nullptr, &properties); load_properties_from_file("/odm/build.prop", nullptr, &properties); } + load_properties_from_file("/product/build.prop", nullptr, &properties); load_properties_from_file("/factory/factory.prop", "ro.*", &properties);