RIM has agreed to re-license patents from Nokia, putting an end to several lawsuits between the two companies. Nokia had sued both RIM and HTC in Germany back in May, and then struck RIM on its home turf in Canada just last month. There was also a breach of contract suit filed by Nokia in the US, UK, and Canada. RIM has finally decided to pay up, but details of the new agreement are not being made public. It’s estimated by some that RIM will pay Nokia anywhere from $2 to $5 per phone going forward.Nokia took to its blog to announce the deal, and the company wasn’t shy about underscoring one particular aspect of the agreement. While money is changing hands, it’s a one-way street: “The financial structure of the agreement includes a one-time payment and on-going payments, all from RIM to Nokia.”As bad as that might sound, it’s probably a better situation for RIM to be in than to be tied up in litigation with Nokia for months on end. Even if RIM did decide to ride out the legal process, there’s still a good chance it would have had to pay up anyway. One hit to its bank account is better than two.With the patent dispute nastiness now in the rearview mirror, CEO Thorsten Heins and RIM can focus on building up buzz for the impending launch of BlackBerry 10 and its first two handsets running the QNX-based OS. They’ve been tentatively titled the X10 (QWERTY) and Z10 (touch only), and they’re set to be revealed in just a few more weeks. RIM’s big launch is set for January 30.