1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 09:09:38 +02:00

Merge branch '4.2'

This commit is contained in:
Florian Schmaus 2017-10-14 14:56:36 +02:00
commit 384c285fbc
20 changed files with 303 additions and 79 deletions

View file

@ -87,13 +87,32 @@ public final class PushNotificationsManager extends Manager {
* @throws XMPPErrorException
* @throws NotConnectedException
* @throws InterruptedException
* @deprecated Use {@link #isSupported()} instead.
*/
@Deprecated
// TODO: Remove in Smack 4.3
public boolean isSupportedByServer()
throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
return ServiceDiscoveryManager.getInstanceFor(connection())
.serverSupportsFeature(PushNotificationsElements.NAMESPACE);
}
/**
* Returns true if Push Notifications are supported by this account.
*
* @return true if Push Notifications are supported by this account.
* @throws NoResponseException
* @throws XMPPErrorException
* @throws NotConnectedException
* @throws InterruptedException
* @since 4.2.2
*/
public boolean isSupported()
throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
return ServiceDiscoveryManager.getInstanceFor(connection()).accountSupportsFeatures(
PushNotificationsElements.NAMESPACE);
}
/**
* Enable push notifications.
*