From 513f46aee16b29c6df2821bd607f9497be3f50ea Mon Sep 17 00:00:00 2001 From: l10n daemon script Date: Thu, 3 Dec 2015 07:32:02 +0000 Subject: [PATCH 1/8] SVN_SILENT made messages (after extraction) --- res/values-ca/strings.xml | 1 + res/values-de/strings.xml | 2 ++ res/values-fi/strings.xml | 1 + res/values-gl/strings.xml | 1 + res/values-nl/strings.xml | 1 + res/values-pt-rBR/strings.xml | 1 + res/values-pt/strings.xml | 1 + res/values-sv/strings.xml | 1 + res/values-uk/strings.xml | 1 + 9 files changed, 10 insertions(+) diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml index 2cef742e..59d5fe01 100644 --- a/res/values-ca/strings.xml +++ b/res/values-ca/strings.xml @@ -32,6 +32,7 @@ Moveu un dit per la pantalla per a moure el cursor del ratolí. Toqueu per un clic, i empreu dos/tres dits pels botons dret i mig. Empreu un toc llarg per arrossegar i deixar anar. Estableix l\'acció de tocar amb dos dits Estableix l\'acció de tocar amb tres dits + Inverteix la direcció del desplaçament Clic dret Clic del mig diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index 62c485bb..b8f6dc05 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -8,6 +8,7 @@ Erlaubt das Browsen des Dateisystems auf dem entfernten Handy Abgleich der Zwischenablage Inhalt der Zwischenablage freigeben + Ferneingabe Verwendet Ihr Handy als Maus und Tastatur Multimedia-Bedienung Audio und Video mit Ihrem Telefon steuern @@ -27,6 +28,7 @@ Sie müssen die Erlaubnis zum Zugriff auf Benachrichtigungen erteilen Ping senden Multimedia-Bedienung + Ferneingabe Rechtsklick Mittelklick diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml index 68b66942..292964f8 100644 --- a/res/values-fi/strings.xml +++ b/res/values-fi/strings.xml @@ -32,6 +32,7 @@ Liikuta hiiren osoitinta liikuttamalla sormeasi näytöllä. Napsauta napauttamalla yhdellä sormella, käytä oikeaa painiketta kahdella sormella ja keskipainiketta kolmella. Vedä ja pudota painamalla pitkään. Aseta kahden sormen napautuksen toiminto Aseta kolmen sormen napautuksen toiminto + Käänteinen vierityssuunta Oikea napsautus Keskinapsautus diff --git a/res/values-gl/strings.xml b/res/values-gl/strings.xml index 34e00183..7f954a5e 100644 --- a/res/values-gl/strings.xml +++ b/res/values-gl/strings.xml @@ -32,6 +32,7 @@ Mova un dedo na pantalla para mover o cursor. Toque para facer clic, e use dous ou tres dedos para os botóns secundario e central. Prema durante un tempo para arrastrar e soltar. Definir a acción de tocar con dous dedos Definir a acción de tocar con tres dedos + Inverter a dirección de desprazamento Clic dereito Clic central diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml index 69f90985..bd7998c1 100644 --- a/res/values-nl/strings.xml +++ b/res/values-nl/strings.xml @@ -32,6 +32,7 @@ Veeg met een vinger op het scherm om de muiscursor te verplaatsen. Tik om te klikken en gebruik twee/drie vingers voor rechter en middelste knop. Druk lang voor slepen en loslaten. Tikactie met twee vingers instellen Tikactie met drie vingers instellen + Schuifrichting omdraaien Rechter muisklik Middelste muisklik diff --git a/res/values-pt-rBR/strings.xml b/res/values-pt-rBR/strings.xml index ee816be4..3f883d55 100644 --- a/res/values-pt-rBR/strings.xml +++ b/res/values-pt-rBR/strings.xml @@ -32,6 +32,7 @@ Mova um dedo pelo tela para mover o ponteiro do mouse. Dê um toque para clicar e use dois/três dedos para os botões da direita e do meio. Use uma pressão longa para arrastar e soltar. Definir a ação do toque com dois dedos Definir a ação do toque com três dedos + Direção de rolagem inversa Botão direito Botão do meio diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml index 0643f0bb..d367fb9c 100644 --- a/res/values-pt/strings.xml +++ b/res/values-pt/strings.xml @@ -32,6 +32,7 @@ Mova um dedo pelo ecrã para mover o cursor do rato. Dê um toque para carregar no botão esquerdo e use dois/três dedos para os botões direito e do meio. Use uma pressão longa para arrastar e largar. Definir a acção do toque com dois dedos Definir a acção do toque com três dedos + Direcção de Deslocamento Inversa Botão direito Botão do meio diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml index 95afd2e5..326c898b 100644 --- a/res/values-sv/strings.xml +++ b/res/values-sv/strings.xml @@ -32,6 +32,7 @@ Flytta fingret på skärmen för att röra muspekaren. Rör för att klicka, och använd två eller tre fingrar för höger- och mittenknapparna. Använd en längre beröring för drag och släpp. Ställ in åtgärd vid två fingerberöringar Ställ in åtgärd vid tre fingerberöringar + Omvänd rullningsriktning Högerklick Mittenklick diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml index 8be7d248..c68a6e0f 100644 --- a/res/values-uk/strings.xml +++ b/res/values-uk/strings.xml @@ -32,6 +32,7 @@ Проведіть по екрану пальцем, щоб пересунути вказівник миші. Дотик одним пальцем означатиме клацання, дотиком двома або трьома пальцями можна імітувати праву і середню кнопки. Для перетягування зі скиданням скористайтеся тривалим натисканням. Встановлення дії для торкання двома пальцями Встановлення дії для торкання трьома пальцями + Зворотний напрямок гортання Клацання правою Клацання середньою From 4312648e29e21a2de6b1f3027921b9127aad1d46 Mon Sep 17 00:00:00 2001 From: l10n daemon script Date: Sat, 5 Dec 2015 07:05:07 +0000 Subject: [PATCH 2/8] SVN_SILENT made messages (after extraction) --- res/values-es/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index 245627fd..5b346270 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -32,6 +32,7 @@ Mueva un dedo sobre la pantalla para mover el cursor del ratón. Pulse para ejecutar un clic y use dos/tres dedos para emular los botones derecho y central. Use una pulsación larga para arrastrar y soltar. Establecer la acción al pulsar con dos dedos Establecer la acción al pulsar con tres dedos + Invertir dirección de desplazamiento Clic derecho Clic del botón central From d992e6c4eb164476e3c6490df907fdc474aa13af Mon Sep 17 00:00:00 2001 From: l10n daemon script Date: Sun, 6 Dec 2015 07:04:04 +0000 Subject: [PATCH 3/8] SVN_SILENT made messages (after extraction) --- res/values-it/strings.xml | 1 + res/values-pl/strings.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index 8ecb0c22..f5e1e795 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -32,6 +32,7 @@ Muovi un dito sullo schermo per spostare il puntatore del mouse. Tocca per un clic e usa due/tre dita per i pulsanti destro e centrale. Utilizza una pressione lunga per trascinare e rilasciare. Imposta azione per il tocco a due dita Imposta azione per il tocco a tre dita + Inverti direzione di scorrimento Clic destro Clic centrale diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml index cf4da1e4..dac2d56d 100644 --- a/res/values-pl/strings.xml +++ b/res/values-pl/strings.xml @@ -32,6 +32,7 @@ Przesuń palcem po ekranie, aby przesunąć wskaźnik myszy. Stuknij, aby wywołać naciśniecie lewym przyciskiem myszy i użyj dwóch/trzech palców, aby wywołać naciśniecie prawym i środkowym przyciskiem myszy. Przyciśnij na dłużej, aby przeciągnąć i upuścić. Ustaw działanie po dwukrotnym stuknięciu palcem Ustaw działanie po trzykrotnym stuknięciu palcem + Odwróć stronę przewijania Naciśnięcie prawym Naciśnięcie środkowym From 742332df1eb6314506e132959518e5e6f9950315 Mon Sep 17 00:00:00 2001 From: Holger Kaelberer Date: Mon, 7 Dec 2015 21:35:31 +0100 Subject: [PATCH 4/8] notifications: accept remote notifications Notification synchronization in working in both directions now for API level > 17. For older versions only receiving of notifications is enabled. REVIEW: 125179 --- .../NotificationsPlugin.java | 182 +++++++++++------- 1 file changed, 110 insertions(+), 72 deletions(-) diff --git a/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java b/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java index efa37d1b..e8391f4f 100644 --- a/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java +++ b/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java @@ -24,12 +24,17 @@ import android.annotation.TargetApi; import android.app.Activity; import android.app.AlertDialog; import android.app.Notification; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.provider.Settings; import android.service.notification.StatusBarNotification; +import android.support.v4.app.NotificationCompat; +import android.support.v4.app.TaskStackBuilder; import android.util.Log; import org.kde.kdeconnect.Helpers.AppsHelper; @@ -77,47 +82,45 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver. @Override public boolean onCreate() { - - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) { - return false; - } - - if (hasPermission()) { - NotificationReceiver.RunCommand(context, new NotificationReceiver.InstanceCallback() { - @Override - public void onServiceStart(NotificationReceiver service) { - try { - service.addListener(NotificationsPlugin.this); - StatusBarNotification[] notifications = service.getActiveNotifications(); - for (StatusBarNotification notification : notifications) { - sendNotification(notification, true); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) { + if (hasPermission()) { + NotificationReceiver.RunCommand(context, new NotificationReceiver.InstanceCallback() { + @Override + public void onServiceStart(NotificationReceiver service) { + try { + service.addListener(NotificationsPlugin.this); + StatusBarNotification[] notifications = service.getActiveNotifications(); + for (StatusBarNotification notification : notifications) { + sendNotification(notification, true); + } + } catch (Exception e) { + Log.e("NotificationsPlugin", "Exception"); + e.printStackTrace(); } - } catch (Exception e) { - Log.e("NotificationsPlugin", "Exception"); - e.printStackTrace(); } - } - }); - return true; - } else { - return false; + }); + } else { + return false; + } } + // request all existing notifications + NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_NOTIFICATION); + np.set("request", true); + device.sendPackage(np); + return true; } @Override public void onDestroy() { - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) { - return; - } - - NotificationReceiver.RunCommand(context, new NotificationReceiver.InstanceCallback() { - @Override - public void onServiceStart(NotificationReceiver service) { - service.removeListener(NotificationsPlugin.this); - } - }); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) + NotificationReceiver.RunCommand(context, new NotificationReceiver.InstanceCallback() { + @Override + public void onServiceStart(NotificationReceiver service) { + service.removeListener(NotificationsPlugin.this); + } + }); } @@ -262,53 +265,84 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver. */ if (np.getBoolean("request")) { - NotificationReceiver.RunCommand(context, new NotificationReceiver.InstanceCallback() { - private void sendCurrentNotifications(NotificationReceiver service) { - StatusBarNotification[] notifications = service.getActiveNotifications(); - for (StatusBarNotification notification : notifications) { - sendNotification(notification, true); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) + NotificationReceiver.RunCommand(context, new NotificationReceiver.InstanceCallback() { + private void sendCurrentNotifications(NotificationReceiver service) { + StatusBarNotification[] notifications = service.getActiveNotifications(); + for (StatusBarNotification notification : notifications) { + sendNotification(notification, true); + } } - } - @Override - public void onServiceStart(final NotificationReceiver service) { - try { - //If service just started, this call will throw an exception because the answer is not ready yet - sendCurrentNotifications(service); - } catch(Exception e) { - Log.e("onPackageReceived","Error when answering 'request': Service failed to start. Retrying in 100ms..."); - new Thread(new Runnable() { - @Override - public void run() { - try { - Thread.sleep(100); - Log.e("onPackageReceived","Error when answering 'request': Service failed to start. Retrying..."); - sendCurrentNotifications(service); - } catch (Exception e) { - Log.e("onPackageReceived","Error when answering 'request': Service failed to start twice!"); - e.printStackTrace(); + @Override + public void onServiceStart(final NotificationReceiver service) { + try { + //If service just started, this call will throw an exception because the answer is not ready yet + sendCurrentNotifications(service); + } catch(Exception e) { + Log.e("onPackageReceived","Error when answering 'request': Service failed to start. Retrying in 100ms..."); + new Thread(new Runnable() { + @Override + public void run() { + try { + Thread.sleep(100); + Log.e("onPackageReceived","Error when answering 'request': Service failed to start. Retrying..."); + sendCurrentNotifications(service); + } catch (Exception e) { + Log.e("onPackageReceived","Error when answering 'request': Service failed to start twice!"); + e.printStackTrace(); + } } - } - }).start(); + }).start(); + } } - } - }); + }); } else if (np.has("cancel")) { - NotificationReceiver.RunCommand(context, new NotificationReceiver.InstanceCallback() { - @Override - public void onServiceStart(NotificationReceiver service) { - String dismissedId = np.getString("cancel"); - cancelNotificationCompat(service, dismissedId); - } - }); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) + NotificationReceiver.RunCommand(context, new NotificationReceiver.InstanceCallback() { + @Override + public void onServiceStart(NotificationReceiver service) { + String dismissedId = np.getString("cancel"); + cancelNotificationCompat(service, dismissedId); + } + }); } else { + if (!np.has("ticker") || !np.has("appName") || !np.has("id")) { + Log.e("NotificationsPlugin", "Received notification package lacks properties"); + } else { + TaskStackBuilder stackBuilder = TaskStackBuilder.create(context); + stackBuilder.addParentStack(MaterialActivity.class); + stackBuilder.addNextIntent(new Intent(context, MaterialActivity.class)); + PendingIntent resultPendingIntent = stackBuilder.getPendingIntent( + 0, + PendingIntent.FLAG_UPDATE_CURRENT + ); - Log.w("NotificationsPlugin", "Nothing to do"); + Notification noti = new NotificationCompat.Builder(context) + .setContentTitle(np.getString("appName")) + .setContentText(np.getString("ticker")) + .setContentIntent(resultPendingIntent) + .setTicker(np.getString("ticker")) + .setSmallIcon(android.R.drawable.ic_dialog_alert) + .setAutoCancel(true) + .setLocalOnly(true) // to avoid bouncing the notification back to other kdeconnect nodes + .setDefaults(Notification.DEFAULT_ALL) + .build(); + + NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); + try { + // tag all incoming notifications + notificationManager.notify("kdeconnectId:" + np.getString("id", "0"), np.getInt("id", 0), noti); + } catch (Exception e) { + //4.1 will throw an exception about not having the VIBRATE permission, ignore it. + //https://android.googlesource.com/platform/frameworks/base/+/android-4.2.1_r1.2%5E%5E!/ + } + } } return true; @@ -382,16 +416,20 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver. } public static String getNotificationKeyCompat(StatusBarNotification statusBarNotification) { - if (Build.VERSION.SDK_INT >= 21) { - return statusBarNotification.getKey(); + String result; + // first check if it's one of our remoteIds + String tag = statusBarNotification.getTag(); + if (tag != null && tag.startsWith("kdeconnectId:")) + result = Integer.toString(statusBarNotification.getId()); + else if (Build.VERSION.SDK_INT >= 21) { + result = statusBarNotification.getKey(); } else { String packageName = statusBarNotification.getPackageName(); - String tag = statusBarNotification.getTag(); int id = statusBarNotification.getId(); String safePackageName = (packageName == null) ? "" : packageName; String safeTag = (tag == null) ? "" : tag; - return safePackageName + ":" + safeTag + ":" + id; + result = safePackageName + ":" + safeTag + ":" + id; } + return result; } - } From 1c65f55d00beb08d0664f4a824d5040ae1e949ae Mon Sep 17 00:00:00 2001 From: l10n daemon script Date: Wed, 9 Dec 2015 07:02:43 +0000 Subject: [PATCH 5/8] SVN_SILENT made messages (after extraction) --- res/values-en-rGB/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml index 5d89dc50..a5f76e23 100644 --- a/res/values-en-rGB/strings.xml +++ b/res/values-en-rGB/strings.xml @@ -32,6 +32,7 @@ Move a finger on the screen to move the mouse cursor. Tap for a click, and use two/three fingers for right and middle buttons. Use a long press to drag\'n drop. Set two finger tap action Set three finger tap action + Reverse Scrolling Direction Right click Middle click From 3861e393e0dd16e7d25aa588f78b001f1bce25c6 Mon Sep 17 00:00:00 2001 From: l10n daemon script Date: Mon, 21 Dec 2015 07:50:08 +0000 Subject: [PATCH 6/8] SVN_SILENT made messages (after extraction) --- res/values-sk/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml index eb55df3a..c9a3f4cb 100644 --- a/res/values-sk/strings.xml +++ b/res/values-sk/strings.xml @@ -32,6 +32,7 @@ Posúvajte prst na obrazovke na posun kurzora. Ťuknutie vyvolá klik a použite dva/tri prsty pre pravé a stredné tlačidlo. Použite dlhé stlačenie pre drag and drop. Nastaviť akciu dvoch prstov Nastaviť akciu troch prstov + Obrátený smer rolovania Kliknutie pravým tlačidlom Stredný klik From 2b89c0ed155cc68ff9d68637f33c92d38accb681 Mon Sep 17 00:00:00 2001 From: l10n daemon script Date: Wed, 30 Dec 2015 06:51:27 +0000 Subject: [PATCH 7/8] SVN_SILENT made messages (after extraction) --- res/values-lt/strings.xml | 99 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 93 insertions(+), 6 deletions(-) diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml index 26798d42..f43a7348 100644 --- a/res/values-lt/strings.xml +++ b/res/values-lt/strings.xml @@ -1,15 +1,102 @@ + Telefono žinutės ir skambučiai + Siųsti pranešimus apie SMS ir skambučius + Akumuliatoriaus ataskaita + Failų sistemos naršymas + Iškarpinės sinchronizavimas + Nuotolinis įvedimas + Įvairialypės terpės valdikliai + Vykdyti komandą + Ryšio patikrinimas + Pranešimų sinchronizavimas + Dalintis ir gauti + Įrenginių nerasta + Gerai + Atšaukti + Atverti nuostatas + Tikrinti ryšį + Garso ir vaizdo kūrinių grojimo valdymas + Nuotolinis įvedimas Right click Middle click - Nothing + Nieko + Prijungti įrenginiai + Pasiekiami įrenginiai + Įsimintieji įrenginiai + Papildinio nuostatos + Atrišti + Nepavyksta pasiekti suporuoto įrenginio + Nežinomas įrenginys + Įrenginys nepasiekiamas + Jau paprašyta suporuoti + Įrenginys jau suporuotas + Nepavyksta išsiųsti paketo + Skirtasis laikas baigėsi + Naudotojas atšaukė užduotį + Porininkas atšaukė užduotį + Gautas netinkamas raktas + Paprašyta suporuoti + Norėdami atsakyti, palieskite + Prisijungti iš naujo + Rodyti klaviatūrą + Įrenginys nesuporuotas + Bandyti suporuoti + Priimti + Atmesti + Įrenginys + Suporuoti įrenginį + Nuotolinis valdymas + „KDE Connect“ nuostatos + Groti + Ankstesnis + Atsukti + Prasukti + Tolesnis + Garsumas + Įvairialypės terpės nuostatos + Prasukimo ir atsukimo mygtukai - 10 seconds - 20 seconds - 30 seconds - 1 minute - 2 minutes + 10 sekundžių + 20 sekundžių + 30 sekundžių + 1 minutė + 2 minutės + Dalintis... + Bendrosios nuostatos + Nuostatos + %s nuostatos + Įrenginio pavadinimas + %s + Netinkamas įrenginio pavadinimas + Savitas įrenginių sąrašas + Suporuoti naują įrenginį + Atrišti %s + Pridėti įrenginį pagal IP + Visi failai + SD kortelė %d + SD kortelė + (tik skaitymui) + Nuotraukos + Pridėti kompiuterį / IP + Adresas arba IP + %1$s - %2$s + Siųsti failus + „KDE Connect“ įrenginiai + Čia turėtų pasirodyti to kiti paties tinklo įrenginiai, kuriuose veikia „KDE Connect“ + Įrenginys suporuotas + Pervadinti įrenginį + Pervadinti + Atnaujinti + Šis suporuotas įrenginys nepasiekiamas. Patikrinkite, ar jis prisijungęs prie to paties tinklo. + Siųsti SMS + Telefonas nepalaiko šio papildinio + Rasti telefoną + Telefonas skambės, tad galėsite jį rasti. + Radau + Atverti + Užverti From 8e990765daa59fbe91de355e7c8f984805c4ae4a Mon Sep 17 00:00:00 2001 From: Holger Kaelberer Date: Tue, 5 Jan 2016 20:35:52 +0100 Subject: [PATCH 8/8] Fix loosing already known plugins on reloading REVIEW: 126273 --- src/org/kde/kdeconnect/Device.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/kde/kdeconnect/Device.java b/src/org/kde/kdeconnect/Device.java index 697ea45a..a78ee8d3 100644 --- a/src/org/kde/kdeconnect/Device.java +++ b/src/org/kde/kdeconnect/Device.java @@ -699,7 +699,7 @@ public class Device implements BaseLink.PackageReceiver { Plugin existing = plugins.get(pluginKey); if (existing != null) { //Log.w("KDE/addPlugin","plugin already present:" + pluginKey); - return false; + return true; } final Plugin plugin = PluginFactory.instantiatePluginForDevice(context, pluginKey, this);