Oracle made many arguments -- patent and copyright infringement. The patent claims were rejected, but after an appeal, the appeals court ruled that language-level APIs (i.e, not REST APIs or other protocols) are copyrightable, at which point (another) court debated the question of fair use by Google, and ruled in Google's favor (i.e, that their use of Java's API does not constitute an infringement of the API's copyright). Oracle have announced their decision to appeal the ruling.
In the meantime, though, it seems like Android is about to adopt Oracle's OpenJDK, under the open-source license granted by Oracle.