Loading services/core/java/com/android/server/wm/AppTransition.java +9 −14 Original line number Original line Diff line number Diff line Loading @@ -82,6 +82,7 @@ import android.app.ActivityManager; import android.content.ComponentName; import android.content.ComponentName; import android.content.Context; import android.content.Context; import android.content.res.Configuration; import android.content.res.Configuration; import android.content.res.ResourceId; import android.graphics.Bitmap; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Color; Loading Loading @@ -538,25 +539,25 @@ public class AppTransition implements Dump { } } Animation loadAnimationAttr(LayoutParams lp, int animAttr, int transit) { Animation loadAnimationAttr(LayoutParams lp, int animAttr, int transit) { int anim = 0; int resId = ResourceId.ID_NULL; Context context = mContext; Context context = mContext; if (animAttr >= 0) { if (animAttr >= 0) { AttributeCache.Entry ent = getCachedAnimations(lp); AttributeCache.Entry ent = getCachedAnimations(lp); if (ent != null) { if (ent != null) { context = ent.context; context = ent.context; anim = ent.array.getResourceId(animAttr, 0); resId = ent.array.getResourceId(animAttr, 0); } } } } anim = updateToTranslucentAnimIfNeeded(anim, transit); resId = updateToTranslucentAnimIfNeeded(resId, transit); if (anim != 0) { if (ResourceId.isValid(resId)) { return AnimationUtils.loadAnimation(context, anim); return AnimationUtils.loadAnimation(context, resId); } } return null; return null; } } Animation loadAnimationRes(LayoutParams lp, int resId) { Animation loadAnimationRes(LayoutParams lp, int resId) { Context context = mContext; Context context = mContext; if (resId >= 0) { if (ResourceId.isValid(resId)) { AttributeCache.Entry ent = getCachedAnimations(lp); AttributeCache.Entry ent = getCachedAnimations(lp); if (ent != null) { if (ent != null) { context = ent.context; context = ent.context; Loading @@ -567,17 +568,11 @@ public class AppTransition implements Dump { } } private Animation loadAnimationRes(String packageName, int resId) { private Animation loadAnimationRes(String packageName, int resId) { int anim = 0; if (ResourceId.isValid(resId)) { Context context = mContext; if (resId >= 0) { AttributeCache.Entry ent = getCachedAnimations(packageName, resId); AttributeCache.Entry ent = getCachedAnimations(packageName, resId); if (ent != null) { if (ent != null) { context = ent.context; return AnimationUtils.loadAnimation(ent.context, resId); anim = resId; } } } if (anim != 0) { return AnimationUtils.loadAnimation(context, anim); } } return null; return null; } } Loading Loading
services/core/java/com/android/server/wm/AppTransition.java +9 −14 Original line number Original line Diff line number Diff line Loading @@ -82,6 +82,7 @@ import android.app.ActivityManager; import android.content.ComponentName; import android.content.ComponentName; import android.content.Context; import android.content.Context; import android.content.res.Configuration; import android.content.res.Configuration; import android.content.res.ResourceId; import android.graphics.Bitmap; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Color; Loading Loading @@ -538,25 +539,25 @@ public class AppTransition implements Dump { } } Animation loadAnimationAttr(LayoutParams lp, int animAttr, int transit) { Animation loadAnimationAttr(LayoutParams lp, int animAttr, int transit) { int anim = 0; int resId = ResourceId.ID_NULL; Context context = mContext; Context context = mContext; if (animAttr >= 0) { if (animAttr >= 0) { AttributeCache.Entry ent = getCachedAnimations(lp); AttributeCache.Entry ent = getCachedAnimations(lp); if (ent != null) { if (ent != null) { context = ent.context; context = ent.context; anim = ent.array.getResourceId(animAttr, 0); resId = ent.array.getResourceId(animAttr, 0); } } } } anim = updateToTranslucentAnimIfNeeded(anim, transit); resId = updateToTranslucentAnimIfNeeded(resId, transit); if (anim != 0) { if (ResourceId.isValid(resId)) { return AnimationUtils.loadAnimation(context, anim); return AnimationUtils.loadAnimation(context, resId); } } return null; return null; } } Animation loadAnimationRes(LayoutParams lp, int resId) { Animation loadAnimationRes(LayoutParams lp, int resId) { Context context = mContext; Context context = mContext; if (resId >= 0) { if (ResourceId.isValid(resId)) { AttributeCache.Entry ent = getCachedAnimations(lp); AttributeCache.Entry ent = getCachedAnimations(lp); if (ent != null) { if (ent != null) { context = ent.context; context = ent.context; Loading @@ -567,17 +568,11 @@ public class AppTransition implements Dump { } } private Animation loadAnimationRes(String packageName, int resId) { private Animation loadAnimationRes(String packageName, int resId) { int anim = 0; if (ResourceId.isValid(resId)) { Context context = mContext; if (resId >= 0) { AttributeCache.Entry ent = getCachedAnimations(packageName, resId); AttributeCache.Entry ent = getCachedAnimations(packageName, resId); if (ent != null) { if (ent != null) { context = ent.context; return AnimationUtils.loadAnimation(ent.context, resId); anim = resId; } } } if (anim != 0) { return AnimationUtils.loadAnimation(context, anim); } } return null; return null; } } Loading