I don't think buying Sun would have protected Android from Apple/Microsoft/Nokia/etc., just as buying Motorola won't protect it from Oracle. If anything, buying both may have made sense.
Buying Sun would only have helped Google in one of their current court cases (and not one that buying Motorola was intended to help). Hindsight would have dictated buying both.
yeah I've been saying this since the oracle deal. 8 billion looks small now for what Sun was. They would also own Java and other important tech that they could have used a lot more than what Motorola offers them. I wonder if they even tried to buy Sun.