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

Commit 66a96d22 authored by menghanli's avatar menghanli Committed by Menghan Li
Browse files

Fix tapping magnification crash in vision settings setup screen

Root cause: ag/17286343 introduces hiding the settings entry in magnification settings if window magnification feature is not supported. It causes SuW page cannot find the settings preference reference.
Solution: Add null pointer check.

Bug: 242242266
Test: Manual testing
Change-Id: I1007a580047dd302228b28c15b82e958a2b01fec
(cherry picked from commit 5a87f6bb)
parent 12180650
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -52,12 +52,18 @@ public class ToggleScreenMagnificationPreferenceFragmentForSetupWizard
     */
    private void hidePreferenceSettingComponents() {
        // Intro
        if (mTopIntroPreference != null) {
            mTopIntroPreference.setVisible(false);
        }
        // Setting of magnification type
        if (mSettingsPreference != null) {
            mSettingsPreference.setVisible(false);
        }
        // Setting of following typing
        if (mFollowingTypingSwitchPreference != null) {
            mFollowingTypingSwitchPreference.setVisible(false);
        }
    }

    @Override
    public RecyclerView onCreateRecyclerView(LayoutInflater inflater, ViewGroup parent,