Clear ZBoost when removing animation leash
Otherwise after launching a translucent activity, the previous
activity may still have top layer.
The mNeedsZBoost was cleared at onAnimationFinished. But it
needs reassignLayer to take effect. The order was
onAnimationLeashLost -> reassignLayer -> onAnimationFinished
-> clear mNeedsZBoost. So the boosted layer is not restored.
Keep original place that clears mNeedsZBoost in case the callback
is not called if there was no animation leash.
It was no problem because there was random unnecessary
assignWindowLayers from wallpaper even if it has nothing change.
After commit f649375 optimizes that, the existing issue is revealed.
Fixes: 228233527
Test: AppWindowTokenAnimationTests#clipAfterAnim_boundsLayerZBoosted
Change-Id: Ic4a3a106569173f24e56de213bc31dd6f287d4f5
2 files changed