From 035a82d264b8c4cdcb88cb542019a48b7629c973 Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Mon, 29 Feb 2016 08:42:25 +0100 Subject: [PATCH] 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 --- .../src/com/android/systemui/statusbar/SignalClusterView.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java index 444916acb69d8..c892b11e33fab 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java @@ -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(); }