Never consider windows visible if appToken is hidden
This fixes a bug with trampoline activities: T1 starts T2 in onCreate. Now T2 finished itself and in activityResult in T1 T1 starts TNoDisplay that finishes and starts T1' which starts T2'. Since T1' didn't get the request yet to be hidden mViewVisibility for the main window is still VISIBLE. Thus, we note that all windows for T1' are visible and report that to AM. Note that since visibility of T1' never changed (it was always hidden) we also don't have an animation set so we don't block visibility on the fact that there is an animation set. However, AM was waiting for things to be visible before destroying T2, and thus destroy T2 before the animation is actually done, leading to a black hole. We fix this by only reporting AM things to be visible if our app token is not hidden. Test: Above flow, ensure no black hole Test: go/wm-smoke Change-Id: Ifde0e9fa1f1381a5b3a1ac9c88fd209d0903e513 Fixes: 62802161
Loading
Please register or sign in to comment