Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 035a82d2 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

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
parent 3f3d42e0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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();
                }