Commit d20479ec authored by Toni Beier's avatar Toni Beier

The status screen of the ongoing configuration is leavable

parent 065774ef
Pipeline #24739 passed with stages
in 2 minutes and 57 seconds
...@@ -160,21 +160,25 @@ public class MainActivity extends AppCompatActivity { ...@@ -160,21 +160,25 @@ public class MainActivity extends AppCompatActivity {
if (inInstall) { if (inInstall) {
Helper.getInstallStatus(this); Helper.getInstallStatus(this);
synchronized (this) {
if (timer == null) {
timer = new Timer(true); timer = new Timer(true);
timer.schedule(new TimerTask() { timer.schedule(new TimerTask() {
@Override
public void run() {
MainActivity.this.runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
redrawLayoutInstall(); MainActivity.this.runOnUiThread(new Runnable() {
if (Helper.ticks_install.size() >= 4) @Override
timer.cancel(); public void run() {
redrawLayoutInstall();
if (Helper.ticks_install.size() >= 4)
timer.cancel();
}
});
} }
}); }, 1000, 2000);
} }
}, 1000, 2000); }
} else { } else {
...@@ -289,6 +293,12 @@ public class MainActivity extends AppCompatActivity { ...@@ -289,6 +293,12 @@ public class MainActivity extends AppCompatActivity {
private void btn_exit_click() { private void btn_exit_click() {
inInstall = false; inInstall = false;
synchronized (this) {
if (timer != null) {
timer.cancel();
timer = null;
}
}
recomputeLayout(); recomputeLayout();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment