device: Add DA logic to restrict the connection to only one mobile device 32/306932/1 accepted/tizen/7.0/unified/20240304.044929
authorWootak Jung <wootak.jung@samsung.com>
Thu, 29 Feb 2024 02:18:14 +0000 (11:18 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Thu, 29 Feb 2024 02:18:14 +0000 (11:18 +0900)
Change-Id: Ibd4e485a594b2644ef5ab89de8e559a766480cf0
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
src/device.c

index 6cb26dd..f89cf1f 100644 (file)
@@ -7466,8 +7466,13 @@ void device_unpair(struct btd_device *device, gboolean remove_stored)
        device->trusted_profiles.pbap = SHOW_AUTHORIZATION;
        device->trusted_profiles.map = SHOW_AUTHORIZATION;
        device->trusted_profiles.sap = SHOW_AUTHORIZATION;
-       device->trusted_profiles.hfp_hs = SUPPORTED_TRUSTED;
-       device->trusted_profiles.a2dp = SUPPORTED_TRUSTED;
+       if (TIZEN_MODEL_DA) {
+               device->trusted_profiles.hfp_hs = SHOW_AUTHORIZATION;
+               device->trusted_profiles.a2dp = SHOW_AUTHORIZATION;
+       } else {
+               device->trusted_profiles.hfp_hs = SUPPORTED_TRUSTED;
+               device->trusted_profiles.a2dp = SUPPORTED_TRUSTED;
+       }
        if (device->alias != NULL) {
                /* Remove alias name because
                 * In UG if we rename and then unpair device and