Fix FCM error always showing, even when it works

Change-Id: Ic9ed2bf74c252ee8b923f996642285681f504420
This commit is contained in:
SpiritCroc 2021-09-30 08:51:48 +02:00
parent f167a00921
commit a7f41e88f3
1 changed files with 3 additions and 0 deletions

View File

@ -217,6 +217,9 @@ object UPHelper {
fun getPrivacyFriendlyUpEndpoint(context: Context): String? {
val endpoint = getUpEndpoint(context)
if (endpoint.isNullOrEmpty()) return endpoint
if (isEmbeddedDistributor(context)) {
return endpoint
}
return try {
val parsed = URL(endpoint)
"${parsed.protocol}://${parsed.host}"