Prevent infinite layout while hiding nav bar on keyguard

By the original logic, if there is a focused window which hides
navigation bar while keyguard is showing, PhoneWindowManager would
hide/show navigation bar frequently, which caused infinite layout.

Bug: 78681867
Bug: 79896018
Bug: 80113279
Test: 1. a. Open a photo in fullscreen mode (hiding navigation bar)
         b. Press power key to bring up keyguard
         c. See if there is "Performed 6 layouts in a row. Skipping"
            log
      2. go/wm-smoke
      3. Open a video in YouTube in fullscreen mode and then expand
         status bar, and see if navigation bar would show; collapse
	 status bar, and see if navigation bar would hide

Change-Id: Id8c49ac8fc45b98294e48017308dce3117ed1cf8
Merged-In: Id8c49ac8fc45b98294e48017308dce3117ed1cf8
(cherry picked from commit 53e8cfe794ef0e1295e526b21c557c2a17e597ad)
1 file changed