Merge "Revert^2 "Only write appcompat properties if flag is defined"" into main am: cdd4cb7db8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3107399 Change-Id: I1e5f25f678f79fb61a35cc3980ec0151367f5ca7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
203b44e3ab
2 changed files with 6 additions and 0 deletions
|
@ -96,6 +96,7 @@ soong_config_module_type {
|
|||
config_namespace: "ANDROID",
|
||||
bool_variables: [
|
||||
"PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT",
|
||||
"release_write_appcompat_override_system_properties",
|
||||
],
|
||||
properties: [
|
||||
"cflags",
|
||||
|
@ -159,6 +160,9 @@ libinit_cc_defaults {
|
|||
"-DINSTALL_DEBUG_POLICY_TO_SYSTEM_EXT=1",
|
||||
],
|
||||
},
|
||||
release_write_appcompat_override_system_properties: {
|
||||
cflags: ["-DWRITE_APPCOMPAT_OVERRIDE_SYSTEM_PROPERTIES"],
|
||||
}
|
||||
},
|
||||
static_libs: [
|
||||
"libavb",
|
||||
|
|
|
@ -1323,12 +1323,14 @@ void CreateSerializedPropertyInfo() {
|
|||
}
|
||||
selinux_android_restorecon(PROP_TREE_FILE, 0);
|
||||
|
||||
#ifdef WRITE_APPCOMPAT_OVERRIDE_SYSTEM_PROPERTIES
|
||||
mkdir(APPCOMPAT_OVERRIDE_PROP_FOLDERNAME, S_IRWXU | S_IXGRP | S_IXOTH);
|
||||
if (!WriteStringToFile(serialized_contexts, APPCOMPAT_OVERRIDE_PROP_TREE_FILE, 0444, 0, 0,
|
||||
false)) {
|
||||
PLOG(ERROR) << "Unable to write appcompat override property infos to file";
|
||||
}
|
||||
selinux_android_restorecon(APPCOMPAT_OVERRIDE_PROP_TREE_FILE, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void ExportKernelBootProps() {
|
||||
|
|
Loading…
Reference in a new issue