Skip to content

Commit c5c7283

Browse files
fix: Include missing overridesSubdirectory flag in networkOptions for domain mapping
1 parent e583057 commit c5c7283

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

android-core/src/main/java/com/mparticle/networking/DomainMapping.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ JSONObject toJson() {
226226
return new JSONObject()
227227
.put("mType", mType.value)
228228
.put("url", mUrl)
229+
.put("overridesSubdirectory",overridesSubdirectory)
229230
.put("mCertificates", certificatesJson);
230231
} catch (JSONException jse) {
231232
Logger.error(jse);
@@ -325,7 +326,8 @@ private static Builder withJson(String jsonString) {
325326
JSONObject jsonObject = new JSONObject(jsonString);
326327
int type = jsonObject.getInt("mType");
327328
String newUrl = jsonObject.getString("url");
328-
Builder builder = new Builder(Endpoint.parseInt(type), newUrl);
329+
boolean overridesSubdirectory = jsonObject.getBoolean("overridesSubdirectory");
330+
Builder builder = new Builder(Endpoint.parseInt(type), newUrl, overridesSubdirectory);
329331
JSONArray certificatesJsonArray = jsonObject.getJSONArray("mCertificates");
330332
for (int i = 0; i < certificatesJsonArray.length(); i++) {
331333
builder.addCertificate(Certificate.withCertificate(certificatesJsonArray.getJSONObject(i)));

0 commit comments

Comments
 (0)