Keep build settings to enable location sharing for possible use cases of forks.

This commit is contained in:
Onuray Sahin 2022-01-24 18:49:49 +03:00
parent 12bfece89e
commit 9516e379ea
3 changed files with 4 additions and 1 deletions

View file

@ -150,6 +150,7 @@ android {
// This *must* only be set in trusted environments.
buildConfigField "Boolean", "handleCallAssertedIdentityEvents", "false"
buildConfigField "Boolean", "enableLocationSharing", "true"
buildConfigField "String", "mapTilerKey", "\"fU3vlMsMn4Jb6dnEIFsx\""
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View file

@ -1000,6 +1000,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
}
fun isLocationSharingEnabled(): Boolean {
return defaultPrefs.getBoolean(SETTINGS_PREF_ENABLE_LOCATION_SHARING, false)
return defaultPrefs.getBoolean(SETTINGS_PREF_ENABLE_LOCATION_SHARING, false) && BuildConfig.enableLocationSharing
}
}

View file

@ -150,6 +150,8 @@ class VectorSettingsPreferencesFragment @Inject constructor(
})
true
}
findPreference<VectorSwitchPreference>(VectorPreferences.SETTINGS_PREF_ENABLE_LOCATION_SHARING)?.isVisible = BuildConfig.enableLocationSharing
}
private fun updateTakePhotoOrVideoPreferenceSummary() {