1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-26 08:12:05 +01:00

Make ProviderManager handle StreamFeatureProvider(s)

when a new ProviderLoader is added. This was previously missing.
This commit is contained in:
Florian Schmaus 2014-10-20 23:05:10 +02:00
parent 5ad4e85ed5
commit b348ebfd6d

View file

@ -123,6 +123,7 @@ public final class ProviderManager {
SmackConfiguration.getVersion(); SmackConfiguration.getVersion();
} }
@SuppressWarnings("unchecked")
public static void addLoader(ProviderLoader loader) { public static void addLoader(ProviderLoader loader) {
if (loader.getIQProviderInfo() != null) { if (loader.getIQProviderInfo() != null) {
for (IQProviderInfo info : loader.getIQProviderInfo()) { for (IQProviderInfo info : loader.getIQProviderInfo()) {
@ -135,6 +136,13 @@ public final class ProviderManager {
addExtensionProvider(info.getElementName(), info.getNamespace(), info.getProvider()); addExtensionProvider(info.getElementName(), info.getNamespace(), info.getProvider());
} }
} }
if (loader.getStreamFeatureProviderInfo() != null) {
for (StreamFeatureProviderInfo info : loader.getStreamFeatureProviderInfo()) {
addStreamFeatureProvider(info.getElementName(), info.getNamespace(),
(PacketExtensionProvider<PacketExtension>) info.getProvider());
}
}
} }
/** /**