Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
megamegax committed Oct 10, 2024
2 parents 2284625 + c29dcc0 commit e7d45e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class EmarsysEncryptedSharedPreferencesV3(
private val editor: SharedPreferences.Editor = realPreferences.edit()

override fun putString(key: String, value: String?): SharedPreferences.Editor {
editor.putString(key, encryptString(value ?: ""))
editor.putString(key, encryptString(value))
return this
}

Expand Down Expand Up @@ -143,7 +143,8 @@ class EmarsysEncryptedSharedPreferencesV3(
editor
}

private fun encryptString(value: String): String {
private fun encryptString(value: String?): String? {
value ?: return null
return sharedPreferenceCrypto.encrypt(value, secretKey)
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/com/emarsys/core/util/log/Logger.kt
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class Logger(

private fun shouldLogBasedOnRemoteConfig(logLevel: LogLevel): Boolean {
val savedLogLevel: LogLevel =
if (logLevelStorage.get() == null) ERROR else valueOf(logLevelStorage.get()!!)
if (logLevelStorage.get().isNullOrBlank()) ERROR else valueOf(logLevelStorage.get()!!)

return logLevel.priority >= savedLogLevel.priority
}
Expand Down

0 comments on commit e7d45e7

Please sign in to comment.