Fix FOUC on preferences.

Bug: 49230
Change-Id: I91bb6312c2af2e1deb4e0124bb51922a608e46fd
Merge "Fix FOUC on preferences."