Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8fd6ee9c authored by Roman Birg's avatar Roman Birg Committed by Zhao Wei Liew
Browse files

Settings: fix setting light FC



We need to check whether the speed setting is enabled before returning a
value that may be null.

REF: CYNGNOS-435
Change-Id: I1bc047f4d060853dac15744e529981ee5968cc4c
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent 9ae25a6a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -242,7 +242,11 @@ public class LightSettingsDialog extends AlertDialog implements

    @SuppressWarnings("unchecked")
    public int getPulseSpeedOn() {
        if (mPulseSpeedOn.isEnabled()) {
            return ((Pair<String, Integer>) mPulseSpeedOn.getSelectedItem()).second;
        } else {
            return 1;
        }
    }

    @SuppressWarnings("unchecked")