PSNI looked through journalists' phone records, court hears