Set previous_api correctly for java_sdk_library

Metalava used this attribute to potentially re-write some nullness
annotations from @Nullable to @RecentlyNonNull, and not doing so can
cause problems when compiling kotlin.

Bug: 176092452
Test: m art.module.public.api.stubs && \
      rm -rf /tmp/lib && \
      unzip -qd /tmp/lib art.module.public.api.stubs.jar && \
      javap -v /tmp/lib/java/util/concurrent/ConcurrentHashMap.class | \
      grep Recently
Change-Id: I9012798f27e39d9a53dbcf0976548f6cec2d3150
diff --git a/java/sdk_library.go b/java/sdk_library.go
index f279b95..057e14b 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -1271,6 +1271,7 @@
 		Merge_annotations_dirs           []string
 		Merge_inclusion_annotations_dirs []string
 		Generate_stubs                   *bool
+		Previous_api                     *string
 		Check_api                        struct {
 			Current                   ApiToCheck
 			Last_released             ApiToCheck
@@ -1363,6 +1364,7 @@
 	if !apiScope.unstable {
 		// check against the latest released API
 		latestApiFilegroupName := proptools.StringPtr(module.latestApiFilegroupName(apiScope))
+		props.Previous_api = latestApiFilegroupName
 		props.Check_api.Last_released.Api_file = latestApiFilegroupName
 		props.Check_api.Last_released.Removed_api_file = proptools.StringPtr(
 			module.latestRemovedApiFilegroupName(apiScope))