Skip to content

armgit / haven

Public Imported from GitHub
0

Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors

handle the view logs / deactivate button as expected

n8fr84431fd04749a
diff --git a/src/main/java/org/havenapp/main/MonitorActivity.java b/src/main/java/org/havenapp/main/MonitorActivity.java
index 7ed845e..03bc67f 100644
--- a/src/main/java/org/havenapp/main/MonitorActivity.java
+++ b/src/main/java/org/havenapp/main/MonitorActivity.java
@@ -188,10 +188,13 @@ public class MonitorActivity extends AppCompatActivity implements TimePickerDial
private void doCancel() {
+ boolean wasTimer = false;
+
if (cTimer != null) {
cTimer.cancel();
cTimer = null;
mOnTimerTicking = false;
+ wasTimer = true;
}
if (mIsMonitoring) {
@@ -207,6 +210,9 @@ public class MonitorActivity extends AppCompatActivity implements TimePickerDial
int timeM = preferences.getTimerDelay() * 1000;
txtTimer.setText(getTimerText(timeM));
+
+ if (!wasTimer)
+ finish();
}
}