Re: "Code"
>They could bash the names around so they're technically different, but most of the stuff has to stay the same so the interface is functionally compatible.
This is simply untrue. They could, for example, have adjusted the function signatures to leverage different-but-compatible types, for example by implementing Android-specific Numeric interfaces to unify disparate Math functions. This would not only have delivered a "Java-compatible API", but would almost certainly have been *a good idea* because Java 5's core APIs were diabolically badly designed. Likewise they could have extended the existing core API with Android-specific extensions, such as core library functions lifted from Guava, which mostly took until Java 9 and Java 11 to make it into the JDK.
Crucially for the case doing any of this would have put clear water between what Oracle were arguing: that the Dalvik JVM was entirelty a derivative work, because all it did was run Java APIs in a new venue.
Google opted not to do that and have been extremely lucky that the court has opted to adopt their interpretation of the law: that running byte-for-byte identical Java, just on Google-branded phones, constitutes transformation.