aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationActivity.java3
-rw-r--r--src/main/java/de/pixart/messenger/ui/EditAccountActivity.java2
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/Patches.java3
-rw-r--r--src/open/java/de/pixart/messenger/services/PushManagementService.java4
-rw-r--r--src/standard/java/de/pixart/messenger/services/PushManagementService.java4
-rw-r--r--src/standardPush/java/de/pixart/messenger/services/MaintenanceReceiver.java2
-rw-r--r--src/standardPush/java/de/pixart/messenger/services/PushManagementService.java4
7 files changed, 3 insertions, 19 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
index 2360e2e67..2e20b6bc4 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
@@ -1738,8 +1738,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/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
index 14fde6fef..49e3ac086 100644
--- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
@@ -894,7 +894,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/de/pixart/messenger/xmpp/Patches.java b/src/main/java/de/pixart/messenger/xmpp/Patches.java
index 85b32e3d5..52eb114f2 100644
--- a/src/main/java/de/pixart/messenger/xmpp/Patches.java
+++ b/src/main/java/de/pixart/messenger/xmpp/Patches.java
@@ -7,9 +7,6 @@ public class Patches {
public static final List<String> DISCO_EXCEPTIONS = Arrays.asList(
"nimbuzz.com"
);
- public static final List<XmppConnection.Identity> SUFFICIENT_PUSH = Arrays.asList(
- XmppConnection.Identity.EJABBERD
- );
public static final List<XmppConnection.Identity> BAD_MUC_REFLECTION = Arrays.asList(
XmppConnection.Identity.SLACK
);
diff --git a/src/open/java/de/pixart/messenger/services/PushManagementService.java b/src/open/java/de/pixart/messenger/services/PushManagementService.java
index ca5ba6431..b76f5b4de 100644
--- a/src/open/java/de/pixart/messenger/services/PushManagementService.java
+++ b/src/open/java/de/pixart/messenger/services/PushManagementService.java
@@ -21,8 +21,4 @@ public class PushManagementService {
public boolean isStub() {
return true;
}
-
- public boolean availableAndUseful(Account account) {
- return false;
- }
}
diff --git a/src/standard/java/de/pixart/messenger/services/PushManagementService.java b/src/standard/java/de/pixart/messenger/services/PushManagementService.java
index ca5ba6431..b76f5b4de 100644
--- a/src/standard/java/de/pixart/messenger/services/PushManagementService.java
+++ b/src/standard/java/de/pixart/messenger/services/PushManagementService.java
@@ -21,8 +21,4 @@ public class PushManagementService {
public boolean isStub() {
return true;
}
-
- public boolean availableAndUseful(Account account) {
- return false;
- }
}
diff --git a/src/standardPush/java/de/pixart/messenger/services/MaintenanceReceiver.java b/src/standardPush/java/de/pixart/messenger/services/MaintenanceReceiver.java
index 5cfcbe920..6625a0f99 100644
--- a/src/standardPush/java/de/pixart/messenger/services/MaintenanceReceiver.java
+++ b/src/standardPush/java/de/pixart/messenger/services/MaintenanceReceiver.java
@@ -9,7 +9,7 @@ import com.google.android.gms.iid.InstanceID;
import java.io.IOException;
-import eu.siacs.conversations.Config;
+import de.pixart.messenger.Config;
public class MaintenanceReceiver extends BroadcastReceiver {
@Override
diff --git a/src/standardPush/java/de/pixart/messenger/services/PushManagementService.java b/src/standardPush/java/de/pixart/messenger/services/PushManagementService.java
index f30bfae46..c9c252501 100644
--- a/src/standardPush/java/de/pixart/messenger/services/PushManagementService.java
+++ b/src/standardPush/java/de/pixart/messenger/services/PushManagementService.java
@@ -105,10 +105,6 @@ public class PushManagementService {
return connection != null && connection.getFeatures().sm() && connection.getFeatures().push() && 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;
}