Revert "Use Trusted Profiles instead of Restricted Profiles"
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-event-receiver.c
index 790342f..87ac41e 100644 (file)
@@ -1944,17 +1944,17 @@ void _bt_handle_device_event(GVariant *msg, const char *member, const char *path
                        gboolean connected;
 #endif
                        bt_headset_wait_t *wait_list;
-                       guint trusted = TRUE;
+                       guint restricted = 0x0;
 
                        __bt_set_device_values(TRUE,
                                VCONFKEY_BT_DEVICE_A2DP_HEADSET_CONNECTED);
 
                        __bt_connection_manager_set_state(address, event);
 
-                       _bt_get_trust_profile(&bd_addr, TRUSTED_PROFILE_HFP_HF, &trusted);
+                       _bt_get_restrict_profile(&bd_addr, RESTRICTED_PROFILE_HFP_HS, &restricted);
 
                        if (_bt_headset_get_local_connection() == FALSE) {
-                               if (trusted == TRUE) /* not restricted*/
+                               if (restricted == 0x0) /* not restricted*/
                                        _bt_start_timer_for_connection(address, BT_AUDIO_HSP);
                        } else {
                                /* Connection Started from local device therefore no need to
@@ -2374,7 +2374,7 @@ void _bt_handle_headset_event(GVariant *msg, const char *path)
                int event = BLUETOOTH_EVENT_NONE;
                bt_headset_wait_t *wait_list;
                char *address;
-               guint trusted = TRUE;
+               guint restricted = 0x0;
                g_variant_get(value, "b", &property_flag);
 
                address = g_malloc0(BT_ADDRESS_STRING_SIZE);
@@ -2384,10 +2384,10 @@ void _bt_handle_headset_event(GVariant *msg, const char *path)
 
                if (property_flag == TRUE) {
                        event = BLUETOOTH_EVENT_AG_CONNECTED;
-                       _bt_get_trust_profile(&bd_addr, TRUSTED_PROFILE_A2DP, &trusted);
+                       _bt_get_restrict_profile(&bd_addr, RESTRICTED_PROFILE_A2DP, &restricted);
 
                        if (_bt_headset_get_local_connection() == FALSE) {
-                               if (trusted == TRUE) /* not restricted*/
+                               if (restricted == 0x0) /* not restricted*/
                                        _bt_start_timer_for_connection(address, BT_AUDIO_A2DP);
                        } else
                                _bt_headset_set_local_connection(FALSE);