Force carrier network change anim onto UI thread

Fixes a bug where RenderThread was constantly scheduling frames,
but didn't actually start the animation. Also fixes some jank
while the animation is playing.

Bug: 27396097
Change-Id: I353d60633eeef1a4f3bbfbeddb58f9703debe293
This commit is contained in:
Jorim Jaggi
2016-02-29 08:42:25 +01:00
parent 3f3d42e0d4
commit 035a82d264

View File

@@ -23,6 +23,7 @@ import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.Rect;
import android.graphics.drawable.Animatable;
import android.graphics.drawable.AnimatedVectorDrawable;
import android.graphics.drawable.Drawable;
import android.telephony.SubscriptionInfo;
import android.util.ArraySet;
@@ -636,6 +637,9 @@ public class SignalClusterView
if (drawable instanceof Animatable) {
Animatable ad = (Animatable) drawable;
if (ad instanceof AnimatedVectorDrawable) {
((AnimatedVectorDrawable) ad).forceAnimationOnUI();
}
if (!ad.isRunning()) {
ad.start();
}