Pierre-Hugues Husson | c4ccbd9 | 2018-02-20 23:03:30 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013, The Linux Foundation. All rights reserved. |
| 3 | * Not a Contribution, Apache license notifications and license are retained |
| 4 | * for attribution purposes only. |
| 5 | * |
| 6 | * Copyright (C) 2012 The Android Open Source Project |
| 7 | * |
| 8 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | * you may not use this file except in compliance with the License. |
| 10 | * You may obtain a copy of the License at |
| 11 | * |
| 12 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | * |
| 14 | * Unless required by applicable law or agreed to in writing, software |
| 15 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | * See the License for the specific language governing permissions and |
| 18 | * limitations under the License. |
| 19 | */ |
| 20 | |
| 21 | #ifndef _BDROID_BUILDCFG_H |
| 22 | #define _BDROID_BUILDCFG_H |
| 23 | |
| 24 | #include <cutils/properties.h> |
| 25 | #include <string.h> |
| 26 | |
| 27 | static inline const char* BtmDefLocalName() |
| 28 | { |
| 29 | static char product_device[PROPERTY_VALUE_MAX]; |
| 30 | //Huawei-defined property |
| 31 | property_get("ro.config.marketing_name", product_device, ""); |
| 32 | |
| 33 | if (strcmp(product_device, "") != 0) |
| 34 | return product_device; |
| 35 | |
| 36 | // Fallback to ro.product.model |
| 37 | return ""; |
| 38 | } |
| 39 | |
| 40 | static inline bool BtmBypassExtraAclSetup() { |
| 41 | int8_t prop = property_get_bool("persist.sys.bt_acl_bypass", false); |
| 42 | return prop == true; |
| 43 | } |
| 44 | |
| 45 | #define BTM_DEF_LOCAL_NAME BtmDefLocalName() |
| 46 | #define BTM_BYPASS_EXTRA_ACL_SETUP BtmBypassExtraAclSetup() |
| 47 | |
| 48 | #endif |