What just happened? Apple and Qualcomm have agreed to end all legal battles worldwide. The two companies went back and forth over two years with each winning cases in different countries. However, it seems the two tech giants have worked out their differences, possibly due to mutual interest concerning upcoming 5G capable iPhones.

Apple and Qualcomm squared off in a San Deigo courtroom yesterday in what many thought would be a protracted trial. Inexplicably nonetheless they have agreed to settle all of their ongoing litigation worldwide.

The battle started two years ago when Apple accused Qualcomm of using their patents for extortion. Qualcomm typically doesn't allow customers to buy their chips unless they license their patent portfolio first. Apple argued that Qualcomm was using its position as market leader in mobile chipsets to charge unreasonably high fees to license those patents.

Qualcomm countered Apple, accusing them of patent infringement as well as stealing trade secrets and giving them to Intel. Since then, both companies have engaged in legal battles around the world with Qualcomm winning a few of them in China and Germany, the latter of which resulted in a ban of older iPhones. Apple was able to eke out a win last month, however.

The trial in San Diego was supposed to end the dispute once and for all and seems to have succeeded. That said, while Qualcomm's battle with Apple is over, the company still has to tangle with the Federal Trade Commission who filed suit against Qualcomm concerning possible patent abuse.

Per the agreement, Apple will pay Qualcomm for a six-year license agreement. In return, Qualcomm will continue to provide Apple with mobile chips. News of the agreement sent Qualcomm's stock up over 20 percent.

Digging a little deeper, the results of this litigation could have led to interesting consequences. Jacob Kastrenakes from The Verge comments that had Apple won the battle, it could've secured lower prices for Qualcomm's chips and made it easier for Qualcomm competitors. Conversely, had Qualcomm won, it may have pushed its fees even higher in order to take advantage of its market position.

This is especially true of the upcoming 5G deployments. Qualcomm is ostensibly the market leader when it comes to 5G modems. Smartphones such as the Samsung Galaxy S10 5G will make use of Qualcomm's 5G technology while Intel is still playing catch-up. This might also be why Apple wanted to end the litigation with Qualcomm so it could begin testing Qualcomm's modems in upcoming iPhones.