summaryrefslogtreecommitdiffstats
path: root/Linux_x86/phDal4Nfc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Linux_x86/phDal4Nfc.c')
-rw-r--r--Linux_x86/phDal4Nfc.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/Linux_x86/phDal4Nfc.c b/Linux_x86/phDal4Nfc.c
index 1b6da83..d052477 100644
--- a/Linux_x86/phDal4Nfc.c
+++ b/Linux_x86/phDal4Nfc.c
@@ -121,17 +121,27 @@ static void phDal4Nfc_FillMsg (phDal4Nfc_Message_t *pDalMsg, phOsalN
------------------------------------------------------------------------------------*/
static void refresh_low_level_traces() {
+#ifdef LOW_LEVEL_TRACES
+ low_level_traces = 1;
+ return;
+#else
+
#ifdef ANDROID
- char value[1];
+ char value[PROPERTY_VALUE_MAX];
+
+ property_get("ro.debuggable", value, "");
+ if (!value[0] || !atoi(value)) {
+ low_level_traces = 0; // user build, do not allow debug
+ return;
+ }
+
property_get("debug.nfc.LOW_LEVEL_TRACES", value, "");
if (value[0]) {
- low_level_traces = atoi(value);
- DAL_DEBUG("debug.nfc.LOW_LEVEL_TRACES = %X", low_level_traces);
+ low_level_traces = atoi(value) ? 1 : 0;
+ return;
}
#endif
-
-#ifdef LOW_LEVEL_TRACES
- low_level_traces = 1;
+ low_level_traces = 0;
#endif
}