Skip to content

Commit b7235b8

Browse files
author
Daniil Efremov
authored
Merge pull request #60 from dividiti/issue-54
GPU is not detected in the new version #54
2 parents d0d3ffc + a0b94e2 commit b7235b8

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -579,20 +579,20 @@ public void setGpuVendor(String gpuVendor) {
579579
public JSONObject toJSONObject() {
580580
JSONObject jsonObject = new JSONObject();
581581
try {
582-
jsonObject.put(EMAIL, getEmail());
583-
jsonObject.put(ACTUAL_IMAGE_PATH, getActualImagePath());
584-
jsonObject.put(REMOTE_SERVER_URL, getRemoteServerURL());
585-
jsonObject.put(RECOGNITION_RESULT_TEXT, getRecognitionResultText());
586-
jsonObject.put(DATA_UID, getDataUID());
587-
jsonObject.put(BEHAVIOR_UID, getBehaviorUID());
588-
jsonObject.put(CROWD_ID, getCrowdUID());
589-
jsonObject.put(SELECTED_RECOGNITION_SCENARIO, getSelectedRecognitionScenario());
590-
jsonObject.put(STATE_PARAM, getState() == null? null : getState().name());
591-
jsonObject.put(LOCAL_APP_PATH, getLocalAppPath());
592-
jsonObject.put(PREVIEW_RECOGNITION_TEXT, getPreviewRecognitionText());
593-
jsonObject.put(RESULT_URL, getResultURL());
594-
jsonObject.put(GPU, getGPU());
595-
jsonObject.put(GPU_VENDOR, getGpuVendor());
582+
jsonObject.put(EMAIL, this.getEmail());
583+
jsonObject.put(ACTUAL_IMAGE_PATH, this.getActualImagePath());
584+
jsonObject.put(REMOTE_SERVER_URL, this.getRemoteServerURL());
585+
jsonObject.put(RECOGNITION_RESULT_TEXT, this.getRecognitionResultText());
586+
jsonObject.put(DATA_UID, this.getDataUID());
587+
jsonObject.put(BEHAVIOR_UID, this.getBehaviorUID());
588+
jsonObject.put(CROWD_ID, this.getCrowdUID());
589+
jsonObject.put(SELECTED_RECOGNITION_SCENARIO, this.getSelectedRecognitionScenario());
590+
jsonObject.put(STATE_PARAM, this.getState() == null? null : this.getState().name());
591+
jsonObject.put(LOCAL_APP_PATH, this.getLocalAppPath());
592+
jsonObject.put(PREVIEW_RECOGNITION_TEXT, this.getPreviewRecognitionText());
593+
jsonObject.put(RESULT_URL, this.getResultURL());
594+
jsonObject.put(GPU, this.getGpu());
595+
jsonObject.put(GPU_VENDOR, this.getGpuVendor());
596596

597597
} catch (JSONException e) {
598598
AppLogger.logMessage("ERROR could not serialize app config to json format");

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import android.provider.MediaStore;
3535
import android.text.Html;
3636
import android.view.View;
37+
import android.view.ViewGroup;
3738
import android.view.Window;
3839
import android.view.WindowManager;
3940
import android.widget.Button;
@@ -365,7 +366,7 @@ public void run() {
365366

366367
this.glSurfaceView = new GLSurfaceView(this);
367368
this.glSurfaceView.setRenderer(this);
368-
369+
((ViewGroup) imageView.getParent()).addView(this.glSurfaceView);
369370

370371
initAppConfig(this);
371372

0 commit comments

Comments
 (0)