aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/free/java/eu/siacs/conversations/services/PushManagementService.java4
-rw-r--r--src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java4
-rw-r--r--src/playstore/java/eu/siacs/conversations/services/PushManagementService.java8
3 files changed, 12 insertions, 4 deletions
diff --git a/src/free/java/eu/siacs/conversations/services/PushManagementService.java b/src/free/java/eu/siacs/conversations/services/PushManagementService.java
index ff97a5fb..c6c5d232 100644
--- a/src/free/java/eu/siacs/conversations/services/PushManagementService.java
+++ b/src/free/java/eu/siacs/conversations/services/PushManagementService.java
@@ -17,4 +17,8 @@ public class PushManagementService {
public boolean available(Account account) {
return false;
}
+
+ public boolean isStub() {
+ 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 9b6e4076..2656966b 100644
--- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
@@ -686,9 +686,9 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
this.mServerInfoHttpUpload.setText(R.string.server_info_unavailable);
}
- this.mPushRow.setVisibility(xmppConnectionService.getPushManagementService().available(mAccount) ? View.VISIBLE : View.GONE);
+ this.mPushRow.setVisibility(xmppConnectionService.getPushManagementService().isStub() ? View.GONE : View.VISIBLE);
- if (features.push()) {
+ if (xmppConnectionService.getPushManagementService().available(mAccount)) {
this.mServerInfoPush.setText(R.string.server_info_available);
} else {
this.mServerInfoPush.setText(R.string.server_info_unavailable);
diff --git a/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java b/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java
index fbd768cf..3fdaf832 100644
--- a/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java
+++ b/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java
@@ -76,9 +76,9 @@ public class PushManagementService {
@Override
public void onIqPacketReceived(Account account, IqPacket packet) {
if (packet.getType() == IqPacket.TYPE.RESULT) {
- Log.d(Config.LOGTAG,account.getJid().toBareJid()+": successfully enabled push on server");
+ Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": successfully enabled push on server");
} else if (packet.getType() == IqPacket.TYPE.ERROR) {
- Log.d(Config.LOGTAG,account.getJid().toBareJid()+": enabling push on server failed");
+ Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": enabling push on server failed");
}
}
});
@@ -109,6 +109,10 @@ public class PushManagementService {
return GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(mXmppConnectionService) == ConnectionResult.SUCCESS;
}
+ public boolean isStub() {
+ return false;
+ }
+
interface OnGcmInstanceTokenRetrieved {
void onGcmInstanceTokenRetrieved(String token);
}