mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 22:25:08 +00:00
Reintroduced hack as we broke compatibility with devices using version 0.9
And bumped version to release
This commit is contained in:
@@ -518,6 +518,8 @@ public class Device implements BaseLink.PackageReceiver {
|
||||
@Override
|
||||
public void onPackageReceived(NetworkPackage np) {
|
||||
|
||||
hackToMakeRetrocompatiblePacketTypes(np);
|
||||
|
||||
if (NetworkPackage.PACKAGE_TYPE_PAIR.equals(np.getType())) {
|
||||
|
||||
Log.i("KDE/Device", "Pair package");
|
||||
@@ -612,6 +614,9 @@ public class Device implements BaseLink.PackageReceiver {
|
||||
//Async
|
||||
public void sendPackage(final NetworkPackage np, final SendPackageStatusCallback callback) {
|
||||
|
||||
hackToMakeRetrocompatiblePacketTypes(np);
|
||||
|
||||
|
||||
/*
|
||||
if (!m_outgoingCapabilities.contains(np.getType()) && !NetworkPackage.protocolPackageTypes.contains(np.getType())) {
|
||||
Log.e("Device/sendPackage", "Plugin tried to send an undeclared package: " + np.getType());
|
||||
@@ -831,4 +836,10 @@ public class Device implements BaseLink.PackageReceiver {
|
||||
return m_supportedPlugins;
|
||||
}
|
||||
|
||||
public void hackToMakeRetrocompatiblePacketTypes(NetworkPackage np) {
|
||||
if (protocolVersion >= 6) return;
|
||||
np.mType = np.getType().replace(".request","");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user