Work around Java 9 build failures due to @Generated annotations.

Some code generation tools, notably dagger, produce output which
includes a @Generated annotation when built with javac -source 9
-target 9. This annotation is not part of any Android API, so
compilation fails.

As a workaround for this dagger behaviour, this change introduces a
stub for that annotations, available at compile time only, to keep
javac happy. (This topic should be reverted if dagger is fixed not to
use the annotation in its output.)

The upstream source for Generated.java is OpenJDK 9+181.

N.B. The problem this is fixing does not manifest in AOSP, only in
downstream branches.

Bug: 123891440
Test: EXPERIMENTAL_USE_OPENJDK9=true make droid

(cherry picked from commit 81dd1d9418f62f6888063aeec53e15d123948f0c)

Merged-In: I06ff179384160a598b70959a0b0cd82d439490ce
Change-Id: I55971ce65c74bac75b32f1258a96de7368ac97c0
4 files changed