diff options
author | Colin Cross <ccross@android.com> | 2019-02-04 11:22:08 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2019-02-06 01:52:41 +0000 |
commit | 571cccfcbc795f2bc955ca7fb3ac09085b360e09 (patch) | |
tree | 16da47a7ce728a0dfec6d48b1ef89c2cf72341f3 /java/sdk.go | |
parent | 5cb5b093d1f49a160b6ef2994c6bce07793a7d2d (diff) | |
download | build_soong-571cccfcbc795f2bc955ca7fb3ac09085b360e09.tar.gz build_soong-571cccfcbc795f2bc955ca7fb3ac09085b360e09.tar.bz2 build_soong-571cccfcbc795f2bc955ca7fb3ac09085b360e09.zip |
Prepare for a type-safe OnceKey
Add an opaque OnceKey type and use it for all calls to Once in
build/soong. A future patch will convert the arguments to
Once* to OnceKey once users outside build/soong have been updated.
Test: onceper_test.go
Change-Id: Ifcb338e6e603e804e507203c9508d30ffb2df966
Diffstat (limited to 'java/sdk.go')
-rw-r--r-- | java/sdk.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/java/sdk.go b/java/sdk.go index 988610f5..0959be7d 100644 --- a/java/sdk.go +++ b/java/sdk.go @@ -28,7 +28,7 @@ func init() { android.RegisterPreSingletonType("sdk", sdkSingletonFactory) } -const sdkSingletonKey = "sdkSingletonKey" +var sdkSingletonKey = android.NewOnceKey("sdkSingletonKey") type sdkContext interface { // sdkVersion eturns the sdk_version property of the current module, or an empty string if it is not set. |