Google used the Apache Harmony version as the basis for Android (Until Nougat).
Some of the argument was over whether the Apache licence inherited by Google from Harmony was valid, or whether Harmony itself was in breach of copyright (and therefore had no valid licence Google could use).
Once the courts decided APIs are copyrightable the argument switched to whether Google's was Fair-Use, with a jury saying it was, federal appeals court saying no, and thus it ended up at the Supreme court.
Here's a Groklaw [0] copy of an early (April 2012) Oracle argument asking for Jury instructions around the licence topic that explains it well:
"As made clear by Apache itself, Apache never had a license from Sun or Oracle for Harmony. Apache had no rights to Java technology that it could give to Google"
Some of the argument was over whether the Apache licence inherited by Google from Harmony was valid, or whether Harmony itself was in breach of copyright (and therefore had no valid licence Google could use).
Once the courts decided APIs are copyrightable the argument switched to whether Google's was Fair-Use, with a jury saying it was, federal appeals court saying no, and thus it ended up at the Supreme court.
Here's a Groklaw [0] copy of an early (April 2012) Oracle argument asking for Jury instructions around the licence topic that explains it well:
[0] http://groklaw.net/pdf3/OraGoogle-959.pdf