diff options
author | Colin Cross <ccross@android.com> | 2019-02-07 14:27:35 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2019-02-07 22:31:44 +0000 |
commit | 697412f05830e88b7a17226c2eabf13961946f80 (patch) | |
tree | ff457a6c5a3ea1b49c636eb1e7bc75af5b1494eb /java/hiddenapi_singleton.go | |
parent | 65494b962b5a1fc90fe09046763b25cb91b5ec63 (diff) | |
download | android_build_soong-697412f05830e88b7a17226c2eabf13961946f80.tar.gz android_build_soong-697412f05830e88b7a17226c2eabf13961946f80.tar.bz2 android_build_soong-697412f05830e88b7a17226c2eabf13961946f80.zip |
Remove the hiddenapi presingleton
The presingleton is no longer necessary now that MakeVarsContext
is a PathContext, just call hiddenAPISingletonPaths directly.
Test: m checkbuild
Test: forrest build of unbundled branch
Diffstat (limited to 'java/hiddenapi_singleton.go')
-rw-r--r-- | java/hiddenapi_singleton.go | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/java/hiddenapi_singleton.go b/java/hiddenapi_singleton.go index d43e276a..de1bcf50 100644 --- a/java/hiddenapi_singleton.go +++ b/java/hiddenapi_singleton.go @@ -19,7 +19,6 @@ import ( ) func init() { - android.RegisterPreSingletonType("pre-hiddenapi", hiddenAPIPreSingletonFactory) android.RegisterSingletonType("hiddenapi", hiddenAPISingletonFactory) } @@ -44,18 +43,6 @@ func hiddenAPISingletonPaths(ctx android.PathContext) hiddenAPISingletonPathsStr }).(hiddenAPISingletonPathsStruct) } -func hiddenAPIPreSingletonFactory() android.Singleton { - return hiddenAPIPreSingleton{} -} - -type hiddenAPIPreSingleton struct{} - -// hiddenAPI pre-singleton rules to ensure paths are always generated before -// makevars -func (hiddenAPIPreSingleton) GenerateBuildActions(ctx android.SingletonContext) { - hiddenAPISingletonPaths(ctx) -} - func hiddenAPISingletonFactory() android.Singleton { return hiddenAPISingleton{} } @@ -296,7 +283,7 @@ func init() { // Both paths are used to call dist-for-goals. func hiddenAPIMakeVars(ctx android.MakeVarsContext) { if !ctx.Config().IsEnvTrue("UNSAFE_DISABLE_HIDDENAPI_FLAGS") { - singletonPaths := ctx.Config().Get(hiddenAPISingletonPathsKey).(hiddenAPISingletonPathsStruct) + singletonPaths := hiddenAPISingletonPaths(ctx) ctx.Strict("INTERNAL_PLATFORM_HIDDENAPI_FLAGS", singletonPaths.flags.String()) ctx.Strict("INTERNAL_PLATFORM_HIDDENAPI_GREYLIST_METADATA", singletonPaths.metadata.String()) } |