(a) This section applies only to public records that relate to:
(1) police reports of traffic accidents;
(2) criminal charging documents before service on the defendant named in the document; or
(3) traffic citations filed in the Maryland Automated Traffic System.
(b) A custodian shall deny inspection of a record described in subsection (a) of this section to any of the following persons who request inspection of records to solicit or market legal services:
(1) an attorney who is not an attorney of record of a person named in the record; or
(2) a person who is employed by, retained by, associated with, or acting on behalf of an attorney described in this subsection.