From 09082bbda76df493dce90e32fb1cab2b933816e5 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Mon, 1 Jun 2020 13:07:54 +0300 Subject: [PATCH] Fix power button pref UI --- .../osmand/plus/settings/fragments/TurnScreenOnFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/TurnScreenOnFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/TurnScreenOnFragment.java index 28deeb65af..40aea7d75b 100644 --- a/OsmAnd/src/net/osmand/plus/settings/fragments/TurnScreenOnFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/fragments/TurnScreenOnFragment.java @@ -97,7 +97,7 @@ public class TurnScreenOnFragment extends BaseSettingsFragment implements OnPref private void setupTurnScreenOnPowerButtonPref() { ApplicationMode appMode = getSelectedAppMode(); - boolean enabled = settings.TURN_SCREEN_ON_TIME_INT.get() == 0 || settings.USE_SYSTEM_SCREEN_TIMEOUT.get(); + boolean enabled = settings.TURN_SCREEN_ON_TIME_INT.getModeValue(appMode) == 0 || settings.USE_SYSTEM_SCREEN_TIMEOUT.getModeValue(appMode); SwitchPreferenceEx turnScreenOnPowerButton = (SwitchPreferenceEx) findPreference(settings.TURN_SCREEN_ON_POWER_BUTTON.getId()); turnScreenOnPowerButton.setEnabled(enabled); turnScreenOnPowerButton.setDescription(R.string.turn_screen_on_power_button_descr);