From 0d75388541bfe929313006e4d8d1eae5afa034a3 Mon Sep 17 00:00:00 2001 From: Humberto Borba Date: Sun, 21 Aug 2016 03:24:56 -0300 Subject: shinano-common: Set BT default name dynamically Use ro.product.device property and naming BT dynamically. Signed-off-by: Humberto Borba Change-Id: Iff4f4dd51a2ad5588e35c14dbf70b63e1d69a940 --- bluetooth/bdroid_buildcfg.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'bluetooth') diff --git a/bluetooth/bdroid_buildcfg.h b/bluetooth/bdroid_buildcfg.h index 67c95de..2730703 100644 --- a/bluetooth/bdroid_buildcfg.h +++ b/bluetooth/bdroid_buildcfg.h @@ -18,6 +18,35 @@ #ifndef _BDROID_BUILDCFG_H #define _BDROID_BUILDCFG_H +#include +#include + +static inline const char* getBTDefaultName() +{ + char device[PROPERTY_VALUE_MAX]; + property_get("ro.product.device", device, ""); + + if (!strcmp("sirius", device)) { + return "Xperia Z2"; + } else if (!strcmp("castor", device)) { + return "Xperia Z2 Tablet"; + } else if (!strcmp("castor_windy", device)) { + return "Xperia Z2 Tablet"; + } else if (!strcmp("z3", device)) { + return "Xperia Z3"; + } else if (!strcmp("z3c", device)) { + return "Xperia Z3 Compact"; + } else if (!strcmp("scorpion", device)) { + return "Xperia Z3 Tablet"; + } else if (!strcmp("scorpion_windy", device)) { + return "Xperia Z3 Tablet"; + } + + return "Xperia"; +} + +#define BTM_DEF_LOCAL_NAME getBTDefaultName() + #define BTM_WBS_INCLUDED TRUE #define BTIF_HF_WBS_PREFERRED TRUE -- cgit v1.2.3