mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-29 21:27:40 +00:00
Don't complain about our own packet types
This commit is contained in:
parent
a1dd4fe2cc
commit
e9e93423f1
@ -643,7 +643,7 @@ public class Device implements BaseLink.PackageReceiver {
|
||||
|
||||
hackToMakeRetrocompatiblePacketTypes(np);
|
||||
|
||||
if (protocolVersion >= 6 && !supportedOutgoingInterfaces.contains(np.getType())) {
|
||||
if (protocolVersion >= 6 && !supportedOutgoingInterfaces.contains(np.getType()) && !NetworkPackage.protocolPackageTypes.contains(np.getType())) {
|
||||
Log.e("Device/sendPackage", "Plugin tried to send an unsupported package: " + np.getType());
|
||||
Log.e("Device/sendPackage", "Supported package types: " + Arrays.toString(supportedOutgoingInterfaces.toArray()));
|
||||
}
|
||||
|
@ -33,6 +33,8 @@ import org.kde.kdeconnect.Helpers.DeviceHelper;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class NetworkPackage {
|
||||
|
||||
@ -41,7 +43,14 @@ public class NetworkPackage {
|
||||
public final static String PACKAGE_TYPE_IDENTITY = "kdeconnect.identity";
|
||||
public final static String PACKAGE_TYPE_PAIR = "kdeconnect.pair";
|
||||
public final static String PACKAGE_TYPE_ENCRYPTED = "kdeconnect.encrypted";
|
||||
public static final String PACKAGE_TYPE_CAPABILITIES = "kdeconnect.capabilities";
|
||||
public final static String PACKAGE_TYPE_CAPABILITIES = "kdeconnect.capabilities";
|
||||
|
||||
public static Set<String> protocolPackageTypes = new HashSet<String>() {{
|
||||
add(PACKAGE_TYPE_IDENTITY);
|
||||
add(PACKAGE_TYPE_PAIR);
|
||||
add(PACKAGE_TYPE_ENCRYPTED);
|
||||
add(PACKAGE_TYPE_CAPABILITIES);
|
||||
}};
|
||||
|
||||
private long mId;
|
||||
String mType;
|
||||
|
Loading…
x
Reference in New Issue
Block a user