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

Commit 52d32ef5 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by android-build-merger
Browse files

Merge "Revert "Don't consider resources < 0 as invalid"" into pi-dev

am: 2557f341

Change-Id: Iff2cbb469b137cbc7cbb258d001d3330451f2221
parents 3bd37ea3 2557f341
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -82,7 +82,6 @@ import android.app.ActivityManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.ResourceId;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
@@ -556,16 +555,16 @@ public class AppTransition implements Dump {
    }

    Animation loadAnimationAttr(LayoutParams lp, int animAttr) {
        int anim = ResourceId.ID_NULL;
        int anim = 0;
        Context context = mContext;
        if (ResourceId.isValid(animAttr)) {
        if (animAttr >= 0) {
            AttributeCache.Entry ent = getCachedAnimations(lp);
            if (ent != null) {
                context = ent.context;
                anim = ent.array.getResourceId(animAttr, 0);
            }
        }
        if (ResourceId.isValid(anim)) {
        if (anim != 0) {
            return AnimationUtils.loadAnimation(context, anim);
        }
        return null;
@@ -573,7 +572,7 @@ public class AppTransition implements Dump {

    Animation loadAnimationRes(LayoutParams lp, int resId) {
        Context context = mContext;
        if (ResourceId.isValid(resId)) {
        if (resId >= 0) {
            AttributeCache.Entry ent = getCachedAnimations(lp);
            if (ent != null) {
                context = ent.context;
@@ -584,16 +583,16 @@ public class AppTransition implements Dump {
    }

    private Animation loadAnimationRes(String packageName, int resId) {
        int anim = ResourceId.ID_NULL;
        int anim = 0;
        Context context = mContext;
        if (ResourceId.isValid(resId)) {
        if (resId >= 0) {
            AttributeCache.Entry ent = getCachedAnimations(packageName, resId);
            if (ent != null) {
                context = ent.context;
                anim = resId;
            }
        }
        if (ResourceId.isValid(anim)) {
        if (anim != 0) {
            return AnimationUtils.loadAnimation(context, anim);
        }
        return null;