diff options
Diffstat (limited to 'android/apex.go')
-rw-r--r-- | android/apex.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/android/apex.go b/android/apex.go index 028be57ec..ec36b41d8 100644 --- a/android/apex.go +++ b/android/apex.go @@ -16,6 +16,7 @@ package android import ( "fmt" + "reflect" "slices" "sort" "strconv" @@ -145,6 +146,17 @@ func (i ApexInfo) InApexModule(apexModuleName string) bool { return false } +// To satisfy the comparable interface +func (i ApexInfo) Equal(other any) bool { + otherApexInfo, ok := other.(ApexInfo) + return ok && i.ApexVariationName == otherApexInfo.ApexVariationName && + i.MinSdkVersion == otherApexInfo.MinSdkVersion && + i.Updatable == otherApexInfo.Updatable && + i.UsePlatformApis == otherApexInfo.UsePlatformApis && + reflect.DeepEqual(i.InApexVariants, otherApexInfo.InApexVariants) && + reflect.DeepEqual(i.InApexModules, otherApexInfo.InApexModules) +} + // ApexTestForInfo stores the contents of APEXes for which this module is a test - although this // module is not part of the APEX - and thus has access to APEX internals. type ApexTestForInfo struct { |