Prevent infinite layout and wallpaper flashing

The original logic would cause mTopFullscreenOpaqueWindowState to be
hidden in PhoneWindowManager.finishPostLayoutPolicyLw(), and to be
shown in WindowAnimator.updateWindowsLocked() continuously if there
is a show-when-locked dialog.

The wallpaper would be hidden after the original wallpaper target is
hidden, before the new wallpaper target is shown.

https://code.google.com/p/android/issues/detail?id=162495

Change-Id: I918e0fa03eec38d9f0c07150c17013c6c21683cb
1 file changed