mirror of
https://github.com/stom79/exodus-android-app
synced 2025-01-11 08:14:16 +01:00
Fix bug that don't fetch correctly reports
This commit is contained in:
parent
6e901b7e44
commit
f0fd17b5df
@ -268,15 +268,11 @@ public class NetworkManager {
|
||||
|
||||
if(object != null) {
|
||||
try {
|
||||
JSONObject applications = object.getJSONObject(handle);
|
||||
JSONObject application = object.getJSONObject(handle);
|
||||
ArrayList<String> packages = mes.args.getStringArrayList("packages");
|
||||
for(int i = 0; i<applications.names().length(); i++) {
|
||||
String packageName = applications.names().get(i).toString();
|
||||
if(packages != null && packages.contains(packageName)) {
|
||||
JSONObject application = applications.getJSONObject(packageName);
|
||||
Application app = parseApplication(application, packageName);
|
||||
DatabaseManager.getInstance(mes.context).insertOrUpdateApplication(app);
|
||||
}
|
||||
if(packages != null && packages.contains(handle)) {
|
||||
Application app = parseApplication(application, handle);
|
||||
DatabaseManager.getInstance(mes.context).insertOrUpdateApplication(app);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
mes.listener.onError(mes.context.getString(R.string.json_error));
|
||||
|
Loading…
Reference in New Issue
Block a user