summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-10-12 17:02:17 -0700
committerSteve Kondik <steve@cyngn.com>2016-10-12 17:02:17 -0700
commit97fe01739d7e7f597ba76b4f3df8040916346e85 (patch)
treec4babebf4bbfd01291f01ffa8aa767c8b7b21043
parent7558fcb6f482eb9368159228553e9976c69c2d50 (diff)
downloadandroid_external_cyanogen_UICommon-cm-14.0.tar.gz
android_external_cyanogen_UICommon-cm-14.0.tar.bz2
android_external_cyanogen_UICommon-cm-14.0.zip
uicommon: Fix StopMotionVectorDrawable for Ncm-14.0
* The guts of AVD have changed in N, adjust hacks accordingly. Change-Id: Ia28c3099389252a3fd57373e02800fee9d467f64
-rw-r--r--src/org/cyanogenmod/graphics/drawable/StopMotionVectorDrawable.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/org/cyanogenmod/graphics/drawable/StopMotionVectorDrawable.java b/src/org/cyanogenmod/graphics/drawable/StopMotionVectorDrawable.java
index 869c866..b85afd9 100644
--- a/src/org/cyanogenmod/graphics/drawable/StopMotionVectorDrawable.java
+++ b/src/org/cyanogenmod/graphics/drawable/StopMotionVectorDrawable.java
@@ -89,8 +89,12 @@ public class StopMotionVectorDrawable extends DrawableWrapper {
try {
Field _mAnimatorSet = AnimatedVectorDrawable.class.getDeclaredField("mAnimatorSet");
_mAnimatorSet.setAccessible(true);
- mAnimatorSet = (AnimatorSet) _mAnimatorSet.get(mDrawable);
- } catch (NoSuchFieldException | IllegalAccessException e) {
+ Class<?> innerClazz = Class.forName("android.graphics.drawable.AnimatedVectorDrawable$VectorDrawableAnimatorUI");
+ Object _inner = _mAnimatorSet.get(mDrawable);
+ Field _mSet = innerClazz.getDeclaredField("mSet");
+ _mSet.setAccessible(true);
+ mAnimatorSet = (AnimatorSet) _mSet.get(_inner);
+ } catch (NoSuchFieldException | IllegalAccessException | ClassNotFoundException e) {
Log.e(TAG, "Could not get mAnimatorSet via reflection", e);
}
}