Skip to content

Commit

Permalink
fix: deprecated warning Html.fromHtml (#230)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexandre Alves <aalves@seamlink.com>
  • Loading branch information
seamlink-aalves and Alexandre Alves committed Sep 29, 2023
1 parent 6026fc0 commit 9ddbcf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/android/com/adobe/phonegap/push/FCMService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import android.net.Uri
import android.os.Build
import android.os.Bundle
import android.provider.Settings
import android.text.Html
import android.text.Spanned
import android.util.Log
import androidx.core.app.NotificationCompat
import androidx.core.app.RemoteInput
import androidx.core.text.HtmlCompat
import com.adobe.phonegap.push.PushPlugin.Companion.isActive
import com.adobe.phonegap.push.PushPlugin.Companion.isInForeground
import com.adobe.phonegap.push.PushPlugin.Companion.sendExtras
Expand Down Expand Up @@ -1187,7 +1187,7 @@ class FCMService : FirebaseMessagingService() {
}

private fun fromHtml(source: String?): Spanned? {
return if (source != null) Html.fromHtml(source) else null
return if (source != null) HtmlCompat.fromHtml(source, HtmlCompat.FROM_HTML_MODE_LEGACY) else null
}

private fun isAvailableSender(from: String?): Boolean {
Expand Down

0 comments on commit 9ddbcf7

Please sign in to comment.