@ -37,6 +37,9 @@ type AppContext interface {
// (as opposed to F-droid/sideloaded).
// (as opposed to F-droid/sideloaded).
IsPlayVersion ( ) bool
IsPlayVersion ( ) bool
// ShouldUseGoogleDNSFallback reports whether or not to use Google for DNS fallback.
ShouldUseGoogleDNSFallback ( ) bool
// IsChromeOS reports whether we're on a ChromeOS device.
// IsChromeOS reports whether we're on a ChromeOS device.
IsChromeOS ( ) ( bool , error )
IsChromeOS ( ) ( bool , error )
@ -57,12 +60,6 @@ type AppContext interface {
// GetSyspolicyStringArrayValue returns the current string array value for the given system policy,
// GetSyspolicyStringArrayValue returns the current string array value for the given system policy,
// expressed as a JSON string.
// expressed as a JSON string.
GetSyspolicyStringArrayJSONValue ( key string ) ( string , error )
GetSyspolicyStringArrayJSONValue ( key string ) ( string , error )
// GetBuildConfig gets the build configuration of the Android app.
//
// The returned BuildConfig should not change during the lifetime of
// the app.
GetBuildConfig ( ) * BuildConfig
}
}
// IPNService corresponds to our IPNService in Java.
// IPNService corresponds to our IPNService in Java.
@ -172,11 +169,3 @@ func RequestVPN(service IPNService) {
func ServiceDisconnect ( service IPNService ) {
func ServiceDisconnect ( service IPNService ) {
onDisconnect <- service
onDisconnect <- service
}
}
// BuildConfig is a struct that represents the build configuration of the
// Android application, as set in BuildConfig.java.
type BuildConfig struct {
// UseGoogleDNSFallback is whether to fall back to the Google public
// DNS servers if the platform's DNS servers cannot be determined.
UseGoogleDNSFallback bool
}