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

Commit 48748c5d authored by Jerome Gaillard's avatar Jerome Gaillard Committed by android-build-merger
Browse files

Use RenderDrawable to render mipmaps am: 4b0fe7f1

am: e298bcf7

* commit 'e298bcf7':
  Use RenderDrawable to render mipmaps
parents 3e81d090 e298bcf7
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();
        }