Reapply animation duration scale each time it is started.

When Battery Saver mode is enabled, we set the animation duration
scale factor to 0 to effectively disable all animations.  Later
when it is disabled, we reset the animation duration scale
factor to 1.

This change ensures that we reapply the duration scale factor
whenever the animation is started instead of only applying it
once when the duration is set (usually when the animation is
created).  This ensures that the correct scale factor is applied
even when it changes after the animation has been initialized.

Previously, certain animations would continue to be suppressed
even after Battery Saver mode was disengaged.  This wasn't much
of an issue when the duration scale was initially implemented as
a developer setting but now that it is exposed via Battery Saver
the artifacts caused by this bug have become visible to users.

Bug: 17887431
Change-Id: I91ba5ca0505d02ac389a31d067e38886112fa0c8
1 file changed