Cleanup mAnimatingExit flag before maybeUpdateTransitToWallpaper()

If we get onStopped before next resume, but previous exit animation
doesn't finish by the time the entering animation is started,
notifyAppResumed() won't do a surface cleanup (since it's already
stopped). Then maybeUpdateTransitToWallpaper() will think the wallpaper
target (launcher) is invisible because of the mAnimatingExit==true,
thus fails to pick WALLPAPER_OPEN animation.

We need to clear mAnimatingExit and relevant flags before
maybeUpdateTransitToWallpaper(). Currently we do it in handleOpeningApps
but that's too late.

bug: 30255354
Change-Id: Idb049c54978824709a190c413d82d42f40226aa7
2 files changed