In a surprise weekend announcement, Apple and HTC report they have ended all their patent disputes. The financial terms are confidential, but HTC has been on the losing end of the legal action, so it's hard to believe the Taiwanese company didn't pay something to Apple. The new deal includes a 10-year license to current and future patents held by both companies.

The Apple-HTC battle has been going on since 2010, and it hasn't been going well at all for HTC. The company lost a case to Apple in late 2011 at the International Trade Commission, although it quickly worked around Apple's win on what it called a minor user-interface patent. HTC's own trade commission case against Apple phones failed. Despite those setbacks, less than three months ago, HTC was assuring reporters it intended to keep fighting Apple.

Assuming HTC is paying Apple something to make these lawsuits go away, it's on top of the reported $5 per Android phone royalty that HTC is already paying to Microsoft. To be sure, Apple had reasons to settle as well. Litigation is always a headache, and HTC is looking like a small-time competitor these days.

Ending its litigation against HTC isn't necessarily a sign Apple is ready to end its much larger crusade against Samsung. That company is the leading US smartphone seller and a major rival. But Apple has the edge in court right now, and it is likely to push that advantage. Apple is also sparring with Google-owned Motorola over patents.

When Apple first filed its lawsuit, HTC was somewhat patent-poor. It owned dozens of its own patents, compared to the thousands owned by Apple. HTC ultimately received patents from Google to keep up its patent fight against Apple, and also purchased a California company called S3 Graphics for $300 million (primarily to gain its patent portfolio). That didn't help matters much, either.

Apple's case against Samsung resulted in a $1 billion verdict for Apple this summer. Samsung is appealing that, while Apple tries to tack on additional damages and get Samsung products kicked off the market.

The CEOs both released short quotes about today's settlement.

“HTC is pleased to have resolved its dispute with Apple, so HTC can focus on innovation instead of litigation,” said Peter Chou, CEO of HTC.

“We are glad to have reached a settlement with HTC," said Apple CEO Tim Cook. "We will continue to stay laser focused on product innovation."

In addition to its courtroom setbacks, HTC isn't doing well financially. It recently reported a dramatic 79 percent downturn in year-over-year profits, and HTC stock is down about 80 percent from its high point in mid-2011. If HTC's decline continues, the lingering question may be this: did the once high-flying Taiwanese company shoot itself in the foot with poor business decisions, or was it the first victim of the smartphone patent wars?