summaryrefslogtreecommitdiff
path: root/java/hiddenapi_singleton.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2021-04-12 16:31:15 +0100
committer Paul Duffin <paulduffin@google.com> 2021-04-13 00:23:55 +0100
commit082afbb6561a04ba2e03643ed9f740e179e75af0 (patch)
tree3ef6b02b32919c8f70f91d148661978e1f1f57af /java/hiddenapi_singleton.go
parent6a766453fd32697f612674bf675a17866e896256 (diff)
Remove unused hiddenapi_flags module type
Bug: 177892522 Test: m nothing Change-Id: I604a86a25bbc722ec718b0b0272d0481218d3cd9
Diffstat (limited to 'java/hiddenapi_singleton.go')
-rw-r--r--java/hiddenapi_singleton.go48
1 files changed, 0 insertions, 48 deletions
diff --git a/java/hiddenapi_singleton.go b/java/hiddenapi_singleton.go
index 37c394a5a..6ba5f35bc 100644
--- a/java/hiddenapi_singleton.go
+++ b/java/hiddenapi_singleton.go
@@ -15,8 +15,6 @@
package java
import (
- "fmt"
-
"android/soong/android"
)
@@ -27,7 +25,6 @@ func init() {
func RegisterHiddenApiSingletonComponents(ctx android.RegistrationContext) {
ctx.RegisterSingletonType("hiddenapi", hiddenAPISingletonFactory)
ctx.RegisterSingletonType("hiddenapi_index", hiddenAPIIndexSingletonFactory)
- ctx.RegisterModuleType("hiddenapi_flags", hiddenAPIFlagsFactory)
}
var PrepareForTestWithHiddenApiBuildComponents = android.FixtureRegisterWithContext(RegisterHiddenApiSingletonComponents)
@@ -392,51 +389,6 @@ func commitChangeForRestat(rule *android.RuleBuilder, tempPath, outputPath andro
Text(")")
}
-type hiddenAPIFlagsProperties struct {
- // name of the file into which the flags will be copied.
- Filename *string
-}
-
-type hiddenAPIFlags struct {
- android.ModuleBase
-
- properties hiddenAPIFlagsProperties
-
- outputFilePath android.OutputPath
-}
-
-func (h *hiddenAPIFlags) GenerateAndroidBuildActions(ctx android.ModuleContext) {
- filename := String(h.properties.Filename)
-
- inputPath := hiddenAPISingletonPaths(ctx).flags
- h.outputFilePath = android.PathForModuleOut(ctx, filename).OutputPath
-
- // This ensures that outputFilePath has the correct name for others to
- // use, as the source file may have a different name.
- ctx.Build(pctx, android.BuildParams{
- Rule: android.Cp,
- Output: h.outputFilePath,
- Input: inputPath,
- })
-}
-
-func (h *hiddenAPIFlags) OutputFiles(tag string) (android.Paths, error) {
- switch tag {
- case "":
- return android.Paths{h.outputFilePath}, nil
- default:
- return nil, fmt.Errorf("unsupported module reference tag %q", tag)
- }
-}
-
-// hiddenapi-flags provides access to the hiddenapi-flags.csv file generated during the build.
-func hiddenAPIFlagsFactory() android.Module {
- module := &hiddenAPIFlags{}
- module.AddProperties(&module.properties)
- android.InitAndroidArchModule(module, android.HostAndDeviceSupported, android.MultilibCommon)
- return module
-}
-
func hiddenAPIIndexSingletonFactory() android.Singleton {
return &hiddenAPIIndexSingleton{}
}