// TODO now we might need to set the second activity state
// to 'grey' to indicate it now could happen?
// let's force the lazy creation of the second state
ActivityState secondState = second.getOrCreateActivityState(instance);
if (expectedMillis > 0L) {
Date expected = secondState.getTimeExpected();
if (expected == null) {
expected = add(firstTime, expectedMillis);
secondState.setTimeExpected(expected);
}
}
if (overdueMillis > 0L) {
Date overdue = secondState.getTimeOverdue();
if (overdue == null) {
overdue = add(firstTime, overdueMillis);
secondState.setTimeOverdue(overdue);
}
}
}