2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 21:55:10 +00:00

Hide presenter plugin when other device is a phone

The use case doesn't make sense
This commit is contained in:
Albert Vaca Cintora
2023-05-24 19:34:15 +02:00
parent 40b05fbe8f
commit ea1675c76a

View File

@@ -18,6 +18,7 @@ import android.view.KeyEvent;
import androidx.core.content.ContextCompat;
import org.apache.commons.lang3.ArrayUtils;
import org.kde.kdeconnect.Device;
import org.kde.kdeconnect.NetworkPacket;
import org.kde.kdeconnect.Plugins.Plugin;
import org.kde.kdeconnect.Plugins.PluginFactory;
@@ -38,6 +39,11 @@ public class PresenterPlugin extends Plugin {
return context.getString(R.string.pref_plugin_presenter);
}
@Override
public boolean isCompatible() {
return !device.getDeviceType().equals(Device.DeviceType.Phone) && super.isCompatible();
}
@Override
public String getDescription() {
return context.getString(R.string.pref_plugin_presenter_desc);