run aps only on interested treatments

This commit is contained in:
Milos Kozak 2017-01-08 00:45:43 +01:00
parent f704090eac
commit 7b5a289fc1

View file

@ -346,7 +346,6 @@ public class DataService extends IntentService {
handleAddedTreatment(trstr); handleAddedTreatment(trstr);
} }
} }
scheduleTreatmentChange();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
@ -368,7 +367,6 @@ public class DataService extends IntentService {
handleChangedTreatment(trstr); handleChangedTreatment(trstr);
} }
} }
scheduleTreatmentChange();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
@ -392,7 +390,6 @@ public class DataService extends IntentService {
removeTreatmentFromDb(_id); removeTreatmentFromDb(_id);
} }
} }
scheduleTreatmentChange();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
@ -471,6 +468,7 @@ public class DataService extends IntentService {
int updated = MainApp.getDbHelper().getDaoTreatments().update(stored); int updated = MainApp.getDbHelper().getDaoTreatments().update(stored);
if (Config.logIncommingData) if (Config.logIncommingData)
log.debug("Records updated: " + updated); log.debug("Records updated: " + updated);
scheduleTreatmentChange();
} }
} else { } else {
if (Config.logIncommingData) if (Config.logIncommingData)
@ -494,6 +492,7 @@ public class DataService extends IntentService {
} catch (SQLException e) { } catch (SQLException e) {
e.printStackTrace(); e.printStackTrace();
} }
scheduleTreatmentChange();
} }
} }
@ -547,6 +546,7 @@ public class DataService extends IntentService {
} catch (SQLException e) { } catch (SQLException e) {
e.printStackTrace(); e.printStackTrace();
} }
scheduleTreatmentChange();
} }
public void handleDanaRHistoryRecords(JSONObject trJson) throws JSONException, SQLException { public void handleDanaRHistoryRecords(JSONObject trJson) throws JSONException, SQLException {