summaryrefslogtreecommitdiff
path: root/java/hiddenapi_monolithic.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2021-07-20 19:08:39 +0100
committer Paul Duffin <paulduffin@google.com> 2021-07-20 22:02:44 +0100
commited12c132c352a6cfa94d824ccb89b4685b1407ad (patch)
tree53a51efc71ba0f234da6c26b3b18dbb99a80eabf /java/hiddenapi_monolithic.go
parentd6a072b39ddc9216a8a353999c1c09cd53dfac9a (diff)
Remove unnecessary handling of nil paths in HiddenAPIOutput
Previously, bootclasspath_fragment modules could produce HiddenAPIOutput structs containing nil paths. That is no longer possible as both source and prebuilt bootclasspath_fragment modules always provide non-nil paths so this change removes the special handling. Bug: 194063708 Test: m out/soong/hiddenapi/hiddenapi-flags.csv - check that this does not change the contents. Change-Id: I15337e146c9e694ce9da06ad4845ac267d6da27a
Diffstat (limited to 'java/hiddenapi_monolithic.go')
-rw-r--r--java/hiddenapi_monolithic.go21
1 files changed, 5 insertions, 16 deletions
diff --git a/java/hiddenapi_monolithic.go b/java/hiddenapi_monolithic.go
index 9d963d258..fdcf09335 100644
--- a/java/hiddenapi_monolithic.go
+++ b/java/hiddenapi_monolithic.go
@@ -83,22 +83,11 @@ func newMonolithicHiddenAPIInfo(ctx android.ModuleContext, flagFilesByCategory F
// append appends all the files from the supplied info to the corresponding files in this struct.
func (i *MonolithicHiddenAPIInfo) append(other *HiddenAPIInfo) {
i.FlagsFilesByCategory.append(other.FlagFilesByCategory)
-
- // The output may not be set if the bootclasspath_fragment has not yet been updated to support
- // hidden API processing.
- // TODO(b/179354495): Switch back to append once all bootclasspath_fragment modules have been
- // updated to support hidden API processing properly.
- appendIfNotNil := func(paths android.Paths, path android.Path) android.Paths {
- if path == nil {
- return paths
- }
- return append(paths, path)
- }
- i.StubFlagsPaths = appendIfNotNil(i.StubFlagsPaths, other.StubFlagsPath)
- i.AnnotationFlagsPaths = appendIfNotNil(i.AnnotationFlagsPaths, other.AnnotationFlagsPath)
- i.MetadataPaths = appendIfNotNil(i.MetadataPaths, other.MetadataPath)
- i.IndexPaths = appendIfNotNil(i.IndexPaths, other.IndexPath)
- i.AllFlagsPaths = appendIfNotNil(i.AllFlagsPaths, other.AllFlagsPath)
+ i.StubFlagsPaths = append(i.StubFlagsPaths, other.StubFlagsPath)
+ i.AnnotationFlagsPaths = append(i.AnnotationFlagsPaths, other.AnnotationFlagsPath)
+ i.MetadataPaths = append(i.MetadataPaths, other.MetadataPath)
+ i.IndexPaths = append(i.IndexPaths, other.IndexPath)
+ i.AllFlagsPaths = append(i.AllFlagsPaths, other.AllFlagsPath)
}
// dedup removes duplicates in all the paths, while maintaining the order in which they were