diff --git a/build/core/main_version.mk b/build/core/main_version.mk index e41313513b5b48713d8bd5542fb614834bae7b40..0ce881b77499f36c7f97bd2a68b6c99d0656e9a2 100644 --- a/build/core/main_version.mk +++ b/build/core/main_version.mk @@ -34,3 +34,13 @@ ADDITIONAL_BUILD_PROPERTIES += \ # LineageOS Platform Internal Version ADDITIONAL_BUILD_PROPERTIES += \ ro.lineage.build.version.plat.rev=$(LINEAGE_PLATFORM_REV) + +# Allow disabling debugging flags set by the build system +# for 3rd party apps support. +ifeq ($(TARGET_BUILD_VARIANT),userdebug) + ifeq ($(DISABLE_TARGET_DEBUGGING),true) + ADDITIONAL_BUILD_PROPERTIES += ro.debuggable=0 + ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.lockprof.threshold=0 + endif +endif +