Avoid NPE for camera with no params

git-svn-id: https://zxing.googlecode.com/svn/trunk@2995 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2013-12-17 15:11:33 +00:00
parent 9a5391b653
commit fe555e001b

View file

@ -307,10 +307,12 @@ public final class ZXingTestActivity extends Activity {
result.append("VERSION.SDK_INT=").append(Build.VERSION.SDK_INT).append('\n');
CharSequence flattened = getFlattenedParams();
String[] params = SEMICOLON.split(flattened);
Arrays.sort(params);
for (String param : params) {
result.append(param).append('\n');
if (flattened != null) {
String[] params = SEMICOLON.split(flattened);
Arrays.sort(params);
for (String param : params) {
result.append(param).append('\n');
}
}
String resultString = result.toString();