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

Commit 63975dde authored by Jack Palevich's avatar Jack Palevich
Browse files

Remove versions of scriptCSetScript method that take byte arrays.

This makes the API simpler, and therefore probably easier to use.
parent 43702d89
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -614,20 +614,13 @@ public class RenderScript {

    public void scriptCSetScript(String s) {
        try {
            scriptCSetScript(s.getBytes("UTF-8"));
            byte[] bytes = s.getBytes("UTF-8");
            nScriptCSetScript(bytes, 0, bytes.length);
        } catch (java.io.UnsupportedEncodingException e) {
            throw new RuntimeException(e);
        }
    }

    public void scriptCSetScript(byte[] utf8Bytes) {
        scriptCSetScript(utf8Bytes, 0, utf8Bytes.length);
    }

    public void scriptCSetScript(byte[] utf8Bytes, int offset, int length) {
        nScriptCSetScript(utf8Bytes, offset, length);
    }

    public void scriptCSetScript(Resources resources, int id) {
        InputStream is = resources.openRawResource(id);
        try {