Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
raju-opti committed Oct 31, 2024
1 parent 19bf86f commit 701136b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import android.content.Context
import android.content.SharedPreferences
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation
import com.optimizely.ab.android.shared.OptlyStorage
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ class VuidManager private constructor() {
private var INSTANCE: VuidManager? = null

@Synchronized
fun getInstance(): VuidManager = INSTANCE ?:
VuidManager().also { INSTANCE = it }
fun getInstance(): VuidManager = INSTANCE ?: VuidManager().also { INSTANCE = it }

fun isVuid(visitorId: String): Boolean {
return visitorId.startsWith("vuid_", ignoreCase = true)
Expand All @@ -44,7 +43,7 @@ class VuidManager private constructor() {
@Synchronized
fun configure(enableVuid: Boolean, context: Context) {
if (!enableVuid) {
removeVuid(context);
removeVuid(context)
} else {
this.vuid = load(context)
}
Expand Down Expand Up @@ -80,6 +79,6 @@ class VuidManager private constructor() {

fun removeVuid(context: Context) {
val storage = OptlyStorage(context)
storage.remove(keyForVuid);
storage.remove(keyForVuid)
}
}

0 comments on commit 701136b

Please sign in to comment.