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

Commit 08d7d039 authored by Miao Wang's avatar Miao Wang
Browse files

Add check for input allocation type for ScriptIntrinsicBlur.

Bug: 124466617
Test: mm
Test: CtsRenderscriptTestCases
Change-Id: I4784b96b5f96749d503bd1de8360e74b72f3f5c2
parent f2f31c21
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -62,6 +62,10 @@ public final class ScriptIntrinsicBlur extends ScriptIntrinsic {
        if (ain.getType().getY() == 0) {
            throw new RSIllegalArgumentException("Input set to a 1D Allocation");
        }
        Element e = ain.getElement();
        if ((!e.isCompatible(Element.U8_4(mRS))) && (!e.isCompatible(Element.U8(mRS)))) {
            throw new RSIllegalArgumentException("Unsupported element type.");
        }
        mInput = ain;
        setVar(1, ain);
    }