While 100% Java compatibility was/is a goal of Sun/Oracle/Java, and it should be a goal of the Java Community, it is not a goal (nor should it be necessarily) of Google/Android. In 2006, Google rejected the initial offer from Sun for 100 million for cooperation incorporating Java into the Android OS. I think Google counter-proposed 20 million, but in any case Sun and Google did not reach any agreement. Shortly thereafter Sun began unencumbering and releasing Java under the GPLv2. Google did not sign up to Sun's "Write once, run anywhere" promise.
The Sun/Microsoft case is completely different then the current Oracle/Google case. Sun/Microsoft was essentially a trademark dispute. Microsoft was developing and selling a product using the trademarked name Java, under a license from Sun. The license to the trademark requires 100% compatibility. Microsoft did not implement important parts of Java (e.g. RMI and JNI) and added some platform specific extensions, that violated the terms of the license, and the spirit of "write once, run anywhere".
The Google(Android)/Oracle dispute is alleged copyright and patent infringement. Although Android is not 100% Java compatible, Google does not sell any product using the Java name, and Oracle is not claiming trademark infringement, or a violation of any license based on a lack of 100% compatibility. Android is not directly compatible with Java byte-code, and does not contain a Java virtual machine. Android can interpret/run many Java programs from source code, or converted from Java byte-code to a Dalvik executable, using their own custom built virtual machine (Dalvik), not subject to any of Oracle's license terms.
Oracle's copyright position is curious for a couple of reasons. Oracle claims that Google's implementation of Java class libraries infringes the copyright of Oracle's specifications, and the structure, selection, and arrangement of Oracle's implementation (some kind of higher "collective" abstraction of library components). Starting in 2006, Sun released many components of Java under GPLv2. This includes Java ME, and Java SE, and their Java class libraries. But Oracle is not suing for a violation of the GPL. Oracle is not claiming that Google copied parts of Oracle's Java implementation. They are claiming that Google's implementation is a derivative work of the specification, and copies the structure of Oracle's implementation.
By claiming copyright infringement of these class libraries, Oracle is effectively asserting copyright ownership over libraries developed independently (and copyrighted) by Apache, and distributed openly (without Oracle restrictions) under the Apache license. Sun never sued Apache, and the Sun CEO concurred there was no problem with Apache Harmony, as long as it wasn't called Java. Then there would be a trademark and compatibility issue (like with Microsoft). If Oracle wins, there is nothing to stop Oracle from asserting control over all "free" Java implementations, e.g. GNU classpath and IcedTea.
There are not 4.1 billion Java devices at stake here. Whatever the outcome of this trial, all 4.1 billion devices will support Java the same as before.
What is at stake is how Oracle wants to extend copyright law. They want the copyright on their specifications to be able to control any implementation of the specification. This would forbid anyone to develop any implementation of a specification, without a license from the publisher of the specification. This goes far beyond Java, and 4.1 billion Java devices, and far beyond Google, Oracle, Android and Apache, and far beyond copyright law as it was intended.
The "patent" trial will come later, but basically all of the patents, except two, have not survived re-examination. One of the two has been initially rejected too, but the examination process is not finished. So only one minor patent remains in the case.