sdm660-common: bluetooth: set bt name from ro.product.model

This commit is contained in:
pythonlimited 2019-08-03 15:40:02 +02:00 committed by Max Weffers
parent 53e8ac411a
commit ffa472d899
No known key found for this signature in database
GPG key ID: 795F73D22FB93FAE

View file

@ -21,6 +21,31 @@
#ifndef _BDROID_BUILDCFG_H #ifndef _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H #define _BDROID_BUILDCFG_H
#include <cutils/properties.h>
#include <string.h>
static inline const char* BtmGetDefaultName()
{
char product_model[PROPERTY_VALUE_MAX];
property_get("ro.product.model", product_model, "");
if (strstr(product_model, "Mi A2"))
return "Mi A2";
if (strstr(product_model, "MI 6X"))
return "MI 6X";
if (strstr(product_model, "MI PAD 4"))
return "MI PAD 4";
if (strstr(product_model, "MI PAD 4 PLUS"))
return "MI PAD 4 PLUS";
// Fallback to ro.product.model
return "";
}
#undef PROPERTY_VALUE_MAX
#define BTM_DEF_LOCAL_NAME BtmGetDefaultName()
#define BLUETOOTH_QTI_SW TRUE
// Disables read remote device feature // Disables read remote device feature
#define MAX_ACL_CONNECTIONS 16 #define MAX_ACL_CONNECTIONS 16
#define MAX_L2CAP_CHANNELS 16 #define MAX_L2CAP_CHANNELS 16