In a surprising end to what many analysts thought would be a yearslong patent battle, Apple Inc. (NASDAQ:AAPLC) and Nokia Corp. (NYSE:NOKD) have settled their dueling lawsuits. Apple agreed to make an upfront cash payment to Nokia with additional payments over several years.Apple will also resume selling Nokia’s digital health products in its stores and online and, at the same time, be able to move resources to its much bigger patent battle with Qualcomm Inc. (NASDAQ:QCOMC).Related: WHAT’S NEXT FOR APPLE?On To Bigger ThingsThe role played by the escalating patent war between Apple and Qualcomm Inc. cannot be understated. Apple can now use its significant legal resources to do battle with Qualcomm over how much Apple should pay for intellectual property used in Apple products.Independent intellectual property analyst Florian Mueller said, “It sounds like business considerations other than patents played a role here. This deal (with Nokia) should allow Apple to focus on the dispute with Qualcomm, which is economically and strategically much bigger.”The New DealUnder terms of the new deal between Nokia and Apple, not only will Nokia receive cash up front, it will also receive additional revenue over several years. The new deal is expected to be better than a previous deal between the two companies.Under the new agreement, Nokia will provide network products and services to Apple and Apple will resume carrying Nokia’s digital health products in its retail and online stores. The deal also calls for further future collaboration in digital health, according to Nokia.What Nokia GetsNokia will receive patent licensing net sales in the Nokia Technologies division and also net sales in other Nokia business groups. Importantly this indicates the payments from Apple are for products and for services – not just part of a patent settlement.Nokia will disclose patent licensing revenue in its quarterly reports. It said it expects revenues to be recognized in Q2 2017. According to Nokia chief legal officer, Maria Varsellona, “This is a meaningful agreement between Nokia and Apple. It moves our relationship with Apple from being adversaries in court to business partners working for the benefit of our customers.”Related: AI PRICING IS GROWINGApple’s TakeawayWhile Nokia clearly gets the stock price bump in this agreement, with stock prices rising as much as 6% on news of the deal, Apple gets more out of it than access to legal resources to fight the Qualcomm battle.For one thing, courtroom battles rarely offer positive publicity. For another, the return of Nokia digital health products to Apple stores and online means more revenue for both companies. Finally, the partnership between the two companies will likely lead to more innovation and in tech, innovation is always a good thing.