mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-09-01 14:45:08 +00:00
Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
af922a4277 | ||
|
48cccf3fca | ||
|
1c3389efa0 | ||
|
f54ebdb39b | ||
|
ea80000a4e | ||
|
d9db7e4ad9 | ||
|
1273cb641a | ||
|
cafbfcaee8 | ||
|
ac4c997efd | ||
|
d05feaa6d0 | ||
|
4967cc7a81 | ||
|
59cc3f2d4a | ||
|
0b9880d9b8 | ||
|
90f89c653d | ||
|
e53338c70e | ||
|
e641ff5a0a | ||
|
2ebaf6ae5b | ||
|
dd89463d75 | ||
|
7194b308cb | ||
|
328b708083 | ||
|
6404b86373 | ||
|
3263b37c8a |
@@ -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>
|
||||
|
12
fastlane/metadata/android/en-US/changelogs/12603.txt
Normal file
12
fastlane/metadata/android/en-US/changelogs/12603.txt
Normal 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.
|
12
fastlane/metadata/android/en-US/changelogs/12604.txt
Normal file
12
fastlane/metadata/android/en-US/changelogs/12604.txt
Normal 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.
|
14
fastlane/metadata/android/eo/full_description.txt
Normal file
14
fastlane/metadata/android/eo/full_description.txt
Normal 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.
|
1
fastlane/metadata/android/eo/short_description.txt
Normal file
1
fastlane/metadata/android/eo/short_description.txt
Normal file
@@ -0,0 +1 @@
|
||||
KDE Connect integras vian poŝtelefonon kaj komputilon
|
1
fastlane/metadata/android/eo/title.txt
Normal file
1
fastlane/metadata/android/eo/title.txt
Normal file
@@ -0,0 +1 @@
|
||||
KDE Connect
|
61
po/eo/kdeconnect-android-store-full.po
Normal file
61
po/eo/kdeconnect-android-store-full.po
Normal 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."
|
22
po/eo/kdeconnect-android-store-short.po
Normal file
22
po/eo/kdeconnect-android-store-short.po
Normal 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"
|
@@ -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"
|
||||
|
@@ -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"
|
||||
|
@@ -381,7 +381,7 @@
|
||||
<string name="open_compose_send">Metin oluştur</string>
|
||||
<string name="about_kde_about"><h1>Hakkında</h1> <p>KDE, <a href=https://www.gnu.org/philosophy/free-sw.html>Özgür Yazılım</a> 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.</p> <p>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 <a href=https://community.kde.org/Get_Involved>katılıp katkıda bulunmakta özgürdür</a>.</p> KDE topluluğu ve ürettiğimiz yazılımlar hakkında daha fazla bilgi için <a href=https://www.kde.org/>https://www.kde.org/</a> adresini ziyaret edin.</string>
|
||||
<string name="about_kde_report_bugs_or_wishes"><h1>Hataları veya İsteklerinizi Bildirin</h1> <p>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.</p> <p>KDE\'nin bir hata takip sistemi vardır. <a href=https://bugs.kde.org/>https://bugs.kde.org/</a> adresini ziyaret edin veya hakkında ekranının \"Hata Bildir\" düğmesini kullanarak hataları bildirin.</p> 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">"<h1>KDE\'ye Katılın</h1> <p>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!</p> <p>Katılabileceğiniz bazı projeler hakkında bilgi almak için <a href=https://community.kde.org/Get_Involved>https://community.kde.org/Get_Involved</a> sayfasını ziyaret edin.</p> Daha fazla bilgiye veya belgeye gereksiniminiz varsa <a href=https://techbase.kde.org/>https://techbase.kde.org/</a> sayfasında aradığınızı bulabilirsiniz."</string>
|
||||
<string name="about_kde_join_kde">"<h1>KDE\'ye Katılın</h1> <p>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!</p> <p>Katılabileceğiniz bazı projeler hakkında bilgi almak için <a href=https://community.kde.org/Get_Involved>https://community.kde.org/Get_Involved</a> sayfasını ziyaret edin.</p> Daha fazla bilgiye veya belgeye gereksiniminiz varsa <a href=https://techbase.kde.org/>https://techbase.kde.org/</a> sayfasında aradığınızı bulabilirsiniz."</string>
|
||||
<string name="about_kde_support_kde">"<h1>KDE\'yi Destekleyin</h1> <p>KDE yazılımları her zaman ücretsiz kalmayı sürdürecektir; ancak bunu oluşturmak bedava değildir. </p> <p>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 <a href=https://ev.kde.org/>https://ev.kde.org/</a> adresini ziyadet edin.</p> <p>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.</p> <p>Emeklerimizi, finansal destekle desteklemeniz için <a href=https://www.kde.org/community/donations/>https://www.kde.org/community/donations/</a> adresinde bulunan yollardan birini kullanabilirsiniz.</p> 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>
|
||||
|
@@ -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");
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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()) {
|
||||
|
Reference in New Issue
Block a user