DO NOT MERGE ANYWHERE Fix double mutex unlock and if() condition

Commit "L2CAP and SDP Search API for BT profiles (2/2)" introduced two
separate issues in btsock_rfc_signaled():

1. The "slot_lock" potentially gets unlocked twice, causing
   undefined behaviour.

2. The call to BTA_JvRfcommWrite() was incorrectly taken outside
   of the conditional if() block that only executes the code if
   data is available.

This patch reverts the relevant locking change and fixes the if()
condition.

Bug: 27204458
Change-Id: I63b1257d21ca7bdd248858ec67e28f64e37a7895
(cherry picked from commit eecf994c970e7249fbc9c882a7eb647064ebb12d)
1 file changed
tree: f823c58fa7a2222dcb2ef69a1ab3bc7c2ab7039b
  1. gki/
  2. system/
  3. Android.mk
  4. CleanSpec.mk
  5. MODULE_LICENSE_APACHE2
  6. NOTICE