2 * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
22 #include <syspopup_caller.h>
23 #include <bundle_internal.h>
25 #include "bluetooth-api.h"
26 #include "bt-internal-types.h"
28 #include "bt-service-common.h"
29 #include "bt-service-dpm.h"
31 static dpm_policy_t policy_table[DPM_POLICY_END] = {
32 [DPM_POLICY_ALLOW_BLUETOOTH] = {{DPM_BT_ERROR}},
33 [DPM_POLICY_BLUETOOTH_DEVICE_RESTRICTION] = {{DPM_STATUS_ERROR}},
34 [DPM_POLICY_BLUETOOTH_UUID_RESTRICTION] = {{DPM_STATUS_ERROR}},
35 [DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST] = {{NULL}},
36 [DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST] = {{NULL}},
37 [DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST] = {{NULL}},
38 [DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST] = {{NULL}},
39 [DPM_POLICY_ALLOW_BLUETOOTH_OUTGOING_CALL] = {{DPM_STATUS_ERROR}},
40 [DPM_POLICY_BLUETOOTH_PAIRING_STATE] = {{DPM_STATUS_ERROR}},
41 [DPM_POLICY_BLUETOOTH_DESKTOP_CONNECTIVITY_STATE] = {{DPM_STATUS_ERROR}},
42 [DPM_POLICY_BLUETOOTH_DISCOVERABLE_STATE] = {{DPM_STATUS_ERROR}},
43 [DPM_POLICY_BLUETOOTH_LIMITED_DISCOVERABLE_STATE] = {{DPM_STATUS_ERROR}},
44 [DPM_POLICY_BLUETOOTH_DATA_TRANSFER_STATE] = {{DPM_STATUS_ERROR}},
49 * @brief DPM profile state
52 static dpm_profile_state_t dpm_profile_state[DPM_PROFILE_NONE] = {
53 [DPM_POLICY_BLUETOOTH_A2DP_PROFILE_STATE] = {DPM_STATUS_ERROR},
54 [DPM_POLICY_BLUETOOTH_AVRCP_PROFILE_STATE] = {DPM_STATUS_ERROR},
55 [DPM_POLICY_BLUETOOTH_BPP_PROFILE_STATE] = {DPM_STATUS_ERROR},
56 [DPM_POLICY_BLUETOOTH_DUN_PROFILE_STATE] = {DPM_STATUS_ERROR},
57 [DPM_POLICY_BLUETOOTH_FTP_PROFILE_STATE] = {DPM_STATUS_ERROR},
58 [DPM_POLICY_BLUETOOTH_HFP_PROFILE_STATE] = {DPM_STATUS_ERROR},
59 [DPM_POLICY_BLUETOOTH_HSP_PROFILE_STATE] = {DPM_STATUS_ERROR},
60 [DPM_POLICY_BLUETOOTH_PBAP_PROFILE_STATE] = {DPM_STATUS_ERROR},
61 [DPM_POLICY_BLUETOOTH_SAP_PROFILE_STATE] = {DPM_STATUS_ERROR},
62 [DPM_POLICY_BLUETOOTH_SPP_PROFILE_STATE] = {DPM_STATUS_ERROR},
65 dpm_result_t _bt_dpm_set_allow_bluetooth_mode(dpm_bt_allow_t value)
67 BT_INFO("_bt_dpm_set_allow_bluetooth_mode");
68 policy_table[DPM_POLICY_ALLOW_BLUETOOTH].value = value;
70 return DPM_RESULT_SUCCESS;
73 dpm_bt_allow_t _bt_dpm_get_allow_bluetooth_mode(void)
75 BT_INFO("_bt_dpm_get_allow_bluetooth_mode");
76 return policy_table[DPM_POLICY_ALLOW_BLUETOOTH].value;
79 dpm_result_t _bt_dpm_activate_bluetooth_device_restriction(dpm_status_t value)
81 BT_INFO("_bt_dpm_activate_bluetooth_device_restriction");
82 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
83 return DPM_RESULT_ACCESS_DENIED;
85 policy_table[DPM_POLICY_BLUETOOTH_DEVICE_RESTRICTION].value = value;
87 return DPM_RESULT_SUCCESS;
90 dpm_status_t _bt_dpm_is_bluetooth_device_restriction_active(void)
92 BT_INFO("_bt_dpm_is_bluetooth_device_restriction_active");
94 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
95 return DPM_RESTRICTED;
97 return policy_table[DPM_POLICY_BLUETOOTH_DEVICE_RESTRICTION].value;
100 dpm_result_t _bt_dpm_activate_bluetoooth_uuid_restriction(dpm_status_t value)
102 BT_INFO("_bt_dpm_activate_bluetooth_device_restriction");
103 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
104 return DPM_RESULT_ACCESS_DENIED;
106 policy_table[DPM_POLICY_BLUETOOTH_UUID_RESTRICTION].value = value;
108 return DPM_RESULT_SUCCESS;
111 dpm_status_t _bt_dpm_is_bluetooth_uuid_restriction_active(void)
113 BT_INFO("_bt_dpm_is_bluetooth_uuid_restriction_active");
115 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
116 return DPM_RESTRICTED;
118 return policy_table[DPM_POLICY_BLUETOOTH_UUID_RESTRICTION].value;
121 dpm_result_t _bt_dpm_add_bluetooth_devices_to_blacklist(char *device_address)
124 BT_INFO("_bt_dpm_add_bluetooth_devices_to_blacklist");
126 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
127 return DPM_RESULT_ACCESS_DENIED;
129 dev_addr = g_strdup(device_address);
131 return DPM_RESULT_FAIL;
132 policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list = g_slist_append(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list, dev_addr);
133 return DPM_RESULT_SUCCESS;
136 GSList *_bt_dpm_get_bluetooth_devices_from_blacklist(void)
138 BT_INFO("_bt_dpm_get_bluetooth_devices_from_blacklist");
140 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
143 return policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list;
146 dpm_result_t _bt_dpm_add_bluetooth_devices_to_whitelist(char *device_address)
149 BT_INFO("_bt_dpm_add_bluetooth_devices_to_whitelist");
151 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
152 return DPM_RESULT_ACCESS_DENIED;
154 dev_addr = g_strdup(device_address);
156 return DPM_RESULT_FAIL;
157 policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list = g_slist_append(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list, dev_addr);
158 return DPM_RESULT_SUCCESS;
161 GSList *_bt_dpm_get_bluetooth_devices_from_whitelist(void)
163 BT_INFO("_bt_dpm_get_bluetooth_devices_from_whitelist");
165 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
168 return policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list;
171 dpm_result_t _bt_dpm_add_bluetooth_uuids_to_blacklist(char *uuid)
174 BT_INFO("_bt_dpm_add_bluetooth_uuids_to_blacklist");
176 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
177 return DPM_RESULT_ACCESS_DENIED;
179 l_uuid = g_strdup(uuid);
181 return DPM_RESULT_FAIL;
182 policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list = g_slist_append(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list, l_uuid);
183 return DPM_RESULT_SUCCESS;
186 GSList *_bt_dpm_get_bluetooth_uuids_from_blacklist(void)
188 BT_INFO("_bt_dpm_get_bluetooth_uuids_from_blacklist");
190 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
193 return policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list;
196 dpm_result_t _bt_dpm_add_bluetooth_uuids_to_whitelist(char *uuid)
199 BT_INFO("_bt_dpm_add_bluetooth_uuids_to_blacklist");
201 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
202 return DPM_RESULT_ACCESS_DENIED;
204 l_uuid = g_strdup(uuid);
206 return DPM_RESULT_FAIL;
207 policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list = g_slist_append(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list, l_uuid);
208 return DPM_RESULT_SUCCESS;
212 GSList *_bt_dpm_get_bluetooth_uuids_from_whitelist(void)
214 BT_INFO("_bt_dpm_get_bluetooth_uuids_from_whitelist");
216 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
219 return policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list;
222 dpm_result_t _bt_dpm_set_allow_bluetooth_outgoing_call(dpm_status_t value)
224 BT_INFO("_bt_dpm_activate_bluetooth_device_restriction");
225 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
226 return DPM_RESULT_ACCESS_DENIED;
228 policy_table[DPM_POLICY_ALLOW_BLUETOOTH_OUTGOING_CALL].value = value;
230 return DPM_RESULT_SUCCESS;
233 dpm_status_t _bt_dpm_get_allow_bluetooth_outgoing_call(void)
235 BT_INFO("_bt_dpm_get_allow_bluetooth_outgoing_call");
237 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
238 return DPM_RESTRICTED;
240 return policy_table[DPM_POLICY_ALLOW_BLUETOOTH_OUTGOING_CALL].value;
243 dpm_result_t _bt_dpm_clear_bluetooth_devices_from_blacklist(void)
246 BT_INFO("_bt_dpm_clear_bluetooth_devices_from_blacklist");
248 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
249 return DPM_RESULT_ACCESS_DENIED;
251 for (l = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list; l; l = g_slist_next(l)) {
252 char *address = l->data;
254 policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list, address);
258 return DPM_RESULT_SUCCESS;
261 dpm_result_t _bt_dpm_clear_bluetooth_devices_from_whitelist(void)
264 BT_INFO("_bt_dpm_clear_bluetooth_devices_from_blacklist");
266 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
267 return DPM_RESULT_ACCESS_DENIED;
269 for (l = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list; l; l = g_slist_next(l)) {
270 char *address = l->data;
272 policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list, address);
276 return DPM_RESULT_SUCCESS;
279 dpm_result_t _bt_dpm_clear_bluetooth_uuids_from_blacklist(void)
282 BT_INFO("_bt_dpm_clear_bluetooth_devices_from_blacklist");
284 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
285 return DPM_RESULT_ACCESS_DENIED;
287 for (l = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list; l; l = g_slist_next(l)) {
288 char *l_uuid = l->data;
290 policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list, l_uuid);
293 return DPM_RESULT_SUCCESS;
296 dpm_result_t _bt_dpm_clear_bluetooth_uuids_from_whitelist(void)
299 BT_INFO("_bt_dpm_clear_bluetooth_uuids_from_whitelist");
301 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
302 return DPM_RESULT_ACCESS_DENIED;
304 for (l = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list; l; l = g_slist_next(l)) {
305 char *l_uuid = l->data;
307 policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list = g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list, l_uuid);
311 return DPM_RESULT_SUCCESS;
314 dpm_status_t _bt_dpm_set_bluetooth_pairing_state(dpm_status_t value)
316 BT_INFO("_bt_dpm_set_bluetooth_pairing_state");
318 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
319 return DPM_RESTRICTED;
321 policy_table[DPM_POLICY_BLUETOOTH_PAIRING_STATE].value = value;
323 return DPM_RESULT_SUCCESS;
326 dpm_status_t _bt_dpm_get_bluetooth_pairing_state(void)
328 BT_INFO("_bt_dpm_get_bluetooth_pairing_state");
330 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
331 return DPM_RESTRICTED;
333 return policy_table[DPM_POLICY_BLUETOOTH_PAIRING_STATE].value;
336 dpm_status_t _bt_dpm_set_bluetooth_profile_state(dpm_profile_t profile, dpm_status_t value)
338 BT_INFO("_bt_dpm_set_bluetooth_profile_state");
340 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
341 return DPM_RESTRICTED;
343 dpm_profile_state[profile].value = value;
345 return DPM_RESULT_SUCCESS;
348 dpm_status_t _bt_dpm_get_bluetooth_profile_state(dpm_profile_t profile)
350 BT_INFO("_bt_dpm_get_bluetooth_profile_state");
352 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
353 return DPM_RESTRICTED;
355 return dpm_profile_state[profile].value;
358 dpm_status_t _bt_dpm_set_bluetooth_desktop_connectivity_state(dpm_status_t value)
360 BT_INFO("_bt_dpm_set_bluetooth_desktop_connectivity_state");
362 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
363 return DPM_RESTRICTED;
365 policy_table[DPM_POLICY_BLUETOOTH_DESKTOP_CONNECTIVITY_STATE].value = value;
367 return DPM_RESULT_SUCCESS;
370 dpm_status_t _bt_dpm_get_bluetooth_desktop_connectivity_state(void)
372 BT_INFO("_bt_dpm_get_bluetooth_desktop_connectivity_state");
374 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
375 return DPM_RESTRICTED;
377 return policy_table[DPM_POLICY_BLUETOOTH_DESKTOP_CONNECTIVITY_STATE].value;
380 dpm_status_t _bt_dpm_set_bluetooth_discoverable_state(dpm_status_t value)
382 BT_INFO("_bt_dpm_set_bluetooth_discoverable_state");
384 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
385 return DPM_RESTRICTED;
387 policy_table[DPM_POLICY_BLUETOOTH_DISCOVERABLE_STATE].value = value;
389 return DPM_RESULT_SUCCESS;
392 dpm_status_t _bt_dpm_get_bluetooth_discoverable_state(void)
394 BT_INFO("_bt_dpm_get_bluetooth_discoverable_state");
396 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
397 return DPM_RESTRICTED;
399 return policy_table[DPM_POLICY_BLUETOOTH_DISCOVERABLE_STATE].value;
402 dpm_status_t _bt_dpm_set_bluetooth_limited_discoverable_state(dpm_status_t value)
404 BT_INFO("_bt_dpm_set_bluetooth_limited_discoverable_state");
406 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
407 return DPM_RESTRICTED;
409 policy_table[DPM_POLICY_BLUETOOTH_LIMITED_DISCOVERABLE_STATE].value = value;
411 return DPM_RESULT_SUCCESS;
414 dpm_status_t _bt_dpm_get_bluetooth_limited_discoverable_state(void)
416 BT_INFO("_bt_dpm_get_bluetooth_limited_discoverable_state");
418 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
419 return DPM_RESTRICTED;
421 return policy_table[DPM_POLICY_BLUETOOTH_LIMITED_DISCOVERABLE_STATE].value;
424 dpm_status_t _bt_dpm_set_bluetooth_data_transfer_state(dpm_status_t value)
426 BT_INFO("_bt_dpm_set_bluetooth_data_transfer_state");
428 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
429 return DPM_RESTRICTED;
431 return policy_table[DPM_POLICY_BLUETOOTH_DATA_TRANSFER_STATE].value = value;
434 dpm_status_t _bt_dpm_get_allow_bluetooth_data_transfer_state(dpm_status_t value)
436 BT_INFO("_bt_dpm_get_allow_bluetooth_data_transfer_state");
438 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
439 return DPM_RESTRICTED;
441 return policy_table[DPM_POLICY_BLUETOOTH_DATA_TRANSFER_STATE].value;
444 dpm_result_t _bt_dpm_remove_bluetooth_devices_from_whitelist(GSList *device_addresses)
447 GSList *device_list = NULL;
448 BT_INFO("_bt_dpm_remove_bluetooth_devices_from_whitelist");
450 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
451 return DPM_RESULT_ACCESS_DENIED;
453 for (device_list = device_addresses; device_list; device_list = g_slist_next(device_list)) {
454 for (l = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list; l; l = g_slist_next(l)) {
455 if (l->data == device_list->data) {
456 char *addr = device_list->data;
458 policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list =
459 g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_WHITELIST].list, addr);
466 return DPM_RESULT_SUCCESS;
469 dpm_result_t _bt_dpm_remove_bluetooth_devices_from_blacklist(GSList *device_addresses)
472 GSList *device_list = NULL;
473 BT_INFO("_bt_dpm_remove_bluetooth_devices_from_blacklist");
475 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
476 return DPM_RESULT_ACCESS_DENIED;
478 for (device_list = device_addresses; device_list; device_list = g_slist_next(device_list)) {
479 for (l = policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list; l; l = g_slist_next(l)) {
480 if (l->data == device_list->data) {
481 char *addr = device_list->data;
483 policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list =
484 g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list, addr);
491 return DPM_RESULT_SUCCESS;
494 dpm_result_t _bt_dpm_remove_bluetooth_uuids_from_whitelist(GSList *uuids)
497 GSList *uuids_list = NULL;
498 BT_INFO("_bt_dpm_remove_bluetooth_uuids_from_whitelist");
500 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
501 return DPM_RESULT_ACCESS_DENIED;
503 for (uuids_list = uuids; uuids_list; uuids_list = g_slist_next(uuids_list)) {
504 for (l = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list; l; l = g_slist_next(l)) {
505 if (l->data == uuids_list->data) {
506 char *uuid = uuids_list->data;
508 policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list =
509 g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_WHITELIST].list, uuid);
516 return DPM_RESULT_SUCCESS;
519 dpm_result_t _bt_dpm_remove_bluetooth_uuids_from_blacklist(GSList *uuids)
522 GSList *uuids_list = NULL;
523 BT_INFO("_bt_dpm_remove_bluetooth_uuids_from_blacklist");
525 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
526 return DPM_RESULT_ACCESS_DENIED;
528 for (uuids_list = uuids; uuids_list; uuids_list = g_slist_next(uuids_list)) {
529 for (l = policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list; l; l = g_slist_next(l)) {
530 if (l->data == uuids_list->data) {
531 char *uuid = uuids_list->data;
533 policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list =
534 g_slist_remove(policy_table[DPM_POLICY_BLUETOOTH_UUIDS_BLACKLIST].list, uuid);
541 return DPM_RESULT_SUCCESS;
544 dpm_result_t _bt_dpm_clear_bluetooth_uuids_from_list(void)
546 BT_INFO("_bt_dpm_clear_bluetooth_uuids_from_list");
547 dpm_result_t err = DPM_RESULT_FAIL;
549 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
550 return DPM_RESULT_ACCESS_DENIED;
552 err = _bt_dpm_clear_bluetooth_uuids_from_blacklist();
554 err = _bt_dpm_clear_bluetooth_uuids_from_blacklist();
560 dpm_result_t _bt_dpm_clear_bluetooth_devices_from_list(void)
562 BT_INFO("_bt_dpm_clear_bluetooth_devices_from_list");
563 dpm_result_t err = DPM_RESULT_FAIL;
565 if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_RESTRICTED)
566 return DPM_RESULT_ACCESS_DENIED;
568 err = _bt_dpm_clear_bluetooth_devices_from_blacklist();
570 err = _bt_dpm_clear_bluetooth_devices_from_blacklist();