(1) the purpose and character of the use, including whether such use is of a commercial nature or is for nonprofit educational purposes;
(2) the nature of the copyrighted work;
(3) the amount and substantiality of the portion used in relation to the copyrighted work as a whole; and
(4) the effect of the use upon the potential market for or value of the copyrighted work.
It's a somewhat surprising result, because two of the factors weigh heavily against Google (it's a commercial work, and was important to Android gaining developer market-share). Oracle's strategy going forward, both in post-trial motions and in any subsequent appeal, will be based on arguing that no rational jury could have applied these factors to the undisputed facts of the case and concluded that the fair use test was met.
It's also not a particularly satisfying result for anybody. If API's are copyrightable, then I can't think of a better case for protecting them than in this one, where Google created a commercial product for profit and there was no research or scientific motivation. It wasn't even really a case (like say, Samba) where copying was necessary to interoperate with a closed, proprietary system. Davlik isn't drop-in compatible with the JVM anyway.
That makes Oracle's win on the subject matter issue basically a pyrrhic victory for anyone looking to protect their APIs. They're protectable, but can't be protected in any realistic scenario.
And if you're in the camp that believes APIs should not be protected, this precedent--if it stands--means that you'll have to shoulder the expense of going to trial on the fair use issue before winning on the merits.