Only animate when the slice is actually animating

It's not correct to always animate if there is a layout transition.
The transition might not be triggered when the view is invisible
for example. It's necessary to check if we have pending/running
animations.

Change-Id: I75dbc9f8a152a162a3c77c9b316f653e665b8842
Fixes: 79773596
Test: manual
Test: atest packages/SystemUI/tests/src/com/android/keyguard/KeyguardSliceViewTest.java
3 files changed