Google uses a subset of the Apache Harmony Java implementation in Android.
Sun open-sourced Java Standard Edition under the GPL in 2006 and 2007, but didn't include a patent or copyright license with the code. In order to get that license, developers have to demonstrate compatibility with the Java specification.
The only way to demonstrate compatibility with the Java specification is to use Sun's Technology Compatibility Kit, or TCK, and Sun / Oracle and Apache have been bickering about the license for the Java TCK, or JCK, for years. (That's putting it lightly, actually. It's been more like a war.)
The only license Sun ever offered Apache for the JCK included significant "field of use" restrictions, including a restriction on mobile phones.
Because of these restrictions, Apache's never taken a JCK license to test Harmony.
Oracle used to be on Apache's side in demanding Sun loosen up the JCK licensing restrictions, but that changed as soon as it bought Sun out.
Google thinks this is very bad, and that Oracle and Sun are just big bullies who don't want Java to be open, even though being open is super amazing.
That's where Google stops, right at the part where unchecked corporate greed threatens to destroy a open-source project and your heart swells with sympathy. It's a good place to stop! But the logical and unstated endpoint to this narrative isn't quite as good:
Because Apache doesn't have a license to test Harmony with the JCK, it doesn't have a license for Sun's Java patents and copyrights either.
Part of the reason Apache wants a JCK license is to assure its users they have the necessary IP rights.
Google knew all this and used parts of Harmony in Android anyway.