Don't create TBR record when pump has been paused
This commit is contained in:
parent
7c971197c7
commit
2844be85b5
|
@ -183,7 +183,7 @@ class HistoryIntentAdapter {
|
||||||
}
|
}
|
||||||
if (intent.hasExtra(HistoryBroadcast.EXTRA_OLD_STATUS_TIME)) {
|
if (intent.hasExtra(HistoryBroadcast.EXTRA_OLD_STATUS_TIME)) {
|
||||||
String oldStatus = intent.getStringExtra(HistoryBroadcast.EXTRA_OLD_STATUS);
|
String oldStatus = intent.getStringExtra(HistoryBroadcast.EXTRA_OLD_STATUS);
|
||||||
if (oldStatus.equals("STOPPED") ||oldStatus.equals("PAUSED")) {
|
if (oldStatus.equals("STOPPED")) {
|
||||||
Date oldStatusTime = getDateExtra(intent, HistoryBroadcast.EXTRA_OLD_STATUS_TIME);
|
Date oldStatusTime = getDateExtra(intent, HistoryBroadcast.EXTRA_OLD_STATUS_TIME);
|
||||||
int duration = (int) ((newStatusTime.getTime() - oldStatusTime.getTime()) / 60000);
|
int duration = (int) ((newStatusTime.getTime() - oldStatusTime.getTime()) / 60000);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue