The US Supreme Court ruled in favour of Google in decade-long litigation brought by Oracle, granting the Android owner “fair use” of Java API code it copied in developing the mobile operating system.