From ff98f239a5821c3361ad33d5b5094dde959ad6e3 Mon Sep 17 00:00:00 2001 From: Vincent Karuri Date: Wed, 21 Oct 2020 13:58:18 +0300 Subject: [PATCH] Only set rdt config if it was passed in intent --- .../rdt_reader/activities/ImageQualityActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/src/main/java/edu/washington/cs/ubicomplab/rdt_reader/activities/ImageQualityActivity.java b/lib/src/main/java/edu/washington/cs/ubicomplab/rdt_reader/activities/ImageQualityActivity.java index 6646b1eb..9d25c71b 100644 --- a/lib/src/main/java/edu/washington/cs/ubicomplab/rdt_reader/activities/ImageQualityActivity.java +++ b/lib/src/main/java/edu/washington/cs/ubicomplab/rdt_reader/activities/ImageQualityActivity.java @@ -50,7 +50,10 @@ protected void onCreate(Bundle savedInstanceState) { try { // Extract config json obj - mImageQualityView.setRdtJsonConfig(new JSONObject(b.getString(RDT_JSON_CONFIG))); + String rdtConfig = b.getString(RDT_JSON_CONFIG, null); + if (rdtConfig != null) { + mImageQualityView.setRdtJsonConfig(new JSONObject(rdtConfig)); + } } catch (JSONException e) { e.printStackTrace(); }