-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbdroid_buildcfg.h
59 lines (52 loc) · 1.68 KB
/
bdroid_buildcfg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
*
* Copyright (c) 2013, The Linux Foundation. All rights reserved.
* Not a Contribution, Apache license notifications and license are retained
* for attribution purposes only.
*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H
#include <stdint.h>
#include <string.h>
#ifdef __cplusplus
extern "C" {
#endif
int property_get(const char *key, char *value, const char *default_value);
#ifdef __cplusplus
}
#endif
static inline const char* BtmGetDefaultName()
{
char product_device[92];
property_get("ro.product.device", product_device, "");
if (strstr(product_device, "cancro"))
return "Xiaomi MI3W";
if (strstr(product_device, "virgo"))
return "Xiaomi Note LTE";
// Fallback to ro.product.model
return "";
}
#define BTM_DEF_LOCAL_NAME BtmGetDefaultName()
#define BLUETOOTH_QTI_SW TRUE
// Enables Interleave scan
#define BTA_SKIP_BLE_READ_REMOTE_FEAT TRUE
#define BTA_HOST_INTERLEAVE_SEARCH TRUE
#define MAX_L2CAP_CHANNELS 16
// skips conn update at conn completion
#define BTA_BLE_SKIP_CONN_UPD TRUE
#define BT_CLEAN_TURN_ON_DISABLED 1
#endif