*
***********************************************************************************/
-#define LOG_NDDEBUG 0
#define LOG_TAG "bt_btif"
#include <assert.h>
#include "osi/include/wakelock.h"
#include "stack_manager.h"
#include "btif_config.h"
+#include "btif_storage.h"
#include "btif/include/btif_debug_btsnoop.h"
#include "btif/include/btif_debug_conn.h"
+#include "btif/include/btif_debug_l2c.h"
#include "btif/include/btif_media.h"
/************************************************************************************
************************************************************************************/
bt_callbacks_t *bt_hal_cbacks = NULL;
+bool restricted_mode = FALSE;
/************************************************************************************
** Externs
return BT_STATUS_SUCCESS;
}
-static int enable(void) {
- LOG_INFO(LOG_TAG, "%s", __func__);
+static int enable(bool start_restricted) {
+ LOG_INFO(LOG_TAG, "%s: start restricted = %d", __func__, start_restricted);
+
+ restricted_mode = start_restricted;
if (!interface_ready())
return BT_STATUS_NOT_READY;
stack_manager_get_interface()->clean_up_stack();
}
+bool is_restricted_mode() {
+ return restricted_mode;
+}
+
static int get_adapter_properties(void)
{
/* sanity check */
static int remove_bond(const bt_bdaddr_t *bd_addr)
{
+ if (is_restricted_mode() && !btif_storage_is_restricted_device(bd_addr))
+ return BT_STATUS_SUCCESS;
+
/* sanity check */
if (interface_ready() == FALSE)
return BT_STATUS_NOT_READY;
btif_debug_conn_dump(fd);
btif_debug_bond_event_dump(fd);
btif_debug_a2dp_dump(fd);
+ btif_debug_l2c_dump(fd);
btif_debug_config_dump(fd);
wakelock_debug_dump(fd);
alarm_debug_dump(fd);