From b49fdb500445334f82c99f599b39dd7ee9b67393 Mon Sep 17 00:00:00 2001 From: mcarare <48995920+mcarare@users.noreply.github.com> Date: Wed, 30 Aug 2023 21:45:45 +0300 Subject: [PATCH] Bug 1850796 - Handle onPreferenceChangeListener signature updates. PreferenceFragmentCompat.onPreferenceChangeListener now returns a Nullable OnPreferenceChangeListener. --- .../org/mozilla/fenix/settings/LearnMoreSwitchPreference.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/mozilla/fenix/settings/LearnMoreSwitchPreference.kt b/app/src/main/java/org/mozilla/fenix/settings/LearnMoreSwitchPreference.kt index 40316aa103..6bdb510bd1 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/LearnMoreSwitchPreference.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/LearnMoreSwitchPreference.kt @@ -34,7 +34,7 @@ abstract class LearnMoreSwitchPreference(context: Context, attrs: AttributeSet?) switch.run { isChecked = getSwitchValue() setOnCheckedChangeListener { _, isChecked -> - onPreferenceChangeListener.onPreferenceChange( + onPreferenceChangeListener?.onPreferenceChange( this@LearnMoreSwitchPreference, isChecked, )