Android took the Java API (the list of its classes and methods, which any developer can access) and reimplemented those classes and methods in "Android Java".Off the topic of this thread...but that's exactly what they didn't do. They cut corners and actually did violate copyrights. This was demonstrated by the internal memos. An important part of US law is intent and they stepped over the line and the completed system was not clean-room.
The notion of being able to copyright an API, esp. a publicly available one, is stupid. But then again likewise for software patents. Well and a huge list of other current laws in pretty much every country on the planet.