Only postpone animations if app is visible

Fixes bug where folders would remain open after
returning to launcher

Bug: 8681168

Change-Id: I930616f2aa006c1e23298dbdb0a80a9390ea41af