Microsoft used to embrace, extend, and extinguish their competition before they got too big and too afraid of their own shadow(and shareholders) with Windows and Office. Honestly, it makes total sense for Microsoft to acknowledge they are running a distant #3 and get as many developers behind them as they can. Make Microsoft the place where real hackers go to write code.
Buying Xamarin is embracing. As is maybe a Nokia Android phone. Microsoft needs to make their own "better" version of Android with their own services and get people hooked on that. Then make the "best" version of Android called Windows A. It's Windows, on Android. Windows A's best features would be closed source and patented. It would potentially crush Android in the mainstream.
I don't think that Microsoft has the guts to try and pull that off, but if they did, it would be a feat.