Code: void bdt_enable(void)
{
    bdt_log("ENABLE BT");
 if (bt_enabled) {

         bdt_log("Bluetooth is already enabled");
         return;
     }
    status = sBtInterface->enable();
 
     check_return_status(status);
 }

Vulnerability Type: +Priv 
CWE ID: CWE-20
Summary: Bluetooth in Android 5.0.x before 5.0.2, 5.1.x before 5.1.1, and 6.x before 2016-07-01 allows local users to gain privileges by establishing a pairing that remains present during a session of the primary user, aka internal bug 27410683.
Commit Message: Add guest mode functionality (2/3)

Add a flag to enable() to start Bluetooth in restricted
mode. In restricted mode, all devices that are paired during
restricted mode are deleted upon leaving restricted mode.
Right now restricted mode is only entered while a guest
user is active.

Bug: 27410683
Change-Id: I8f23d28ef0aa3a8df13d469c73005c8e1b894d19
