James Martin/CNET

Uber drivers in California finally got a feature last month that they'd been requesting for years -- the ability to view passengers' destinations before accepting trips. That means they also get to see how much they will earn from rides and have the ability to reject ones that don't seem worthwhile. For drivers, the feature has widely been seen as a step in the right direction.

It turns out, however, Uber's intent might not have been only to make things better for drivers. The new feature could also be used to make a case that California's new gig worker law, AB 5, shouldn't apply to the ride-hailing company.

The feature was apparently the result of a secret project at the Uber titled "Project Luigi," The Washington Post reported Monday. Internal emails seen by the newspaper allegedly state that Project Luigi was a "critical project around AB5" and it needed employees from across the company to work on it. Staff reportedly got dedicated office space for the project.

AB 5 was signed by Gov. Gavin Newsom in September and went into effect on Jan. 1. The law was designed to give gig workers more labor protections by classifying them as employees. These types of workers have typically been classified as independent contractors, which means they haven't been entitled to basic labor rights, such as minimum wage guarantees, overtime pay and health benefits.

Under AB 5, all companies using independent contractors in California will be put to a three-part test to determine whether they must reclassify their workers. One of the elements the test looks at is how much control a company has over its workers, which includes items like whether workers wear uniforms, have a set schedule and make set wages. Because Uber hadn't let drivers decide what rides they could take, that could be considered an element of control.

"We're making a number of changes to the Uber marketplace, which tens of thousands of California drivers use to find flexible work," an Uber spokesman said in an email when asked about Project Luigi. "While we are confident that drivers are already correctly classified, these product changes will further strengthen drivers' independence and preserve their ability to work when, where and how they want."

Uber, and other gig economy companies like Lyft, DoorDash, Postmates and Instacart, worked for months to stop AB 5 from becoming law. Over the last year they sent out millions of petitions and met with legislators. The five companies banded together in October to unveil a ballot initiative they intend to bring to California voters in November 2020. Together they've contributed a total of $110 million toward the initiative.

Uber and Postmates also filed a lawsuit against California last week aimed at getting AB 5 declared invalid. The lawsuit alleges that AB 5 is unconstitutional and that it unfairly targets gig economy companies and workers. Uber and Postmates are asking the court to exempt them from any AB 5 enforcement.

The new driver feature, reportedly developed under Project Luigi, was announced in early December in a blog post titled: "To California drivers: keeping you in the driver's seat." Before the feature was introduced, drivers who canceled several trips could be deactivated from the platform. Now, drivers in California won't be penalized.

It's still unclear if Uber will be deemed by the state to have control over its drivers. Enforcement of AB 5 depends on various California labor agencies and city and state attorneys. If companies don't comply with the law, they could be sued for violating it.