SAP: Make it possible to enforce a 16-digit pin code (1/5)

This change enable the posibility to enforce using a
16-digit pin or MITM for a RFCOMM or L2CAP connection.

This is needed for the SIM access profile.

Change-Id: I02886ce284f27295205def3c66fb76372f5dab4f
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c
index 976c1cc..8b8f121 100644
--- a/btif/src/btif_dm.c
+++ b/btif/src/btif_dm.c
@@ -907,7 +907,7 @@
     }
 
     /* check for auto pair possiblity only if bond was initiated by local device */
-    if (pairing_cb.is_local_initiated)
+    if (pairing_cb.is_local_initiated && (p_pin_req->min_16_digit == FALSE))
     {
         if (check_cod(&bd_addr, COD_AV_HEADSETS) ||
             check_cod(&bd_addr, COD_AV_HANDSFREE) ||
@@ -951,7 +951,7 @@
         }
     }
     HAL_CBACK(bt_hal_cbacks, pin_request_cb,
-                     &bd_addr, &bd_name, cod);
+                     &bd_addr, &bd_name, cod, p_pin_req->min_16_digit);
 }
 
 /*******************************************************************************
@@ -3116,7 +3116,7 @@
     cod = COD_UNCLASSIFIED;
 
     HAL_CBACK(bt_hal_cbacks, pin_request_cb,
-              &bd_addr, &bd_name, cod);
+              &bd_addr, &bd_name, cod, FALSE);
 }
 static void btif_dm_ble_key_nc_req_evt(tBTA_DM_SP_KEY_NOTIF *p_notif_req)
 {