Update DisplayWindowSettings.mShouldShowSystemDecors in setCurrentUser()
During the boot phase, the call to WindowManagerService#setCurrentUser() triggers DisplayWindowSettingsProvider.setOverrideSettingsForUser(), which resets all SettingsEntry objects of DisplayWindowSettings to null, including mShouldShowSystemDecorations. Because mShouldShowSystemDecorations is set upon onDisplayAdded() and setCurrentUser() happens afterwards, shouldShowSystemDecorsLocked() will consistently return false, regardless of the correct value. This incorrect persists until the next onDisplayChanged() call updates DisplayWindowSettings.mShouldShowSystemDecors. This results in the issue where home activity and wallpaper are not shown on the overlay display after a reboot if the overlay display was added before the reboot. This CL fixed this issue by updating DisplayWindowSettings.mShouldShowSystemDecos after setOverrideSettingsForUser() in setCurrentUser(). Bug: 409887951 Test: manually Test: run go/cd-smoke Flag: com.android.server.display.feature.flags.enable_display_content_mode_management Change-Id: I0e9947df10d70c3a47b943226defefbbc26aa9b3
Loading
Please register or sign in to comment