This chapter applies to a person if the person—
(a) is lawfully arrested; or
(b) is in lawful custody for a charge of an offence that has not been decided; orExamples—1 The person may be in lawful custody because bail has been refused or revoked or a condition of bail is contravened.2 The person may be in lawful custody pending the satisfaction of a condition on which the person is to be released on bail.
(c) is in custody under a sentence for a period of imprisonment or, for a child, a detention order; or
(d) is detained for the purposes of testing under chapter 18A ; or
(e) is detained under section 50 in relation to a breach of the peace and is to be transported to a place by a police officer; or
(f) is detained under chapter 2 , part 8 ; or
(g) is otherwise lawfully detained under another Act.