Attempt to get F-Droid working

This commit is contained in:
Astatin3
2024-09-15 22:47:45 -06:00
parent 138158e2ee
commit 3f88c9a05e
74 changed files with 372 additions and 366 deletions
@@ -0,0 +1,23 @@
package com.ridgebotics.ridgescout.utility;
import org.json.JSONArray;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
public class JSONUtil {
public static JSONArray sort(JSONArray array, Comparator c){
List asList = new ArrayList(array.length());
for (int i=0; i<array.length(); i++){
asList.add(array.opt(i));
}
asList.sort(c);
JSONArray res = new JSONArray();
for (Object o : asList){
res.put(o);
}
return res;
}
}