Skip to content

Commit 03d08fd

Browse files
committed
a few minor clean ups
1 parent 6ed4104 commit 03d08fd

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

app/src/main/java/openscience/crowdsource/video/experiments/MainActivity.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ public void onClick(DialogInterface dialog, int id) {
440440
final AlertDialog clarifyDialog = clarifyDialogBuilder.create();
441441

442442
clarifyDialog.setTitle("");
443-
clarifyDialog.setMessage(Html.fromHtml("Please enter your email (OPTIONAL) <br>if you would like to acknowledge your contributions <br>(will be publicly visible):"));
443+
clarifyDialog.setMessage(Html.fromHtml("(OPTIONAL) Please enter your email if you would like to acknowledge your contributions (will be publicly visible):"));
444444

445445
SpannableString spanString = new SpannableString(email.trim());
446446
spanString.setSpan(new UnderlineSpan(), 0, spanString.length(), 0);
@@ -661,7 +661,7 @@ public void onClick(View arg0) {
661661

662662
buttonUpdateExit.setEnabled(false);
663663

664-
log.append(s_line);
664+
log.append("\n");
665665
log.append(s_thanks);
666666
log.append("Interrupting crowd-tuning and quitting program ...");
667667

@@ -1266,7 +1266,7 @@ protected String doInBackground(String... arg0) {
12661266
// }
12671267
// });
12681268

1269-
publishProgress(s_line);
1269+
publishProgress("\n"); //s_line);
12701270
publishProgress("Local tmp directory: " + path + "\n");
12711271
publishProgress("User ID: " + email + "\n");
12721272

@@ -2146,7 +2146,7 @@ protected String doInBackground(String... arg0) {
21462146
public void publish(int percent) {
21472147
String str="";
21482148

2149-
if (percent<0) str+="\nDownloading file " + targetFilePath + " ...\n";
2149+
if (percent<0) str+="\n * Downloading file " + targetFilePath + " ...\n";
21502150
else str+=" * "+percent+"%\n";
21512151

21522152
publishProgress(str);
@@ -2178,7 +2178,7 @@ public void println(String text) {
21782178
copy_bin_file(targetFilePath, targetAppFilePath);
21792179
finalTargetFileDir = fileAppDir;
21802180
finalTargetFilePath = targetAppFilePath;
2181-
publishProgress("\nFile " + targetFilePath + " sucessfully copied to " + targetAppFilePath + "\n\n");
2181+
publishProgress("\n * File " + targetFilePath + " sucessfully copied to " + targetAppFilePath + "\n\n");
21822182
} catch (IOException e) {
21832183
e.printStackTrace();
21842184
publishProgress("\nError copying file " + targetFilePath + " to " + targetAppFilePath + " ...\n\n");
@@ -2203,9 +2203,9 @@ public void println(String text) {
22032203
}
22042204
String[] chmodResult = openme.openme_run_program(chmod744 + " " + finalTargetFilePath, null, finalTargetFileDir);
22052205
if (chmodResult[0].isEmpty() && chmodResult[1].isEmpty() && chmodResult[2].isEmpty()) {
2206-
publishProgress("\nFile " + finalTargetFilePath + " sucessfully set as executable ...\n");
2206+
publishProgress(" * File " + finalTargetFilePath + " sucessfully set as executable ...\n");
22072207
} else {
2208-
publishProgress("\nError seting file " + targetFilePath + " as executable ...\n\n");
2208+
publishProgress("\nError setting file " + targetFilePath + " as executable ...\n\n");
22092209
return null;
22102210
}
22112211
}
@@ -2275,8 +2275,8 @@ public void run() {
22752275
return null;
22762276
} else {
22772277
publishProgress("\nProcessing image path: " + imageInfo.getPath() + "\n");
2278-
publishProgress("\nProcessing image height: " + imageInfo.getHeight() + "\n");
2279-
publishProgress("\nProcessing image width: " + imageInfo.getWidth() + "\n");
2278+
publishProgress("\nDetecting image height: " + imageInfo.getHeight() + "\n");
2279+
publishProgress("Detecting image width: " + imageInfo.getWidth() + "\n");
22802280
runOnUiThread(new Runnable() {
22812281
@Override
22822282
public void run() {
@@ -2285,7 +2285,7 @@ public void run() {
22852285
});
22862286
}
22872287

2288-
publishProgress("\nSelected scenario: " + title + "\n");
2288+
publishProgress("\nSelected scenario: " + title + "\n\n");
22892289

22902290
//In the future we may read json output and aggregate it too (openMe)
22912291
int iterationNum = 3; // todo it could be taken from loaded scenario
@@ -2294,9 +2294,9 @@ public void run() {
22942294
String recognitionResultText = null;
22952295
for (int it = 0; it <= iterationNum; it ++) {
22962296
if (it == 0) {
2297-
publishProgress("\nRecognition started (mobile warms up) ...\n\n");
2297+
publishProgress("Recognition in process (mobile warms up) ...\n");
22982298
} else {
2299-
publishProgress("\nRecognition started (statistical repetition: " + it + " out of " + iterationNum + ")...\n\n");
2299+
publishProgress("Recognition in process (statistical repetition: " + it + " out of " + iterationNum + ") ...\n");
23002300
}
23012301
long startTime = System.currentTimeMillis();
23022302
String[] recognitionResult = openme.openme_run_program(scenarioCmd, scenarioEnv, executablePath); //todo fix ck response cmd value: add appropriate path to executable from according to path value at "file" json
@@ -2314,15 +2314,15 @@ public void run() {
23142314
}
23152315
if (it == 0) {
23162316
// first iteration used for mobile warms up if it was in a low freq state
2317-
publishProgress("\nRecognition time (warms up) " + processingTime + " ms \n");
2318-
publishProgress("\nRecognition result (warms up):\n " + recognitionResultText + "\n\n");
2317+
publishProgress(" * Recognition time (warming up) " + processingTime + " ms \n");
2318+
publishProgress("\nRecognition result (warming up):\n " + recognitionResultText + "\n\n");
23192319
continue;
23202320
}
2321-
publishProgress("\nRecognition time " + it + ": " + processingTime + " ms \n");
2321+
publishProgress(" * Recognition time " + it + ": " + processingTime + " ms \n");
23222322
cpuFreqs.add(get_cpu_freqs());
23232323
processingTimes.add(processingTime);
23242324
}
2325-
publishProgress("\nRecognition result:\n " + recognitionResultText + "\n\n");
2325+
publishProgress("\nRecognition result:\n\n" + recognitionResultText + "\n\n");
23262326

23272327
publishProgress("Submitting results and unexpected behavior (if any) to Collective Knowledge Aggregator ...\n");
23282328

@@ -2441,7 +2441,7 @@ public void run() {
24412441
private String getCurl() {
24422442
/*********** Obtaining CK server **************/
24432443
if (curlCached == null) {
2444-
publishProgress(s_line);
2444+
publishProgress("\n"); //s_line);
24452445
publishProgress("Obtaining list of public Collective Knowledge servers from " + url_cserver + " ...\n");
24462446
curlCached = get_shared_computing_resource(url_cserver);
24472447
}

0 commit comments

Comments
 (0)