Skip to content

Commit de4703e

Browse files
Update Branch-SDK/src/main/java/io/branch/referral/BranchConfigurationController.kt
Co-authored-by: matter-code-review[bot] <150888575+matter-code-review[bot]@users.noreply.github.com>
1 parent cf05cc0 commit de4703e

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Branch-SDK/src/main/java/io/branch/referral/BranchConfigurationController.kt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,16 @@ class BranchConfigurationController {
9595
* @return JSONObject containing the current configuration state
9696
*/
9797
fun serializeConfiguration(): JSONObject {
98-
return JSONObject().apply {
99-
put("expectDelayedSessionInitialization", getDelayedSessionInitUsed())
100-
put("testMode", isTestModeEnabled())
101-
put("trackingDisabled", isTrackingDisabled())
102-
put("instantDeepLinkingEnabled", isInstantDeepLinkingEnabled())
98+
return try {
99+
JSONObject().apply {
100+
put(\"expectDelayedSessionInitialization\", getDelayedSessionInitUsed())
101+
put(\"testMode\", isTestModeEnabled())
102+
put(\"trackingDisabled\", isTrackingDisabled())
103+
put(\"instantDeepLinkingEnabled\", isInstantDeepLinkingEnabled())
104+
}
105+
} catch (e: Exception) {
106+
BranchLogger.w(\"Error serializing configuration: ${e.message}\")
107+
JSONObject()
103108
}
104109
}
105110
}

0 commit comments

Comments
 (0)