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

Commit f3ee614f authored by Candice's avatar Candice
Browse files

Create `isAnimatable` to expose if the current illustration is an animation

Adding the `isAnimatable` method to help the Settings know if the
current illustration is an animation or not. This will be used for
adding content description to an animation.

Bug: 395882764
Test: manually. attach screenshot to the bug
flag: EXEMPT. bugfix
Change-Id: Iab8d99ac77c2a4655cd87fc16d2af0f81731350a
parent 87a7a1d9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -447,6 +447,10 @@ public class IllustrationPreference extends Preference implements GroupSectionDi
        illustrationView.setMaxWidth((int) (restrictedMaxHeight * aspectRatio));
    }

    public boolean isAnimatable() {
        return mIsAnimatable;
    }

    private void startAnimation(Drawable drawable) {
        if (!(drawable instanceof Animatable)) {
            return;