Unpair failed due to AVRCP connection 64/139364/2
authorSreeraj Mohan Kottapuzhackal <sreeraj.mk@samsung.com>
Thu, 16 Feb 2017 11:25:51 +0000 (16:55 +0530)
committerPyun DoHyun <dh79.pyun@samsung.com>
Wed, 19 Jul 2017 02:55:59 +0000 (02:55 +0000)
[Model] All
[BinType] AP
[Customer] All

[Issue#] P170216-05153
[Request] PLM
[Occurrence Version] All

[Problem] User couldn't unpair the device
[Cause & Measure] Cause: AVRCP connection is triggered during unpair and
the device is marked as not temporary
                  Measure: Do not initiate AVRCP connection if device is
marked temporary
[Checking Method] Unit testing

[Team] Connectivity
[Developer] sreeraj.mk
[Solution company] Samsung
[Change Type] N/A

Change-Id: I27f344c5fd0bef434ea614836d7fd0be3b1971df

profiles/audio/avrcp.c

index 4917a54..4fb6576 100644 (file)
@@ -4584,6 +4584,11 @@ static int avrcp_connect(struct btd_service *service)
                DBG("Don't initiate avrcp connection with this headset");
                return -ENOTSUP;
        }
+
+       /* Device unpairing failed if AVRCP connection is triggered
+       during unpairing*/
+       if (device_is_temporary(dev))
+               return -EPERM;
 #endif
        return control_connect(service);
 }