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

Commit 7c22e7ca authored by Shunkai Yao's avatar Shunkai Yao Committed by Android (Google) Code Review
Browse files

Merge "Use getParameter return value for the preset length" into main

parents 4fb678fc d9a4bd00
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -153,9 +153,8 @@ public class Equalizer extends AudioEffect {
            param[0] = PARAM_GET_PRESET_NAME;
            for (int i = 0; i < mNumPresets; i++) {
                param[1] = i;
                checkStatus(getParameter(param, value));
                int length = 0;
                while (value[length] != 0) length++;
                final int length = getParameter(param, value);
                checkStatus(length);
                try {
                    mPresetNames[i] = new String(value, 0, length, "ISO-8859-1");
                } catch (java.io.UnsupportedEncodingException e) {