Disable location sharing from build settings.
This commit is contained in:
parent
42dcf52eb0
commit
ede1fe39fc
@ -150,6 +150,7 @@ android {
|
||||
// This *must* only be set in trusted environments.
|
||||
buildConfigField "Boolean", "handleCallAssertedIdentityEvents", "false"
|
||||
|
||||
buildConfigField "Boolean", "enableLocationSharing", "false"
|
||||
buildConfigField "String", "mapTilerKey", "\"fU3vlMsMn4Jb6dnEIFsx\""
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
@ -188,7 +188,7 @@ class VectorPreferences @Inject constructor(private val context: Context) {
|
||||
private const val DID_PROMOTE_NEW_RESTRICTED_JOIN_RULE = "DID_PROMOTE_NEW_RESTRICTED_JOIN_RULE"
|
||||
|
||||
// Location Sharing
|
||||
private const val SETTINGS_PREF_ENABLE_LOCATION_SHARING = "SETTINGS_PREF_ENABLE_LOCATION_SHARING"
|
||||
const val SETTINGS_PREF_ENABLE_LOCATION_SHARING = "SETTINGS_PREF_ENABLE_LOCATION_SHARING"
|
||||
|
||||
private const val MEDIA_SAVING_3_DAYS = 0
|
||||
private const val MEDIA_SAVING_1_WEEK = 1
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import android.widget.CheckedTextView
|
||||
import androidx.core.view.children
|
||||
import androidx.preference.Preference
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import im.vector.app.BuildConfig
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.dialogs.PhotoOrVideoDialog
|
||||
import im.vector.app.core.extensions.restart
|
||||
@ -149,6 +150,8 @@ class VectorSettingsPreferencesFragment @Inject constructor(
|
||||
})
|
||||
true
|
||||
}
|
||||
|
||||
findPreference<VectorSwitchPreference>(VectorPreferences.SETTINGS_PREF_ENABLE_LOCATION_SHARING)?.isVisible = BuildConfig.enableLocationSharing
|
||||
}
|
||||
|
||||
private fun updateTakePhotoOrVideoPreferenceSummary() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user