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 | |
Pierre-Hugues Husson | 2623dc5 | 2018-08-07 12:49:42 +0200 | [diff] [blame] | 24 | //#include <cutils/properties.h> |
Pierre-Hugues Husson | c4ccbd9 | 2018-02-20 23:03:30 +0100 | [diff] [blame] | 25 | #include <string.h> |
| 26 | |
| 27 | static inline const char* BtmDefLocalName() |
| 28 | { |
Pierre-Hugues Husson | d1ae132 | 2018-08-07 12:50:47 +0200 | [diff] [blame] | 29 | #if 0 |
Pierre-Hugues Husson | c4ccbd9 | 2018-02-20 23:03:30 +0100 | [diff] [blame] | 30 | static char product_device[PROPERTY_VALUE_MAX]; |
| 31 | //Huawei-defined property |
| 32 | property_get("ro.config.marketing_name", product_device, ""); |
| 33 | |
| 34 | if (strcmp(product_device, "") != 0) |
| 35 | return product_device; |
| 36 | |
| 37 | // Fallback to ro.product.model |
| 38 | return ""; |
Pierre-Hugues Husson | d1ae132 | 2018-08-07 12:50:47 +0200 | [diff] [blame] | 39 | #endif |
| 40 | return "hello"; |
Pierre-Hugues Husson | c4ccbd9 | 2018-02-20 23:03:30 +0100 | [diff] [blame] | 41 | } |
| 42 | |
Pierre-Hugues Husson | 3a298bc | 2018-08-07 13:09:49 +0200 | [diff] [blame] | 43 | static inline int BtmBypassExtraAclSetup() { |
Pierre-Hugues Husson | d1ae132 | 2018-08-07 12:50:47 +0200 | [diff] [blame] | 44 | #if 0 |
Pierre-Hugues Husson | c4ccbd9 | 2018-02-20 23:03:30 +0100 | [diff] [blame] | 45 | int8_t prop = property_get_bool("persist.sys.bt_acl_bypass", false); |
| 46 | return prop == true; |
Pierre-Hugues Husson | d1ae132 | 2018-08-07 12:50:47 +0200 | [diff] [blame] | 47 | #endif |
Pierre-Hugues Husson | 3a298bc | 2018-08-07 13:09:49 +0200 | [diff] [blame] | 48 | return 1; |
Pierre-Hugues Husson | c4ccbd9 | 2018-02-20 23:03:30 +0100 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | #define BTM_DEF_LOCAL_NAME BtmDefLocalName() |
| 52 | #define BTM_BYPASS_EXTRA_ACL_SETUP BtmBypassExtraAclSetup() |
| 53 | |
| 54 | #endif |