Code:  static int remove_bond(const bt_bdaddr_t *bd_addr)
 {
     /* sanity check */
     if (interface_ready() == FALSE)
         return BT_STATUS_NOT_READY;

 return btif_dm_remove_bond(bd_addr);
}

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

CWE ID: CWE-20
 static int remove_bond(const bt_bdaddr_t *bd_addr)
 {
    if (is_restricted_mode() && !btif_storage_is_restricted_device(bd_addr))
        return BT_STATUS_SUCCESS;

     /* sanity check */
     if (interface_ready() == FALSE)
         return BT_STATUS_NOT_READY;

 return btif_dm_remove_bond(bd_addr);
}
