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 5a87f6bbbf
)
This commit is contained in:
@@ -52,11 +52,17 @@ public class ToggleScreenMagnificationPreferenceFragmentForSetupWizard
|
||||
*/
|
||||
private void hidePreferenceSettingComponents() {
|
||||
// Intro
|
||||
mTopIntroPreference.setVisible(false);
|
||||
if (mTopIntroPreference != null) {
|
||||
mTopIntroPreference.setVisible(false);
|
||||
}
|
||||
// Setting of magnification type
|
||||
mSettingsPreference.setVisible(false);
|
||||
if (mSettingsPreference != null) {
|
||||
mSettingsPreference.setVisible(false);
|
||||
}
|
||||
// Setting of following typing
|
||||
mFollowingTypingSwitchPreference.setVisible(false);
|
||||
if (mFollowingTypingSwitchPreference != null) {
|
||||
mFollowingTypingSwitchPreference.setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user