Merge tag 'android-13.0.0_r32' into int/13/fp3
Android 13.0.0 release 32
* tag 'android-13.0.0_r32':
Resolve ro.debuggable at build time
Change-Id: Idefa06369ba808e7f5ec1519b1870fca000efe48
diff --git a/liblog/Android.bp b/liblog/Android.bp
index 4dd6dd3..bc8a953 100644
--- a/liblog/Android.bp
+++ b/liblog/Android.bp
@@ -147,9 +147,15 @@
// so make sure we do not regret hard-coding it as follows:
"-DLIBLOG_LOG_TAG=1006",
"-DSNET_EVENT_LOG_TAG=1397638484",
+ "-DANDROID_DEBUGGABLE=0"
],
logtags: ["event.logtags"],
compile_multilib: "both",
+ product_variables: {
+ debuggable: {
+ cflags: ["-UANDROID_DEBUGGABLE", "-DANDROID_DEBUGGABLE=1"],
+ }
+ },
apex_available: [
"//apex_available:platform",
// liblog is exceptionally available to the runtime APEX
diff --git a/liblog/pmsg_writer.cpp b/liblog/pmsg_writer.cpp
index 037a72c..1cf8f96 100644
--- a/liblog/pmsg_writer.cpp
+++ b/liblog/pmsg_writer.cpp
@@ -75,7 +75,7 @@
size_t i, payloadSize;
ssize_t ret;
- if (!__android_log_is_debuggable()) {
+ if (!ANDROID_DEBUGGABLE) {
if (logId != LOG_ID_EVENTS && logId != LOG_ID_SECURITY) {
return -1;
}