diff --git a/src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisMediaNotificationReceiver.java b/src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisMediaNotificationReceiver.java index e3d5afc5..0ae61011 100644 --- a/src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisMediaNotificationReceiver.java +++ b/src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisMediaNotificationReceiver.java @@ -49,7 +49,7 @@ public class MprisMediaNotificationReceiver extends BroadcastReceiver { //Route these buttons to the media session, which will handle them MediaSessionCompat mediaSession = MprisMediaSession.getMediaSession(); if (mediaSession == null) return; - mediaSession.getController().dispatchMediaButtonEvent((KeyEvent) intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT)); + mediaSession.getController().dispatchMediaButtonEvent(intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT)); } else { //Second case: buttons on the notification, which we created ourselves diff --git a/src/org/kde/kdeconnect/Plugins/SftpPlugin/SimpleSftpServer.java b/src/org/kde/kdeconnect/Plugins/SftpPlugin/SimpleSftpServer.java index f2e36ae0..6cb816e2 100644 --- a/src/org/kde/kdeconnect/Plugins/SftpPlugin/SimpleSftpServer.java +++ b/src/org/kde/kdeconnect/Plugins/SftpPlugin/SimpleSftpServer.java @@ -91,7 +91,7 @@ class SimpleSftpServer { sshd.setFileSystemFactory(new AndroidFileSystemFactory(context)); sshd.setCommandFactory(new ScpCommandFactory()); - sshd.setSubsystemFactories(Collections.singletonList((NamedFactory) new SftpSubsystem.Factory())); + sshd.setSubsystemFactories(Collections.singletonList(new SftpSubsystem.Factory())); if (device.publicKey != null) { keyAuth.deviceKey = device.publicKey;