Merge "Make Preference#setVisible safer to call" into nyc-support-24.1-dev