Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
fix(apps): add thread manager
Browse files Browse the repository at this point in the history
Signed-off-by: Rafa Hernandez <[email protected]>
  • Loading branch information
rafaelje authored and Hector Rondon committed Oct 3, 2018
1 parent 8e7acb0 commit 802c0a1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/src/main/java/org/flyve/mdm/agent/utils/AppThreadManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ private AppThreadManager(MqttAndroidClient client) {
}

public void add(Context context, JSONObject jsonObj) {
<<<<<<< HEAD
if(!item.isEmpty()) {
for (int i = 0; i < item.size(); i++) {
if (item.get(i).toString().trim().contains(jsonObj.toString().trim())) {
Expand All @@ -70,6 +71,8 @@ public void add(Context context, JSONObject jsonObj) {
}
}

=======
>>>>>>> fix(apps): add thread manager
item.add(jsonObj);
process(context);
}
Expand Down Expand Up @@ -98,6 +101,7 @@ public void process(Context context) {
String versionCode = jsonObj.getString("versionCode");
String taskId = jsonObj.getString("taskId");

<<<<<<< HEAD
ApplicationData apps = new ApplicationData(context);
Application[] appsArray = apps.getApplicationsById(id);

Expand All @@ -116,6 +120,13 @@ public void process(Context context) {
}
} catch (Exception ex) {
FlyveLog.e(ex.getMessage());
=======
// execute the policy
PoliciesController policiesController = new PoliciesController(context, this.client);
policiesController.installPackage(deployApp, id, versionCode, taskId);
} catch (Exception ex) {
FlyveLog.e("");
>>>>>>> fix(apps): add thread manager
}
}
}
Expand Down

0 comments on commit 802c0a1

Please sign in to comment.