mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2024-11-28 18:15:37 -05:00
only call setAnalyticsPref with a valid key, value pair
This commit is contained in:
parent
dcd4222b4c
commit
685389bfbd
1 changed files with 2 additions and 1 deletions
|
@ -642,10 +642,11 @@ public class JavaScriptDirectInterface {
|
|||
JSONArray jsonArray = jsonObject.names();
|
||||
String key = jsonArray.getString(0);
|
||||
String value = jsonObject.getString(key);
|
||||
_activity.setAnalyticsPref(key, value);
|
||||
} catch (JSONException e) {
|
||||
Log.e(LOG_TAG, "JSON error: " + e.getMessage(), e);
|
||||
return;
|
||||
}
|
||||
_activity.setAnalyticsPref(key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue