diff options
author | Humberto Borba <humberos@gmail.com> | 2016-08-21 03:24:56 -0300 |
---|---|---|
committer | Arian <arian.kulmer@web.de> | 2019-10-25 22:16:13 +0200 |
commit | 0d75388541bfe929313006e4d8d1eae5afa034a3 (patch) | |
tree | 9dadc310387114026f4938931eaaa670d2a35819 | |
parent | b0831c92929d5712b59e655fdefe8b5a5f29646a (diff) |
shinano-common: Set BT default name dynamically
Use ro.product.device property and naming BT dynamically.
Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Iff4f4dd51a2ad5588e35c14dbf70b63e1d69a940
-rw-r--r-- | bluetooth/bdroid_buildcfg.h | 29 |
1 files changed, 29 insertions, 0 deletions
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 <cutils/properties.h> +#include <string.h> + +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 |