Merge "Prevent infinite layout and wallpaper flashing"