From 571cccfcbc795f2bc955ca7fb3ac09085b360e09 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 4 Feb 2019 11:22:08 -0800 Subject: 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 --- java/sdk.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'java/sdk.go') diff --git a/java/sdk.go b/java/sdk.go index 988610f5b..0959be7de 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. -- cgit v1.2.3-59-g8ed1b