if(pkgs==null) {
try {
pkgs = webOS.listInstalled();
apps = getApps();
for(int i=0; i<pkgs.size(); i++) {
InstalledEntry curr = pkgs.get(i);
String name = curr.getName();
if(name.equals("This is a webOS application.")) {
if(apps!=null) {
JSONObject json = getAppInfoFromId(curr.getId());
try {
curr.setName(json.getString("title"));
curr.setDeveloper(json.getString("vendor"));
} catch(Exception e) {}
} else {
curr.setName(curr.getName(webOS));
}
}
}
} catch(StackOverflowError e) {
System.err.println(e.getMessage());
}
}
filtered.clear();
while(modTable.getRowCount()>0) {
modTable.removeRow(0);
}
for(int i=0; i<pkgs.size(); i++) {
InstalledEntry curr = pkgs.get(i);
if((jComboBox1.getSelectedIndex()==1)==
(curr.getId().startsWith("ca.canucksoftware.patches.") ||
curr.getId().startsWith("org.webosinternals.patches."))) {
filtered.add(curr);
modTable.addRow(new Object[] {curr.getName(), Boolean.FALSE});
}
}
}