Skip to content

Commit

Permalink
fix(camera): validated size of the list
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Del Pino <idelpino@teclib.com>
  • Loading branch information
Ivan Del Pino authored and rafaelje committed Oct 1, 2018
1 parent d505ae9 commit 8f43920
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ public Cameras(Context xCtx) {
c.put("MANUFACTURER", new CategoryValue(getManufacturer(index), "MANUFACTURER", "manufacturer"));
}
c.put("RESOLUTIONVIDEO", new CategoryValue(getVideoResolution(index), "RESOLUTIONVIDEO", "resolutionvideo"));
c.put("SUPPORTS", new CategoryValue(getSupportValue(), "SUPPORTS", "supports"));
ArrayList<String> supportValue = getSupportValue();
if (supportValue.size() > 0) {
c.put("SUPPORTS", new CategoryValue(supportValue, "SUPPORTS", "supports"));
}
c.put("MODEL", new CategoryValue(getModel(index), "MODEL", "model"));
this.add(c);
}
Expand Down Expand Up @@ -452,13 +455,6 @@ public ArrayList<String> getSupportValue() {
arrayList.add(((String) it.next()).toLowerCase(Locale.US));
}
return arrayList;
/*StringBuilder values = new StringBuilder();
for (int i = 0; i < arrayList.size(); i++) {
values.append(arrayList.get(i));
if (i != arrayList.size() - 1)
values.append("; ");
}
return "".equals(values.toString()) ? "N/A" : values.toString();*/
}

private ArrayList<String> getCatInfoCamera(String str, String str2, int i) {
Expand Down

0 comments on commit 8f43920

Please sign in to comment.