diff options
author | dd3boh <dade.garberi@gmail.com> | 2017-10-31 16:00:54 +0100 |
---|---|---|
committer | dd3boh <dade.garberi@gmail.com> | 2017-10-31 17:31:39 +0100 |
commit | 2cec38abd983777c4a27f97ffad90234f1569934 (patch) | |
tree | bc532aecea0c6fdbd64683033dfe76e1a22fcadb /bluetooth | |
parent | 20809da11fe8fd32126f5f8cd411e738597c361c (diff) |
msm8996-common: Commonize the device tree
Signed-off-by: dd3boh <dade.garberi@gmail.com>
Diffstat (limited to 'bluetooth')
-rw-r--r-- | bluetooth/bdroid_buildcfg.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/bluetooth/bdroid_buildcfg.h b/bluetooth/bdroid_buildcfg.h index 8a7f266..88f5289 100644 --- a/bluetooth/bdroid_buildcfg.h +++ b/bluetooth/bdroid_buildcfg.h @@ -21,7 +21,25 @@ #ifndef _BDROID_BUILDCFG_H #define _BDROID_BUILDCFG_H -#define BTM_DEF_LOCAL_NAME "ZUK Z2 Plus" + +#include <cutils/properties.h> +#include <string.h> + +static inline const char* BtmGetDefaultName() +{ + char product_device[PROPERTY_VALUE_MAX]; + property_get("ro.product.device", product_device, ""); + + if (strstr(product_device, "z2_plus")) + return "Zuk Z2 Plus"; + if (strstr(product_device, "z2_row")) + return "Zuk Z2 Pro"; + + // Fallback to ro.product.model + return ""; +} + +#define BTM_DEF_LOCAL_NAME BtmGetDefaultName() // Disables read remote device feature #define BTA_SKIP_BLE_READ_REMOTE_FEAT FALSE #define MAX_ACL_CONNECTIONS 7 |