log (SITECHANGE)
This commit is contained in:
parent
bed901fe15
commit
7da4e4fd70
3 changed files with 11 additions and 7 deletions
|
@ -97,14 +97,17 @@ public class CareportalEvent implements DataPointWithLabelInterface, Interval {
|
|||
public String age() {
|
||||
Map<TimeUnit, Long> diff = computeDiff(date, System.currentTimeMillis());
|
||||
if (OverviewFragment.shorttextmode)
|
||||
return diff.get(TimeUnit.DAYS) +"d" + diff.get(TimeUnit.HOURS) + "h";
|
||||
return diff.get(TimeUnit.DAYS) + "d" + diff.get(TimeUnit.HOURS) + "h";
|
||||
else
|
||||
return diff.get(TimeUnit.DAYS) + " " + MainApp.gs(R.string.days) + " " + diff.get(TimeUnit.HOURS) + " " + MainApp.gs(R.string.hours);
|
||||
}
|
||||
|
||||
public boolean isOlderThan(double hours) { return getHoursFromStart() > hours; }
|
||||
public boolean isOlderThan(double hours) {
|
||||
return getHoursFromStart() > hours;
|
||||
}
|
||||
|
||||
public String log() {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CareportalEvent{" +
|
||||
"date= " + date +
|
||||
", date= " + DateUtil.dateAndTimeString(date) +
|
||||
|
@ -136,11 +139,12 @@ public class CareportalEvent implements DataPointWithLabelInterface, Interval {
|
|||
for (int i = 0; i < list.size(); i++) {
|
||||
CareportalEvent event = list.get(i);
|
||||
if (event.date <= time && event.date > (time - T.mins(5).msecs())) {
|
||||
//log.debug("Found event for time: " + DateUtil.dateAndTimeString(time) + " " + event.toString());
|
||||
if (L.isEnabled(L.DATABASE))
|
||||
log.debug("Found event for time: " + DateUtil.dateAndTimeFullString(time) + " " + event.toString());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//log.debug("WWWWWW No found event for time: " + DateUtil.dateAndTimeString(time));
|
||||
//log.debug("No found event for time: " + DateUtil.dateAndTimeString(time));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1353,7 +1353,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
|||
if (list.size() == 1) {
|
||||
CareportalEvent record = list.get(0);
|
||||
if (L.isEnabled(L.DATABASE))
|
||||
log.debug("Removing CareportalEvent record from database: " + record.log());
|
||||
log.debug("Removing CareportalEvent record from database: " + record.toString());
|
||||
delete(record);
|
||||
} else {
|
||||
if (L.isEnabled(L.DATABASE))
|
||||
|
|
|
@ -254,7 +254,7 @@ public class DataService extends IntentService {
|
|||
CareportalEvent careportalEvent = new CareportalEvent(nsMbg);
|
||||
MainApp.getDbHelper().createOrUpdate(careportalEvent);
|
||||
if (L.isEnabled(L.DATASERVICE))
|
||||
log.debug("Adding/Updating new MBG: " + careportalEvent.log());
|
||||
log.debug("Adding/Updating new MBG: " + careportalEvent.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue