Small cleanup

This commit is contained in:
Benoit Marty 2022-06-01 16:45:02 +02:00 committed by Benoit Marty
parent 4018113c88
commit fb8408c3da

@ -246,9 +246,8 @@ class UnifiedPushHelper @Inject constructor(
} }
fun getExternalDistributors(): List<String> { fun getExternalDistributors(): List<String> {
val distributors = up.getDistributors(context).toMutableList() return up.getDistributors(context)
distributors.remove(context.packageName) .filterNot { it == context.packageName }
return distributors
} }
fun getCurrentDistributorName(): String { fun getCurrentDistributorName(): String {
@ -268,13 +267,11 @@ class UnifiedPushHelper @Inject constructor(
} }
fun isEmbeddedDistributor(): Boolean { fun isEmbeddedDistributor(): Boolean {
return (up.getDistributor(context) == context.packageName && return up.getDistributor(context) == context.packageName && FcmHelper.isPushSupported()
FcmHelper.isPushSupported())
} }
fun isBackgroundSync(): Boolean { fun isBackgroundSync(): Boolean {
return (up.getDistributor(context) == context.packageName && return up.getDistributor(context) == context.packageName && !FcmHelper.isPushSupported()
!FcmHelper.isPushSupported())
} }
fun getPrivacyFriendlyUpEndpoint(): String? { fun getPrivacyFriendlyUpEndpoint(): String? {