A person granted bail for an offence who is present in a courtroom or court premises when the matter is called is taken to be in the custody of the court on and from the calling of the matter concerned until the court completes its dealing with the matter (whether or not the person surrenders to the custody of the court).