2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-09-01 14:45:08 +00:00

Compare commits

..

22 Commits

Author SHA1 Message Date
Albert Vaca Cintora
af922a4277 Release 1.26.4 2023-07-08 00:41:42 +02:00
Albert Vaca Cintora
48cccf3fca Catch SecurityException when calling getActiveNotifications
It's okay to ignore this since we were only using it to check if Spotify
was running.
2023-07-08 00:39:13 +02:00
Albert Vaca Cintora
1c3389efa0 Do not listen for PACKAGE_REPLACED broadcasts
We already listen for MY_PACKAGE_REPLACED which is sent since API 12
2023-07-08 00:29:09 +02:00
Albert Vaca Cintora
f54ebdb39b Trying random things to try to fix ForegroundServiceStartNotAllowedException 2023-07-08 00:24:17 +02:00
Albert Vaca Cintora
ea80000a4e Add a null check as mentioned in !377 2023-07-08 00:03:12 +02:00
Albert Vaca Cintora
d9db7e4ad9 Catch TextParsingException (which wrapps SocketException)
Could happen if the download of the CSV file failed or got interrupted
2023-07-08 00:00:06 +02:00
Łukasz Patron
1273cb641a Unbreak Mpris media notifications
Because notificationDevice is only set on updateCurrentPlayer(), we
ought to call it before checking if the device is null.
2023-07-07 20:48:43 +02:00
l10n daemon script
cafbfcaee8 GIT_SILENT Sync po/docbooks with svn 2023-07-07 01:53:59 +00:00
l10n daemon script
ac4c997efd GIT_SILENT made messages (after extraction) 2023-07-07 00:50:20 +00:00
l10n daemon script
d05feaa6d0 GIT_SILENT Sync po/docbooks with svn 2023-07-06 02:28:00 +00:00
l10n daemon script
4967cc7a81 GIT_SILENT Add new file (after extraction) 2023-07-06 00:58:05 +00:00
l10n daemon script
59cc3f2d4a GIT_SILENT made messages (after extraction) 2023-07-06 00:57:50 +00:00
l10n daemon script
0b9880d9b8 GIT_SILENT Sync po/docbooks with svn 2023-07-04 02:31:15 +00:00
Albert Vaca Cintora
90f89c653d Try to fix NPE in removeOnSubscriptionsChangedListener 2023-07-02 23:40:18 +02:00
Albert Vaca Cintora
e53338c70e Release 1.26.3 2023-07-02 23:34:46 +02:00
Albert Vaca Cintora
e641ff5a0a Don't call put if we are going to call remove right after
Note we still want the remove in case the plugin already was loaded
2023-07-02 23:26:56 +02:00
Albert Vaca Cintora
2ebaf6ae5b Ignore exceptions in pairingSuccessful callbacks
Bubbling up the exception to the PairingHandler makes the device become
unpaired, and we only want this if the error happens persisting device info
2023-07-02 23:01:05 +02:00
Albert Vaca Cintora
dd89463d75 Add logging to help debug a crash restoring saved devices 2023-07-02 22:57:40 +02:00
Albert Vaca Cintora
7194b308cb Fix NPE 2023-07-02 20:46:11 +02:00
Albert Vaca Cintora
328b708083 Fix NPE by checking if there's a Device 2023-07-02 10:27:52 +02:00
l10n daemon script
6404b86373 GIT_SILENT Sync po/docbooks with svn 2023-07-01 01:53:29 +00:00
l10n daemon script
3263b37c8a GIT_SILENT Sync po/docbooks with svn 2023-06-30 01:53:09 +00:00
18 changed files with 178 additions and 44 deletions

View File

@@ -9,8 +9,8 @@ SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.kde.kdeconnect_tp"
android:versionCode="12602"
android:versionName="1.26.2">
android:versionCode="12604"
android:versionName="1.26.4">
<uses-feature
android:name="android.hardware.telephony"
@@ -138,14 +138,6 @@ SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted
<receiver android:name="org.kde.kdeconnect.KdeConnectBroadcastReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REPLACED" />
<data
android:host="kdeconnect"
android:path="/"
android:scheme="package" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
</intent-filter>

View File

@@ -0,0 +1,12 @@
1.26.3:
* Fixed several bugs and crashes related to media controls.
1.26.1:
* Fix infinite loop that would cause high CPU usage.
1.26.0:
* Allow having different widgets for diferent devices.
* Add stats about network packets sent and received.
* Add the option to cancel a pairing request after sending it.
* Fix device name set initially not being human-friendly.
* Rewrite some of the internals to improve performance.

View File

@@ -0,0 +1,12 @@
1.26.4:
* Fixed several bugs and crashes related to media controls.
1.26.1:
* Fix infinite loop that would cause high CPU usage.
1.26.0:
* Allow having different widgets for diferent devices.
* Add stats about network packets sent and received.
* Add the option to cancel a pairing request after sending it.
* Fix device name set initially not being human-friendly.
* Rewrite some of the internals to improve performance.

View File

@@ -0,0 +1,14 @@
KDE Connect provizas aron da funkcioj por integri vian laborfluon trans aparatoj:
- Komuna tondujo: kopiu kaj algluu inter viaj aparatoj.
- Kunhavigu dosierojn kaj URL-ojn al via komputilo de iu ajn aplikaĵo.
- Ricevu sciigojn pri envenantaj vokoj kaj SMS-mesaĝoj en via komputilo.
- Virtuala tuŝplato: Uzu vian telefonan ekranon kiel la tuŝplaton de via komputilo.
- Sinkronigo de sciigoj: Legu viajn Android-sciigojn de la labortablo.
- Plurmedia teleregilo: Uzu vian telefonon kiel teleregilon por Linuks-komunikilaj ludantoj.
- WiFi-konekto: ne necesas USB-drato aŭ bluetooth.
- Fin-al-fina TLS-ĉifrado: viaj informoj estas sekuraj.
Bonvolu noti, ke vi devos instali KDE Connect sur via komputilo por tiu aplikaĵo por funkcii, kaj tenu la labortablan version ĝisdatigita kun la Android versio por ke la plej novaj kapabloj funkciu.
Ĉi tiu programo estas parto de malfermkoda projekto kaj ĝi ekzistas danke al ĉiuj homoj kiuj kontribuis al ĝi. Vizitu la retejon por kapti la fontkodon.

View File

@@ -0,0 +1 @@
KDE Connect integras vian poŝtelefonon kaj komputilon

View File

@@ -0,0 +1 @@
KDE Connect

View File

@@ -0,0 +1,61 @@
# translation of kdeconnect-android-store-full.pot to esperanto
# Copyright (C) 2023 Free Software Foundation, Inc.
# This file is distributed under the same license as the kdeconnect-android package.
# Oliver Kellogg <okellogg@users.sourceforge.net, 2023.
#
#. extracted from ./metadata/android/en-US/full_description.txt
msgid ""
msgstr ""
"Project-Id-Version: kdeconnect-android\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-07 00:47+0000\n"
"PO-Revision-Date: 2023-07-06 06:18+0100\n"
"Last-Translator: Oliver Kellogg <okellogg@users.sourceforge.net>\n"
"Language-Team: Esperanto <kde-i18n-eo@kde.org>\n"
"Language: eo\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
msgid ""
"KDE Connect provides a set of features to integrate your workflow across "
"devices:\n"
"\n"
"- Shared clipboard: copy and paste between your devices.\n"
"- Share files and URLs to your computer from any app.\n"
"- Get notifications for incoming calls and SMS messages on your PC.\n"
"- Virtual touchpad: Use your phone screen as your computer's touchpad.\n"
"- Notifications sync: Read your Android notifications from the desktop.\n"
"- Multimedia remote control: Use your phone as a remote for Linux media "
"players.\n"
"- WiFi connection: no USB wire or bluetooth needed.\n"
"- End-to-end TLS encryption: your information is safe.\n"
"\n"
"Please note you will need to install KDE Connect on your computer for this "
"app to work, and keep the desktop version up-to-date with the Android "
"version for the latest features to work.\n"
"\n"
"This app is part of an open source project and it exists thanks to all the "
"people who contributed to it. Visit the website to grab the source code."
msgstr ""
"KDE Connect provizas aron da funkcioj por integri vian laborfluon trans "
"aparatoj:\n"
"\n"
"- Komuna tondujo: kopiu kaj algluu inter viaj aparatoj.\n"
"- Kunhavigu dosierojn kaj URL-ojn al via komputilo de iu ajn aplikaĵo.\n"
"- Ricevu sciigojn pri envenantaj vokoj kaj SMS-mesaĝoj en via komputilo.\n"
"- Virtuala tuŝplato: Uzu vian telefonan ekranon kiel la tuŝplaton de via "
"komputilo.\n"
"- Sinkronigo de sciigoj: Legu viajn Android-sciigojn de la labortablo.\n"
"- Plurmedia teleregilo: Uzu vian telefonon kiel teleregilon por Linuks-"
"komunikilaj ludantoj.\n"
"- WiFi-konekto: ne necesas USB-drato aŭ bluetooth.\n"
"- Fin-al-fina TLS-ĉifrado: viaj informoj estas sekuraj.\n"
"\n"
"Bonvolu noti, ke vi devos instali KDE Connect sur via komputilo por tiu "
"aplikaĵo por funkcii, kaj tenu la labortablan version ĝisdatigita kun la "
"Android versio por ke la plej novaj kapabloj funkciu.\n"
"\n"
"Ĉi tiu programo estas parto de malfermkoda projekto kaj ĝi ekzistas danke al "
"ĉiuj homoj kiuj kontribuis al ĝi. Vizitu la retejon por kapti la fontkodon."

View File

@@ -0,0 +1,22 @@
# translation of kdeconnect-android-store-short.pot to esperanto
# Copyright (C) 2023 Free Software Foundation, Inc.
# This file is distributed under the same license as the kdeconnect-android package.
# Oliver Kellogg <okellogg@users.sourceforge.net, 2023.
#
#. extracted from ./metadata/android/en-US/short_description.txt
msgid ""
msgstr ""
"Project-Id-Version: kdeconnect-android\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-07 00:47+0000\n"
"PO-Revision-Date: 2023-07-05 07:30+0100\n"
"Last-Translator: Oliver Kellogg <okellogg@users.sourceforge.net>\n"
"Language-Team: Esperanto <kde-i18n-eo@kde.org>\n"
"Language: eo\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
msgid "KDE Connect integrates your smartphone and computer"
msgstr "KDE Connect integras vian poŝtelefonon kaj komputilon"

View File

@@ -4,7 +4,7 @@ msgstr ""
"Project-Id-Version: kdeorg\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-07 00:47+0000\n"
"PO-Revision-Date: 2023-06-17 04:11\n"
"PO-Revision-Date: 2023-07-03 11:38\n"
"Last-Translator: \n"
"Language-Team: Chinese Simplified\n"
"Language: zh_CN\n"

View File

@@ -4,7 +4,7 @@ msgstr ""
"Project-Id-Version: kdeorg\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-07 00:47+0000\n"
"PO-Revision-Date: 2023-06-17 04:11\n"
"PO-Revision-Date: 2023-07-03 11:38\n"
"Last-Translator: \n"
"Language-Team: Chinese Simplified\n"
"Language: zh_CN\n"

View File

@@ -381,7 +381,7 @@
<string name="open_compose_send">Metin oluştur</string>
<string name="about_kde_about">&lt;h1&gt;Hakkında&lt;/h1&gt; &lt;p&gt;KDE, &lt;a href=https://www.gnu.org/philosophy/free-sw.html&gt;Özgür Yazılım&lt;/a&gt; hareketine destek veren yazılım mühendislerinin, sanatçıların, yazarların, çevirmenlerin ve yaratıcıların bir araya geldiği dünya çapında bir topluluktur KDE, Plasma masaüstü ortamını, yüzlerce uygulamayı ve onları destekleyen sayısız yazılım kitaplığını üretir.&lt;/p&gt; &lt;p&gt;KDE, işbirlikçi bir kurumdur: Tek bir varlık yönünü veya ürünlerini kontrol etmez. Bunun yerine, dünyanın en kaliteli Özgür Yazılım\'larını üretme hedefi için birlikte çalışırız. Herkes, sen de dahil olmak üzere, KDE\'ye &lt;a href=https://community.kde.org/Get_Involved&gt;katılıp katkıda bulunmakta özgürdür&lt;/a&gt;.&lt;/p&gt; KDE topluluğu ve ürettiğimiz yazılımlar hakkında daha fazla bilgi için &lt;a href=https://www.kde.org/&gt;https://www.kde.org/&lt;/a&gt; adresini ziyaret edin.</string>
<string name="about_kde_report_bugs_or_wishes">&lt;h1&gt;Hataları veya İsteklerinizi Bildirin&lt;/h1&gt; &lt;p&gt;Yazılım her zaman iyileştirilebilir ve KDE takımın bunu yapmaya hazır. Ancak siz de bir şey beklendiği gibi gitmezse veya hata verirse bize bildirin.&lt;/p&gt; &lt;p&gt;KDE\'nin bir hata takip sistemi vardır. &lt;a href=https://bugs.kde.org/&gt;https://bugs.kde.org/&lt;/a&gt; adresini ziyaret edin veya hakkında ekranının \"Hata Bildir\" düğmesini kullanarak hataları bildirin.&lt;/p&gt; Bir iyileştirme için öneriniz varsa bunu bildirmek için hata takip sistemini kullanabilirsiniz; yalnızca \"Wishlist\" ciddiyet düzeyini kullandığınızdan emin olun.</string>
<string name="about_kde_join_kde">"&lt;h1&gt;KDE\'ye Katılın&lt;/h1&gt; &lt;p&gt;KDE takımının bir üyesi olmak için yazılım geliştirici olmanıza gerek yok. Program arayüzlerini çeviren yerel takımlara katılabilirsiniz. Grafikler, temalar, sesler ve iyileştirilmiş belgelendirme sağlayabilirsiniz. Siz karar verin!&lt;/p&gt; &lt;p&gt;Katılabileceğiniz bazı projeler hakkında bilgi almak için &lt;a href=https://community.kde.org/Get_Involved&gt;https://community.kde.org/Get_Involved&lt;/a&gt; sayfasını ziyaret edin.&lt;/p&gt; Daha fazla bilgiye veya belgeye gereksiniminiz varsa &lt;a href=https://techbase.kde.org/&gt;https://techbase.kde.org/&lt;/a&gt; sayfasında aradığınızı bulabilirsiniz."</string>
<string name="about_kde_join_kde">"&lt;h1&gt;KDE\'ye Katılın&lt;/h1&gt; &lt;p&gt;KDE takımının bir üyesi olmak için yazılım geliştirici olmanıza gerek yok. Program arayüzlerini çeviren yerel takımlara katılabilirsiniz. Grafikler, temalar, sesler ve iyileştirilmiş belgelendirme sağlayabilirsiniz. Karar sizin!&lt;/p&gt; &lt;p&gt;Katılabileceğiniz bazı projeler hakkında bilgi almak için &lt;a href=https://community.kde.org/Get_Involved&gt;https://community.kde.org/Get_Involved&lt;/a&gt; sayfasını ziyaret edin.&lt;/p&gt; Daha fazla bilgiye veya belgeye gereksiniminiz varsa &lt;a href=https://techbase.kde.org/&gt;https://techbase.kde.org/&lt;/a&gt; sayfasında aradığınızı bulabilirsiniz."</string>
<string name="about_kde_support_kde">"&lt;h1&gt;KDE\'yi Destekleyin&lt;/h1&gt; &lt;p&gt;KDE yazılımları her zaman ücretsiz kalmayı sürdürecektir; ancak bunu oluşturmak bedava değildir. &lt;/p&gt; &lt;p&gt;Geliştirmeyi desteklemek için KDE topluluğu, kar amacı gütmeyen bir kuruluş olan KDE e.V.\'yi kurmuştur, bu topluluk KDE topluğunu yasal ve finansal konularda temsil eder. KDE e.V. hakkında daha fazla bilgi için &lt;a href=https://ev.kde.org/&gt;https://ev.kde.org/&lt;/a&gt; adresini ziyadet edin.&lt;/p&gt; &lt;p&gt;KDE, finansal da dahil olmak üzere her türlü katkıdan yarar sağlar. Maddi kaynaklarımızla, geliştiricilerimizin ve diğerlerinin katkıda bulunurken oluşan masraflarını karşılıyoruz. Ayrıca yasal destek ve konferanslar ve toplantılar için de kullanılmaktadır.&lt;/p&gt; &lt;p&gt;Emeklerimizi, finansal destekle desteklemeniz için &lt;a href=https://www.kde.org/community/donations/&gt;https://www.kde.org/community/donations/&lt;/a&gt; adresinde bulunan yollardan birini kullanabilirsiniz.&lt;/p&gt; Desteğiniz için şimdiden teşekkürler."</string>
<string name="maintainer_and_developer">Projeyi sürdüren ve geliştirici</string>
<string name="developer">Geliştirici</string>

View File

@@ -206,6 +206,7 @@ public class BackgroundService extends Service {
.setContentIntent(pi)
.setPriority(NotificationCompat.PRIORITY_MIN) //MIN so it's not shown in the status bar before Oreo, on Oreo it will be bumped to LOW
.setShowWhen(false)
.setForegroundServiceBehavior(NotificationCompat.FOREGROUND_SERVICE_IMMEDIATE)
.setAutoCancel(false);
notification.setGroup("BackgroundService");

View File

@@ -186,6 +186,8 @@ public class Device implements BaseLink.PacketReceiver {
@Override
public void pairingSuccessful() {
Log.i("Device", "pairing successful, adding to trusted devices list");
hidePairingNotification();
// Store current device certificate so we can check it in the future (TOFU)
@@ -195,10 +197,15 @@ public class Device implements BaseLink.PacketReceiver {
SharedPreferences preferences = context.getSharedPreferences("trusted_devices", Context.MODE_PRIVATE);
preferences.edit().putBoolean(deviceInfo.id, true).apply();
reloadPluginsFromSettings();
try {
reloadPluginsFromSettings();
for (PairingHandler.PairingCallback cb : pairingCallbacks) {
cb.pairingSuccessful();
for (PairingHandler.PairingCallback cb : pairingCallbacks) {
cb.pairingSuccessful();
}
} catch (Exception e) {
Log.e("PairingHandler", "Exception in pairingSuccessful. Not unpairing because saving the trusted device succeeded");
e.printStackTrace();
}
}
@@ -212,6 +219,7 @@ public class Device implements BaseLink.PacketReceiver {
@Override
public void unpaired() {
Log.i("Device", "unpaired, removing from trusted devices list");
SharedPreferences preferences = context.getSharedPreferences("trusted_devices", Context.MODE_PRIVATE);
preferences.edit().remove(deviceInfo.id).apply();
@@ -566,8 +574,6 @@ public class Device implements BaseLink.PacketReceiver {
return false;
}
plugins.put(pluginKey, plugin);
if (!plugin.checkRequiredPermissions()) {
Log.d("KDE/addPlugin", "No permission " + pluginKey);
plugins.remove(pluginKey);
@@ -575,6 +581,7 @@ public class Device implements BaseLink.PacketReceiver {
return false;
} else {
Log.d("KDE/addPlugin", "Permissions OK " + pluginKey);
plugins.put(pluginKey, plugin);
pluginsWithoutPermissions.remove(pluginKey);
if (plugin.checkOptionalPermissions()) {
Log.d("KDE/addPlugin", "Optional Permissions OK " + pluginKey);

View File

@@ -16,6 +16,7 @@ import android.preference.PreferenceManager;
import android.provider.Settings;
import android.util.Log;
import com.univocity.parsers.common.TextParsingException;
import com.univocity.parsers.csv.CsvParser;
import com.univocity.parsers.csv.CsvParserSettings;
@@ -111,7 +112,7 @@ public class DeviceHelper {
Log.e("DeviceHelper", "Didn't find a device name for " + Build.MODEL);
}
}
} catch(IOException e) {
} catch(IOException | TextParsingException e) {
e.printStackTrace();
}
fetchingName = false;

View File

@@ -26,14 +26,6 @@ public class KdeConnectBroadcastReceiver extends BroadcastReceiver {
Log.i("KdeConnect", "MyUpdateReceiver");
BackgroundService.Start(context);
break;
case Intent.ACTION_PACKAGE_REPLACED:
Log.i("KdeConnect", "UpdateReceiver");
if (!intent.getData().getSchemeSpecificPart().equals(context.getPackageName())) {
Log.i("KdeConnect", "Ignoring, it's not me!");
return;
}
BackgroundService.Start(context);
break;
case Intent.ACTION_BOOT_COMPLETED:
Log.i("KdeConnect", "KdeConnectBroadcastReceiver");
BackgroundService.Start(context);

View File

@@ -219,12 +219,17 @@ public class ConnectivityReportPlugin extends Plugin {
runWithLooper(() -> {
TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
TelephonyHelper.cancelActiveSubscriptionIDsListener(context, subListener);
if (subListener != null) {
TelephonyHelper.cancelActiveSubscriptionIDsListener(context, subListener);
subListener = null;
}
}
for (Integer subID : listeners.keySet()) {
Log.i("ConnectivityReport", "Removed subscription ID " + subID);
tm.listen(listeners.get(subID), PhoneStateListener.LISTEN_NONE);
}
listeners.clear();
states.clear();
});
}

View File

@@ -216,7 +216,7 @@ public class MprisMediaSession implements
}
private MprisPlugin.MprisPlayer getPlayerFromDevice(Device device, MprisPlugin.MprisPlayer preferredPlayer) {
if (!mprisDevices.contains(device.getDeviceId()))
if (device == null || !mprisDevices.contains(device.getDeviceId()))
return null;
MprisPlugin plugin = device.getPlugin(MprisPlugin.class);
@@ -264,6 +264,21 @@ public class MprisMediaSession implements
return;
}
//Make sure our information is up-to-date
MprisPlugin.MprisPlayer currentPlayer = updateCurrentPlayer();
Device device = KdeConnect.getInstance().getDevice(notificationDevice);
if (device == null) {
closeMediaNotification();
return;
}
//If the player disappeared (and no other playing one found), just remove the notification
if (currentPlayer == null) {
closeMediaNotification();
return;
}
synchronized (instance) {
if (mediaSession == null) {
mediaSession = new MediaSessionCompat(context, MPRIS_MEDIA_SESSION_TAG);
@@ -273,15 +288,6 @@ public class MprisMediaSession implements
}
}
//Make sure our information is up-to-date
MprisPlugin.MprisPlayer currentPlayer = updateCurrentPlayer();
//If the player disappeared (and no other playing one found), just remove the notification
if (currentPlayer == null) {
closeMediaNotification();
return;
}
updateRemoteDeviceVolumeControl();
MediaMetadataCompat.Builder metadata = new MediaMetadataCompat.Builder();
@@ -363,7 +369,7 @@ public class MprisMediaSession implements
.setShowWhen(false)
.setColor(ContextCompat.getColor(context, R.color.primary))
.setVisibility(androidx.core.app.NotificationCompat.VISIBILITY_PUBLIC)
.setSubText(KdeConnect.getInstance().getDevice(notificationDevice).getName());
.setSubText(device.getName());
notification.setContentTitle(currentPlayer.getTitle());
@@ -496,11 +502,15 @@ public class MprisMediaSession implements
@Override
public void onListenerConnected(NotificationReceiver service) {
for (StatusBarNotification n : service.getActiveNotifications()) {
if ("com.spotify.music".equals(n.getPackageName())) {
spotifyRunning = true;
updateMediaNotification();
try {
for (StatusBarNotification n : service.getActiveNotifications()) {
if ("com.spotify.music".equals(n.getPackageName())) {
spotifyRunning = true;
updateMediaNotification();
}
}
} catch(SecurityException e) {
e.printStackTrace();
}
}

View File

@@ -245,7 +245,10 @@ public class MprisNowPlayingFragment extends Fragment implements VolumeKeyListen
return; //Player hasn't actually changed
}
targetPlayer = plugin.getPlayerStatus(player);
targetPlayerName = targetPlayer.getPlayerName();
if (targetPlayer != null) {
targetPlayerName = targetPlayer.getPlayerName();
}
updatePlayerStatus(plugin);
if (targetPlayer != null && targetPlayer.isPlaying()) {