diff options
author | 2021-01-06 22:01:01 +0900 | |
---|---|---|
committer | 2021-01-07 05:15:50 +0000 | |
commit | 0c1ca4c3e4cae5aa3fdd3a2e8b64750e69f4a5b5 (patch) | |
tree | 5004f93e63d20b31d0440346df62ea14572b3051 /cc/snapshot_utils.go | |
parent | 77dcb9d768365b0e88e2ca889bdf7c5a99a7524a (diff) |
Remove redundant snapshot functions
Leaving only isSnapshotAware is sufficient and clearer than before.
Test: m nothing
Change-Id: I497ee72ca0cc2386b1b947732473ac63b722621c
Diffstat (limited to 'cc/snapshot_utils.go')
-rw-r--r-- | cc/snapshot_utils.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cc/snapshot_utils.go b/cc/snapshot_utils.go index 77d82f1b5..3e6444bc0 100644 --- a/cc/snapshot_utils.go +++ b/cc/snapshot_utils.go @@ -77,9 +77,12 @@ func shouldCollectHeadersForSnapshot(ctx android.ModuleContext, m *Module, apexI } if _, _, ok := isVndkSnapshotAware(ctx.DeviceConfig(), m, apexInfo); ok { return ctx.Config().VndkSnapshotBuildArtifacts() - } else if isVendorSnapshotAware(m, isVendorProprietaryPath(ctx.ModuleDir()), apexInfo) || - isRecoverySnapshotAware(m, isRecoveryProprietaryPath(ctx.ModuleDir()), apexInfo) { - return true + } + + for _, image := range []snapshotImage{vendorSnapshotImageSingleton, recoverySnapshotImageSingleton} { + if isSnapshotAware(m, image.isProprietaryPath(ctx.ModuleDir()), apexInfo, image) { + return true + } } return false } |