2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-09-03 23:55:08 +00:00

Compare commits

..

5 Commits

Author SHA1 Message Date
Albert Vaca Cintora
5e37ffe7cd Release 1.13.5 2019-11-24 22:53:49 +01:00
Albert Vaca Cintora
5907517d91 Fix NPE
Apparently removeLink can be called when there are no links already
2019-11-24 22:52:47 +01:00
Albert Vaca Cintora
63d452908f Restrict this to even more version
Anyway, it only seems to be used since Android 10
2019-11-24 22:48:59 +01:00
Albert Vaca
ccda9d468b v1.13.4 2019-11-21 21:38:35 +01:00
Albert Vaca
c3d02adaa4 Fix IllegalArgumentException crashes 2019-11-21 21:38:25 +01:00
3 changed files with 12 additions and 7 deletions

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.kde.kdeconnect_tp" package="org.kde.kdeconnect_tp"
android:versionCode="11330" android:versionCode="11350"
android:versionName="1.13.3"> android:versionName="1.13.5">
<supports-screens <supports-screens
android:anyDensity="true" android:anyDensity="true"

View File

@@ -534,10 +534,12 @@ public class Device implements BaseLink.PacketReceiver {
Log.i("KDE/Device", "removeLink: " + link.getLinkProvider().getName() + " -> " + getName() + " active links: " + links.size()); Log.i("KDE/Device", "removeLink: " + link.getLinkProvider().getName() + " -> " + getName() + " active links: " + links.size());
if (links.isEmpty()) { if (links.isEmpty()) {
reloadPluginsFromSettings(); reloadPluginsFromSettings();
if (packetQueue != null) {
packetQueue.disconnected(); packetQueue.disconnected();
packetQueue = null; packetQueue = null;
} }
} }
}
@Override @Override
public void onPacketReceived(NetworkPacket np) { public void onPacketReceived(NetworkPacket np) {

View File

@@ -430,10 +430,13 @@ public class MprisMediaSession implements SharedPreferences.OnSharedPreferenceCh
playbackActions |= PlaybackStateCompat.ACTION_SKIP_TO_NEXT; playbackActions |= PlaybackStateCompat.ACTION_SKIP_TO_NEXT;
++numActions; ++numActions;
} }
// Documentation says that this was added in Lollipop (21) but it seems to cause crashes on < Pie (28)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
if (notificationPlayer.isSeekAllowed()) { if (notificationPlayer.isSeekAllowed()) {
playbackActions |= PlaybackStateCompat.ACTION_SEEK_TO; playbackActions |= PlaybackStateCompat.ACTION_SEEK_TO;
++numActions; ++numActions;
} }
}
playbackState.setActions(playbackActions); playbackState.setActions(playbackActions);
mediaSession.setPlaybackState(playbackState.build()); mediaSession.setPlaybackState(playbackState.build());