IIRC IBM was in the play as well, but yes. I guess Google didn't want to inherit all the internal late-SUN problems so they passed on a chance to own it. Now Google had to switch to an alternate strategy utilizing JetBrains for Android.
IIRC SUN's revenues at that time were flat $16B, so they were in a zombie mode, likely could have survived for the next 10-20 years but the board gave up seeing all their competitors growing like crazy YoY.