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

Commit 4b0fe7f1 authored by Jerome Gaillard's avatar Jerome Gaillard
Browse files

Use RenderDrawable to render mipmaps

Bug: http://b.android.com/179714
Change-Id: If05e71b33ee3a95590eb892f4fffbff4cfca1867
parent 8e6fc083
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -42,10 +42,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * Action to render a given Drawable provided through {@link DrawableParams#getDrawable()}.
 *
@@ -72,8 +68,12 @@ public class RenderDrawable extends RenderAction<DrawableParams> {
        BridgeContext context = getContext();
        drawableResource = context.getRenderResources().resolveResValue(drawableResource);

        if (drawableResource == null ||
                drawableResource.getResourceType() != ResourceType.DRAWABLE) {
        if (drawableResource == null) {
            return Status.ERROR_NOT_A_DRAWABLE.createResult();
        }

        ResourceType resourceType = drawableResource.getResourceType();
        if (resourceType != ResourceType.DRAWABLE && resourceType != ResourceType.MIPMAP) {
            return Status.ERROR_NOT_A_DRAWABLE.createResult();
        }