Only run layout if we didn't have content

Otherwise we really don't have to do it as showing the window will
not change whether we have content or not.

Test: Reopen app, ensure less layout runs
Test: Launch activity on virtual display.

Bug: 112824998
Bug: 115577618
Change-Id: Id3bea85c93ead5e59f0456a2901378dd2c4a836f
2 files changed