From f3ee614f89a82cdbbc23244c70dd67f917854197 Mon Sep 17 00:00:00 2001 From: Candice Date: Tue, 25 Feb 2025 15:39:08 +0000 Subject: 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 --- .../src/com/android/settingslib/widget/IllustrationPreference.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/SettingsLib/IllustrationPreference/src/com/android/settingslib/widget/IllustrationPreference.java b/packages/SettingsLib/IllustrationPreference/src/com/android/settingslib/widget/IllustrationPreference.java index 0c64fa7d34dd..d55bbb3bbdbf 100644 --- a/packages/SettingsLib/IllustrationPreference/src/com/android/settingslib/widget/IllustrationPreference.java +++ b/packages/SettingsLib/IllustrationPreference/src/com/android/settingslib/widget/IllustrationPreference.java @@ -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; -- cgit v1.2.3-59-g8ed1b