Fix a deadlock WMG->WMS, WMS->WMG

In ImmersiveModeConfirmation, the WindowManager operations shouldn't be
called while holding the WM lock. Thus, I remove the assigned operation of
mWindowManager member in the constructor function. Next, I add a private
function to get a valid mWindowManager member in 3 functions (handleHide,
handleShow, onAttachedToWindow). The 3 functions are called by a different
thread by specific events. It should avoid the deadlock we saw now.

Bug: 129101307, 128520392
Test: local build and manually test it for 2 times
Test Steps: 1. Boot up the device 2. Start Photo to view a photo in full
screen and exit full screen
Change-Id: If42f4fd6a31869d5eefa8b445c32665aef1ee07d
1 file changed