Oracle's lawsuit is so bad-faith it is laughable.
https://en.wikipedia.org/wiki/Apache_Harmony#Difficulties_to...
And adding to that, the entire enforcement mechanism was through trademarks, not copyright. And trademarks are about the only IP construct not brought up in this case.
Plus Sun couldn't design a decent UI to save their lives, so Android probably wouldn't have been successful if Google had allowed Sun a large role in the platform.
From the same Chet Haase and Romain Guy that went into Android's GUI framework after Sun went under.
And for mobile there was
https://docs.oracle.com/javame/dev-tools/lwuit-1.3/LWUIT_Dev...
Plus, Google could have done just like any other OS vendor does with ISO C and ISO C++, plus whatever OS APIs they feel like adding.