diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2014-09-22 16:30:13 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-09-22 16:31:09 +0200 |
commit | bc5b5fdf13f67fb2af564aba802ea498bb8c288b (patch) | |
tree | f39821d21fed8b4d3fb4181246e0afa2aba452e6 /android/bluetoothd-wrapper.c | |
parent | 0ff83edff0c13fcea2a2a1b21365867fd01e098a (diff) | |
download | bluez-bc5b5fdf13f67fb2af564aba802ea498bb8c288b.tar.gz |
android: Use helper for accesing Android properties
Diffstat (limited to 'android/bluetoothd-wrapper.c')
-rw-r--r-- | android/bluetoothd-wrapper.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/android/bluetoothd-wrapper.c b/android/bluetoothd-wrapper.c index 90ed29222..5e15dd80c 100644 --- a/android/bluetoothd-wrapper.c +++ b/android/bluetoothd-wrapper.c @@ -19,14 +19,11 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <stdbool.h> #include <cutils/properties.h> -#define PROPERTY_VALGRIND_NAME "persist.sys.bluetooth.valgrind" - -#define PROPERTY_DEBUG_NAME "persist.sys.bluetooth.debug" - -#define PROPERTY_MGMT_DEBUG_NAME "persist.sys.bluetooth.mgmtdbg" +#include "hal-utils.h" #define VALGRIND_BIN "/system/bin/valgrind" @@ -73,17 +70,17 @@ int main(int argc, char *argv[]) int debug = 0; int mgmt_dbg = 0; - if (property_get(PROPERTY_DEBUG_NAME, value, "") > 0 && + if (get_config("debug", value, NULL) > 0 && (!strcasecmp(value, "true") || atoi(value) > 0)) debug = 1; - if (property_get(PROPERTY_MGMT_DEBUG_NAME, value, "") > 0 && + if (get_config("mgmtdbg", value, NULL) > 0 && (!strcasecmp(value, "true") || atoi(value) > 0)) { debug = 1; mgmt_dbg = 1; } - if (property_get(PROPERTY_VALGRIND_NAME, value, "") > 0 && + if (get_config("valgrind", value, NULL) > 0 && (!strcasecmp(value, "true") || atoi(value) > 0)) run_valgrind(debug, mgmt_dbg); |