Skip to content

Commit

Permalink
Update ReferringUrlUtility.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
nsingh-branch committed Oct 3, 2023
1 parent 74b64dc commit 8e69922
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class ReferringUrlUtility (prefHelper: PrefHelper) {
if (gclid != null) {
if (gclid.value != null && gclid.value != PrefHelper.NO_STRING_VALUE) {

// If gclid is still within validity window, process.
// If gclid is still within validity window, proceed.
val currentTime = Date().time
val gclidTimestamp = gclid.timestamp?.time
val gclidValidityWindowMillis = gclid.validityWindow * 1000L
Expand Down Expand Up @@ -155,11 +155,11 @@ class ReferringUrlUtility (prefHelper: PrefHelper) {
val param = BranchUrlQueryParameter()
param.name = temp.getString("name")

if (!temp.isNull("value")) {
if (temp.has("value")) {
param.value = temp.getString("value")
}

if (!temp.isNull("timestamp")) {
if (temp.has("timestamp")) {
try {
val timestampStr = temp.getString("timestamp")
param.timestamp = dateFormat.parse(timestampStr)
Expand All @@ -168,11 +168,11 @@ class ReferringUrlUtility (prefHelper: PrefHelper) {
}
}

if (!temp.isNull("validityWindow")) {
if (temp.has("validityWindow")) {
param.validityWindow = temp.getLong("validityWindow")
}

if (!temp.isNull("isDeeplink")) {
if (temp.has("isDeeplink")) {
param.isDeepLink = temp.getBoolean("isDeeplink")
} else {
param.isDeepLink = false
Expand Down

0 comments on commit 8e69922

Please sign in to comment.