# HG changeset patch # User jgindin@chagall # Date 1627236727 14400 # Sun Jul 25 14:12:07 2021 -0400 # Node ID f5265cb207e9fe22faf68243545f29ae7018b559 # Parent eb0edb5da38d19c3c363ce75d05d6775d2fb8ccb Ensure we're dealing with the elevation preference. Without this, we get into all sorts of trouble. diff --git a/Android/src/main/java/com/gindin/zmanim/android/prefs/LocationProviderPreferences.java b/Android/src/main/java/com/gindin/zmanim/android/prefs/LocationProviderPreferences.java --- a/Android/src/main/java/com/gindin/zmanim/android/prefs/LocationProviderPreferences.java +++ b/Android/src/main/java/com/gindin/zmanim/android/prefs/LocationProviderPreferences.java @@ -142,13 +142,15 @@ try { - final boolean usingElevation = (Boolean)newValue; - latLongElevation.setEnabled( usingElevation ); - placeElevation.setEnabled( usingElevation ); + if ( useElevation == preference ) { + final boolean usingElevation = (Boolean)newValue; + latLongElevation.setEnabled( usingElevation ); + placeElevation.setEnabled( usingElevation ); - if ( !usingElevation ) { - latLongElevation.setText( "" ); - placeElevation.setText( "" ); + if ( !usingElevation ) { + latLongElevation.setText( "" ); + placeElevation.setText( "" ); + } } // TODO: I'm trying to make the checkboxes behave like radio buttons. However, neither setting the