On Wednesday, a federal judge in San Francisco rejected a proposed legal settlement from Google and class action attorneys over Google's practice of scanning the contents of emails without the knowledge or permission of the sender.

Google agreed to pay $2.2 million, which would have been awarded to the lawsuit attorneys. None of the settlement would have been made available to consumers. In addition, Judge Lucy Koh found the agreement failed to clearly inform consumers about Google's email scanning practices. 

Read: Google Agrees To Change Email Scanning Process To Avoid Privacy Lawsuit

"This notice is difficult to understand and does not clearly disclose the fact that Google intercepts, scans and analyzes the content of emails sent by non-Gmail users to Gmail users for the purpose of creating user profiles of the Gmail users to create targeted advertising for the Gmail users," Koh wrote as part of a six-page order.

The case stems from an ongoing legal challenge to Google over its practice of scanning incoming emails sent to Gmail users. During the scan, a process that takes just fractions of a second to complete, the company gleans information from the contents of the message, which is used by the company's ad-targeting system.

Critics of the practice have questioned the search giant, claiming that its scans are a form of illegal wiretapping and are in violation of California privacy laws. While Google's system is automated and doesn't allow employees to read emails, privacy advocates have argued the scans are equivalent to a phone company listening to phone calls to gather information about subscribers. 

The practice is allowed for emails sent and received by Gmail users, as it is disclosed in the company's terms of service. However, senders communicating with Gmail users have not agreed to allow their messages to be scanned by the company.

Read: Yahoo Spying On Emails: Edward Snowden Urges Users To Close Account After Reuters Intelligence Report

Google agreed to voluntarily change its scanning practice as part of the legal settlement originally agreed to in December 2016. The company agreed to continue to pre-screen emails for virus protection and spam filtering purposes, but would postpone the advertising-related scan until after the email becomes accessible in a user's inbox.

In her decision to reject the settlement, Judge Koh argued that Google does not clearly explain its workaround and said it was not clear if the change would be enough to bring Google into compliance with wiretapping laws. 

The parties will have to renegotiate a settlement for the case—likely one that requires Google to further publicize its email scanning practices and provides compensation for users who may have been affected by the scans.