Samsung Galaxy S II smartphoneThe success of Samsung's Galaxy S Android phones just became a cash cow for Microsoft, thanks to a patent cross-licensing agreement in which Microsoft gets paid for every Android phone or tablet Samsung sells.

Ostensibly, that's bad news for Android. The operating system is supposed to be free to license, but Microsoft is now extracting money from both Samsung and HTC which--combined--account for more than half of all Android phones sold in the United States. Samsung, HTC, and other companies may be less motivated to create and market Android devices down the line, knowing they'll have to pay Microsoft a cut of their earnings.

But the Samsung-Microsoft deal has even bigger implications for Windows Phone, because the deal includes a broader agreement to "cooperate in the development and marketing" of Microsoft's mobile OS, according to a press release. Samsung already makes Windows Phones, but the company's priority is clearly Android. With this deal, Samsung's priorities may shift.

Looking back, HTC's agreement with Microsoft didn't have the same stipulation--or at least, Microsoft didn't mention it in its press release at the time. But as Microsoft pursues more licensing revenue from other phone makers, I could see the company pressing for deals like the one with Samsung, in which the phone maker agrees to help develop and market Windows Phones.

If you like Windows Phone and want to see it prosper, that's great news. If you're Google, it's a reason to be very, very upset. "Failing to succeed in the smartphone market, they are resorting to legal measures to extort profit from others’ achievements and hinder the pace of innovation," Google said about Microsoft in a statement.

Regardless of the Samsung agreement's effect on Android or Windows Phone, the fireworks sure are fun to watch.