data-ipa-cfg-mgr: Disable DEBUG for userdebug builds

Author: Luca Stefani <luca020400@lineageos.org>
Date:   Tue Jul 18 18:24:43 2017 +0200

    data-ipa-cfg-mgr: Disable DEBUG for userdebug builds

    Change-Id: Idaee3e6d5b3759028918559b70e04547809bc09b

Author: Bruno Martins <bgcngm@gmail.com>
Date:   Thu Jan 11 15:46:12 2018 +0000

    data-ipa-cfg-mgr: Disable all the debugging

     * Same logic as in commit 5463a591007ae63ba3720ed295eac5ef19cc2ce0.

    Change-Id: I7ca76b868a4678fb5d8280928f90160973e51871

Change-Id: Ieab61255c3e4b8a5f8e7b1256a7e420e62f39e60
diff --git a/ipacm/src/Android.mk b/ipacm/src/Android.mk
index 7c8364c..7c9f1b2 100644
--- a/ipacm/src/Android.mk
+++ b/ipacm/src/Android.mk
@@ -37,7 +37,7 @@
 endif
 
 LOCAL_CFLAGS += -DFEATURE_IPACM_HAL -Wall -Werror -Wno-error=macro-redefined
-ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
 LOCAL_CFLAGS += -DDEBUG
 endif
 
diff --git a/ipanat/src/Android.mk b/ipanat/src/Android.mk
index 24ec7cf..af786eb 100644
--- a/ipanat/src/Android.mk
+++ b/ipanat/src/Android.mk
@@ -20,7 +20,10 @@
 LOCAL_VENDOR_MODULE := true
 LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64
 LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib
-LOCAL_CFLAGS := -DDEBUG -Wall -Werror
+ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
+LOCAL_CFLAGS := -DDEBUG
+endif
+LOCAL_CFLAGS += -Wall -Werror
 LOCAL_CFLAGS += -DFEATURE_IPA_ANDROID
 LOCAL_MODULE := libipanat
 LOCAL_MODULE_TAGS := optional