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);
|
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", "Plugin tried to send an unsupported package: " + np.getType());
|
||||||
Log.e("Device/sendPackage", "Supported package types: " + Arrays.toString(supportedOutgoingInterfaces.toArray()));
|
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.ByteArrayInputStream;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
public class NetworkPackage {
|
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_IDENTITY = "kdeconnect.identity";
|
||||||
public final static String PACKAGE_TYPE_PAIR = "kdeconnect.pair";
|
public final static String PACKAGE_TYPE_PAIR = "kdeconnect.pair";
|
||||||
public final static String PACKAGE_TYPE_ENCRYPTED = "kdeconnect.encrypted";
|
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;
|
private long mId;
|
||||||
String mType;
|
String mType;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user