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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user