From bc9da1fbf4d1a87a17e552858f49fff1b9b51310 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 12 Nov 2017 19:22:39 +0100 Subject: [PATCH] remove prosody push from blacklist --- .../java/eu/siacs/conversations/ui/ConversationActivity.java | 3 +-- .../java/eu/siacs/conversations/ui/EditAccountActivity.java | 2 +- src/main/java/eu/siacs/conversations/xmpp/Patches.java | 3 --- .../siacs/conversations/services/PushManagementService.java | 4 ---- 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java index 2f17b228a..941e40e18 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -1553,8 +1553,7 @@ public class ConversationActivity extends XmppActivity private boolean hasAccountWithoutPush() { for(Account account : xmppConnectionService.getAccounts()) { - if (account.getStatus() != Account.State.DISABLED - && !xmppConnectionService.getPushManagementService().availableAndUseful(account)) { + if (account.getStatus() != Account.State.DISABLED && !xmppConnectionService.getPushManagementService().available(account)) { return true; } } diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java index 16f01b398..019f51f7f 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -861,7 +861,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat if (this.mAccount.isOnlineAndConnected() && !this.mFetchingAvatar) { Features features = this.mAccount.getXmppConnection().getFeatures(); this.mStats.setVisibility(View.VISIBLE); - boolean showBatteryWarning = !xmppConnectionService.getPushManagementService().availableAndUseful(mAccount) && isOptimizingBattery(); + boolean showBatteryWarning = !xmppConnectionService.getPushManagementService().available(mAccount) && isOptimizingBattery(); boolean showDataSaverWarning = isAffectedByDataSaver(); showOsOptimizationWarning(showBatteryWarning,showDataSaverWarning); this.mSessionEst.setText(UIHelper.readableTimeDifferenceFull(this, this.mAccount.getXmppConnection() diff --git a/src/main/java/eu/siacs/conversations/xmpp/Patches.java b/src/main/java/eu/siacs/conversations/xmpp/Patches.java index 8eb91f158..a5b35e811 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/Patches.java +++ b/src/main/java/eu/siacs/conversations/xmpp/Patches.java @@ -8,9 +8,6 @@ public class Patches { public static final List DISCO_EXCEPTIONS = Arrays.asList( "nimbuzz.com" ); - public static final List SUFFICIENT_PUSH = Arrays.asList( - XmppConnection.Identity.EJABBERD - ); public static final List BAD_MUC_REFLECTION = Arrays.asList( XmppConnection.Identity.SLACK ); diff --git a/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java b/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java index 62032f683..2f6a569b3 100644 --- a/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java +++ b/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java @@ -110,10 +110,6 @@ public class PushManagementService { && playServicesAvailable(); } - public boolean availableAndUseful(Account account) { - return Patches.SUFFICIENT_PUSH.contains(account.getServerIdentity()) && available(account); - } - private boolean playServicesAvailable() { return GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(mXmppConnectionService) == ConnectionResult.SUCCESS; }