diff --git a/app/src/main/java/org/openobservatory/ooniprobe/test/TestAsyncTask.java b/app/src/main/java/org/openobservatory/ooniprobe/test/TestAsyncTask.java index f7e642221..42732fd87 100644 --- a/app/src/main/java/org/openobservatory/ooniprobe/test/TestAsyncTask.java +++ b/app/src/main/java/org/openobservatory/ooniprobe/test/TestAsyncTask.java @@ -196,8 +196,16 @@ private void downloadURLs() { currentTest.setInputs(inputs); - if (currentTest.getMax_runtime() == null) - currentTest.setMax_runtime(app.getPreferenceManager().getMaxRuntime()); + /* + * Set the maximum runtime if the test doesn't yet have it.This is only done if the test is not unattended. + * Previously, this was not required, because the code path for unattended tests + * did not call this method. However, now that we are using the same code path as of https://github.com/ooni/probe-android/pull/572, + * This is now required to ensure the manual tests follow the preference set by the user, + * while the unattended tests doesn't. + */ + if (currentTest.getMax_runtime() == null && !unattended) { + currentTest.setMax_runtime(app.getPreferenceManager().getMaxRuntime()); + } publishProgress(URL); } catch (Exception e) { e.printStackTrace();