From 9ddbcf79c8ea3cb3e84645b255a0ad8979ef5f63 Mon Sep 17 00:00:00 2001 From: seamlink-aalves <49952868+seamlink-aalves@users.noreply.github.com> Date: Fri, 29 Sep 2023 01:53:31 +0100 Subject: [PATCH] fix: deprecated warning Html.fromHtml (#230) Co-authored-by: Alexandre Alves --- src/android/com/adobe/phonegap/push/FCMService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/android/com/adobe/phonegap/push/FCMService.kt b/src/android/com/adobe/phonegap/push/FCMService.kt index f5b0805d1..890283206 100644 --- a/src/android/com/adobe/phonegap/push/FCMService.kt +++ b/src/android/com/adobe/phonegap/push/FCMService.kt @@ -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 @@ -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 {