mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-04-29 10:08:10 +00:00
Ignore JSON exceptions in getUsageCounts instead of printing them
This commit is contained in:
parent
339a31b0f3
commit
927ea50c33
1 changed files with 2 additions and 4 deletions
|
@ -204,13 +204,11 @@ public class Preferences {
|
||||||
String usageCount = _prefs.getString("pref_usage_count", "");
|
String usageCount = _prefs.getString("pref_usage_count", "");
|
||||||
try {
|
try {
|
||||||
JSONArray arr = new JSONArray(usageCount);
|
JSONArray arr = new JSONArray(usageCount);
|
||||||
for(int i = 0; i < arr.length(); i++) {
|
for (int i = 0; i < arr.length(); i++) {
|
||||||
JSONObject json = arr.getJSONObject(i);
|
JSONObject json = arr.getJSONObject(i);
|
||||||
usageCounts.put(UUID.fromString(json.getString("uuid")), json.getInt("count"));
|
usageCounts.put(UUID.fromString(json.getString("uuid")), json.getInt("count"));
|
||||||
}
|
}
|
||||||
|
} catch (JSONException ignored) {
|
||||||
} catch (JSONException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return usageCounts;
|
return usageCounts;
|
||||||
|
|
Loading…
Add table
Reference in a new issue