The first mistake was screwing Sun during their license agreement discussions for Android.
I'm not sure how much of that Google could directly benefit from but they could have definitely gain a metric fkton of community good will by opening many of the technologies Sun owned that have floundered since the Oracle acquisition.