Update previous_api for droidstubs and java_api_library
Needed to ensure recently added nullability annotations `@Nullable` and
`@NonNull` are correctly replaced with `@RecentlyNullable` and
`@RecentlyNonNull` respectively.
Bug: 347751326
Test: # Build modules before and after this change and verify that
# public stubs are unchanged but other stubs use the correct
# nullability annotations.
Change-Id: If97859b6207f03c1dcd3a0cc9c44f82147449cad
diff --git a/api/api.go b/api/api.go
index 449fac6..d4db49e 100644
--- a/api/api.go
+++ b/api/api.go
@@ -478,7 +478,7 @@
props.Api_contributions = transformArray(
modules, "", fmt.Sprintf(".stubs.source%s.api.contribution", apiSuffix))
props.Defaults_visibility = []string{"//visibility:public"}
- props.Previous_api = proptools.StringPtr(":android.api.public.latest")
+ props.Previous_api = proptools.StringPtr(":android.api.combined." + sdkKind.String() + ".latest")
ctx.CreateModule(java.DefaultsFactory, &props)
}
}