mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 22:25:08 +00:00
Compare commits
28 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ccda9d468b | ||
|
c3d02adaa4 | ||
|
733dd604ba | ||
|
f93a0e366f | ||
|
aa735c22b2 | ||
|
c78077a416 | ||
|
da074f9413 | ||
|
4a0c53610f | ||
|
aa25372e91 | ||
|
125dd14b18 | ||
|
6f81c67632 | ||
|
1d5c280401 | ||
|
432294c64c | ||
|
d16293cca5 | ||
|
dd5fb954bc | ||
|
b1c6df405c | ||
|
418e1841f3 | ||
|
f2064aaef8 | ||
|
d1b892f368 | ||
|
b5a1424206 | ||
|
b367e5d38e | ||
|
a2ccafbdf8 | ||
|
da55b11c22 | ||
|
cf968a70ea | ||
|
7b78a4c78a | ||
|
9fcda1ec6f | ||
|
e359d59bdd | ||
|
ce7105ef89 |
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.kde.kdeconnect_tp"
|
||||
android:versionCode="11320"
|
||||
android:versionName="1.13.2">
|
||||
android:versionCode="11340"
|
||||
android:versionName="1.13.4">
|
||||
|
||||
<supports-screens
|
||||
android:anyDensity="true"
|
||||
|
@@ -23,6 +23,8 @@ You can install this app from the [Play Store](https://play.google.com/store/app
|
||||
|
||||
A lot of useful information, including how to get started working on KDE Connect and how to connect with the current developers, is on our [KDE Community Wiki page](https://community.kde.org/KDEConnect)
|
||||
|
||||
For bug reporting, please use [KDE's Bugzilla](https://bugs.kde.org). Please do not use the issue tracker in GitLab since we want to keep everything in one place.
|
||||
|
||||
To contribute patches, use [KDE Connect's Gitlab](https://invent.kde.org/kde/kdeconnect-android/).
|
||||
On Gitlab (as well as on our [old Phabricator](https://phabricator.kde.org/tag/kde_connect/)) you can find a task list with stuff to do and links to other relevant resources.
|
||||
It is a good idea to also subscribe to the [KDE Connect mailing list](https://mail.kde.org/mailman/listinfo/kdeconnect).
|
||||
|
@@ -6,7 +6,7 @@ buildscript {
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.4.2'
|
||||
classpath 'com.android.tools.build:gradle:3.5.2'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ dependencies {
|
||||
implementation 'com.jaredrummler:android-device-names:1.1.9' //To get a human-friendly device name
|
||||
|
||||
implementation 'org.apache.sshd:sshd-core:0.14.0'
|
||||
implementation 'org.apache.mina:mina-core:2.0.19' //For some reason, makes sshd-core:0.14.0 work without NIO, which isn't available until Android 8+
|
||||
implementation 'org.apache.mina:mina-core:2.0.19' //For some reason, makes sshd-core:0.14.0 work without NIO, which isn't available until Android 8 (api 26)
|
||||
|
||||
//implementation('com.github.bright:slf4android:0.1.6') { transitive = true } // For org.apache.sshd debugging
|
||||
implementation 'com.madgag.spongycastle:bcpkix-jdk15on:1.58.0.0' //For SSL certificate generation
|
||||
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
#Wed May 01 14:24:13 CEST 2019
|
||||
#Sun Oct 27 20:27:45 CET 2019
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
|
||||
|
@@ -108,6 +108,7 @@
|
||||
</plurals>
|
||||
<string name="received_file_text">Toca p\'abrir «%1s»</string>
|
||||
<string name="cannot_create_file">Nun pue crease\'l ficheru %s</string>
|
||||
<string name="tap_to_answer">Toca pa responder</string>
|
||||
<string name="right_click">Unviar un clic drechu</string>
|
||||
<string name="middle_click">Unviar un clic d\'en mediu</string>
|
||||
<string name="show_keyboard">Amosar el tecláu</string>
|
||||
@@ -136,7 +137,7 @@
|
||||
<string name="custom_device_list_help">Si\'l preséu nun se deteuta automáticamente, pues amestar la so direición IP o nome d\'agospiu calcando nel botón flotante d\'aición</string>
|
||||
<string name="undo">Desfacer</string>
|
||||
<string name="share_notification_preference">Avisos sonoros</string>
|
||||
<string name="share_notification_preference_summary">Vibra y reproduz un soníu al recibir un ficheru</string>
|
||||
<string name="share_notification_preference_summary">Fai que\'l teléfonu vibre y reproduza un soníu al recibir un ficheru</string>
|
||||
<string name="share_destination_customize">Personalizar el direutoriu de destín</string>
|
||||
<string name="share_destination_customize_summary_disabled">Los ficheros recibíos van apaecer en Descargues</string>
|
||||
<string name="share_destination_customize_summary_enabled">Los ficheros van atroxase nel direutoriu d\'embaxo</string>
|
||||
@@ -155,6 +156,7 @@
|
||||
<string name="sftp_storage_preference_display_name">Nome</string>
|
||||
<string name="sftp_storage_preference_display_name_already_used">Esti nome yá ta usándose</string>
|
||||
<string name="sftp_storage_preference_display_name_cannot_be_empty">El nome nun pue tar baleru</string>
|
||||
<string name="sftp_action_mode_menu_delete">Desaniciar</string>
|
||||
<string name="sftp_no_storage_locations_configured">Nun se configuraron allugamientos d\'almacenamientu</string>
|
||||
<string name="sftp_saf_permission_explanation">P\'acceder remotamente a los ficheros tienes de configurar allugamientos d\'almacenamientu</string>
|
||||
<string name="no_players_connected">Nun s\'alcontraron reproductores</string>
|
||||
@@ -164,6 +166,7 @@
|
||||
<string name="device_rename_title">Renomáu del preséu</string>
|
||||
<string name="device_rename_confirm">Renomar</string>
|
||||
<string name="refresh">Refrescar</string>
|
||||
<string name="unreachable_description">Esti preséu empareyáu nun ye algamable. Asegúrate de que ta coneutáu a la mesma rede que tu.</string>
|
||||
<string name="no_wifi">Nun tas coneutáu a una rede Wi-Fi polo que nun vas ser a ver dengún preséu. Calca equí p\'activar el Wi-Fi.</string>
|
||||
<string name="no_file_browser">Nun hai dengún restolador de ficheros instaláu.</string>
|
||||
<string name="pref_plugin_telepathy">Unviu de SMS</string>
|
||||
@@ -181,10 +184,13 @@
|
||||
<string name="addcommand_explanation">Nun hai comandos rexistraos.</string>
|
||||
<string name="addcommand_explanation2">Pues amestar más nos axustes de KDE Connect del ordenador</string>
|
||||
<string name="add_command_description">Pues amestar más comandos nel ordenador</string>
|
||||
<string name="pref_plugin_mprisreceiver">Mandu pa reproductores multimedia</string>
|
||||
<string name="pref_plugin_mprisreceiver_desc">Controla los reproductores multimedia d\'esti preséu dende otru</string>
|
||||
<string name="notification_channel_default">Otros avisos</string>
|
||||
<string name="notification_channel_persistent">Indicador permanente</string>
|
||||
<string name="notification_channel_media_control">Mandu multimedia</string>
|
||||
<string name="notification_channel_filetransfer">Tresferencia de ficheros</string>
|
||||
<string name="copy_url_to_clipboard">Copiar la URL al cartafueyu</string>
|
||||
<string name="clipboard_toast">Copióse al cartafueyu</string>
|
||||
<string name="runcommand_noruncommandplugin">Esti preséu nun tien activáu\'l plugin Execución de comandos</string>
|
||||
<string name="pref_plugin_findremotedevice_desc">Fai que\'l preséu remotu suene</string>
|
||||
@@ -205,7 +211,8 @@
|
||||
<string name="block_contents">Bloquiar el conteníu de los avisos</string>
|
||||
<string name="block_images">Bloquiar les imáxenes de los avisos</string>
|
||||
<string name="notification_channel_receivenotification">Avisos d\'otros preseos</string>
|
||||
<string name="plugin_photo_desc">Llanza l\'aplicación de la cámarra p\'acenciellar la fechura y tresferencia de semeyes</string>
|
||||
<string name="take_picture">Llanzamientu de la cámara</string>
|
||||
<string name="plugin_photo_desc">Llanza l\'aplicación de la cámara p\'acenciellar la fechura y tresferencia de semeyes</string>
|
||||
<string name="no_app_for_opening">Nun alcontró denguna aplicación afayadiza p\'abrir esti ficheru.</string>
|
||||
<string name="remote_keyboard_service">Tecláu remotu de KDE Connect</string>
|
||||
</resources>
|
||||
|
@@ -27,8 +27,8 @@
|
||||
<string name="pref_plugin_ping_desc">Posílat a přijímat ping</string>
|
||||
<string name="pref_plugin_notifications">Synchronizace upozornění</string>
|
||||
<string name="pref_plugin_notifications_desc">Zpřístupněte si upozornění z jiných zařízení</string>
|
||||
<string name="pref_plugin_receive_notifications">Přijímat oznámení</string>
|
||||
<string name="pref_plugin_receive_notifications_desc">Přijímat oznámení z jiného zařízení a zobrazovat je v Androidu</string>
|
||||
<string name="pref_plugin_receive_notifications">Přijímat upozornění</string>
|
||||
<string name="pref_plugin_receive_notifications_desc">Přijímat upozornění z jiného zařízení a zobrazovat je v Androidu</string>
|
||||
<string name="pref_plugin_sharereceiver">Sdílet a přijmout</string>
|
||||
<string name="pref_plugin_sharereceiver_desc">Sdílet soubory a odkazy mezi zařízeními</string>
|
||||
<string name="device_list_empty">Žádná zařízení</string>
|
||||
@@ -36,7 +36,7 @@
|
||||
<string name="cancel">Zrušit</string>
|
||||
<string name="open_settings">Otevřít nastavení</string>
|
||||
<string name="no_permissions">Pro zpřístupnění upozornění potřebujete oprávnění</string>
|
||||
<string name="no_permission_mprisreceiver">Abyste byli schopni ovládat vaše přehrávače médií, musíte udělit přístup k oznámením</string>
|
||||
<string name="no_permission_mprisreceiver">Abyste byli schopni ovládat vaše přehrávače médií, musíte udělit přístup k upozorněním</string>
|
||||
<string name="no_permissions_remotekeyboard">Pro zachytávání stisků kláves je potřeba aktivovat vzdálenou klávesnici KDE Connect</string>
|
||||
<string name="send_ping">Poslat ping</string>
|
||||
<string name="open_mpris_controls">Ovládání multimédií</string>
|
||||
@@ -254,7 +254,8 @@
|
||||
<string name="addcommand_explanation2">Nové příkazy můžete přidat v nastavení systému KDE Connect</string>
|
||||
<string name="add_command_description">V pracovním prostředí můžete přidat příkazy</string>
|
||||
<string name="pref_plugin_mprisreceiver">Ovládání přehrávače médií</string>
|
||||
<string name="notification_channel_default">Ostatní oznámení</string>
|
||||
<string name="pref_plugin_mprisreceiver_desc">Ovládejte přehrávače médií na vašem telefonu z jiného zařízení</string>
|
||||
<string name="notification_channel_default">Ostatní upozornění</string>
|
||||
<string name="notification_channel_persistent">Stálý ukazatel</string>
|
||||
<string name="notification_channel_media_control">Ovládání médií</string>
|
||||
<string name="notification_channel_filetransfer">Přenos souboru</string>
|
||||
@@ -283,9 +284,9 @@
|
||||
<string name="extra_options">Další možnosti</string>
|
||||
<string name="privacy_options">Možnosti soukromí</string>
|
||||
<string name="set_privacy_options">Nastavte své možnosti soukromí</string>
|
||||
<string name="block_contents">Blokovat obsah oznámení</string>
|
||||
<string name="block_contents">Blokovat obsah upozornění</string>
|
||||
<string name="block_images">Blokovat obrázky z upozornění</string>
|
||||
<string name="notification_channel_receivenotification">Oznamování z ostatních zařízení</string>
|
||||
<string name="notification_channel_receivenotification">Upozornění z ostatních zařízení</string>
|
||||
<string name="take_picture">Spustit fotoaparát</string>
|
||||
<string name="plugin_photo_desc">Spusťte aplikaci fotoaparátu pro snadné zachytávání s přenos obrázků</string>
|
||||
<string name="no_app_for_opening">Pro otevření tohoto souboru nebyla nalezena vhodná aplikace</string>
|
||||
|
@@ -238,6 +238,7 @@
|
||||
<string name="addcommand_explanation2">Puede añadir nuevas órdenes en las preferencias del sistema de KDE Connect</string>
|
||||
<string name="add_command_description">Puede añadir órdenes en su escritorio</string>
|
||||
<string name="pref_plugin_mprisreceiver">Control del reproductor de medios</string>
|
||||
<string name="pref_plugin_mprisreceiver_desc">Controle los reproductores de medios de su teléfono desde otro dispositivo</string>
|
||||
<string name="notification_channel_default">Otras notificaciones</string>
|
||||
<string name="notification_channel_persistent">Indicador persistente</string>
|
||||
<string name="notification_channel_media_control">Control multimedia</string>
|
||||
|
@@ -11,13 +11,14 @@
|
||||
<string name="pref_plugin_sftp_desc">Gailu honen fitxategi-sistema urrunetik arakatzea ahalbidetzen du</string>
|
||||
<string name="pref_plugin_clipboard">Arbelaren sinkronizazioa</string>
|
||||
<string name="pref_plugin_clipboard_desc">Partekatu arbelaren edukia</string>
|
||||
<string name="pref_plugin_mousepad">Urruneko sarrera</string>
|
||||
<string name="pref_plugin_mousepad">Urrutiko sarrera</string>
|
||||
<string name="pref_plugin_mousepad_desc">Erabili zure telefonoa edo tableta ukimen-sagu eta teklatu gisa</string>
|
||||
<string name="pref_plugin_presenter">Diapositiba emanaldietarako telekomandoa</string>
|
||||
<string name="pref_plugin_presenter_desc">Erabili zure gailua aurkezpen bateko diapositibak aldatzeko</string>
|
||||
<string name="pref_plugin_remotekeyboard">Jaso urruneko tekla-sakatzeak</string>
|
||||
<string name="pref_plugin_remotekeyboard_desc">Jaso tekla-sakatze gertaerak urruneko gailuetatik</string>
|
||||
<string name="pref_plugin_mpris">Multimedia kontrolak</string>
|
||||
<string name="pref_plugin_mpris_desc">Zure media jotzailearen urruneko kontrola ematen dizu</string>
|
||||
<string name="pref_plugin_mpris_desc">Zure euskarri-jotzailearen urruneko kontrola ematen dizu</string>
|
||||
<string name="pref_plugin_runcommand">Exekutatu agindua</string>
|
||||
<string name="pref_plugin_runcommand_desc">Abiarazi urruneko aginduak zure telefono edo tabletatik</string>
|
||||
<string name="pref_plugin_contacts">Kontaktuen sinkronizatzailea</string>
|
||||
@@ -36,6 +37,7 @@
|
||||
<string name="open_settings">Ireki ezarpenak</string>
|
||||
<string name="no_permissions">Jakinarazpenak atzitzeko baimena eman behar duzu</string>
|
||||
<string name="no_permission_mprisreceiver">Zure euskarri-jotzaileak kontrolatu ahal izateko jakinarazpenetara atzipena eman behar diozu</string>
|
||||
<string name="no_permissions_remotekeyboard">Sakatzeak jasotzeko KDE Connecten urruneko teklatua aktibatu behar duzu</string>
|
||||
<string name="send_ping">Bidali ping</string>
|
||||
<string name="open_mpris_controls">Multimedia kontrola</string>
|
||||
<string name="remotekeyboard_editing_only_title">Erabili urruneko teklak editatzean besterik ez</string>
|
||||
@@ -96,6 +98,14 @@
|
||||
<item quantity="one">Fitxategia: %1s</item>
|
||||
<item quantity="other">(%3$d(e)tik %2$d fitxategia) : %1$s</item>
|
||||
</plurals>
|
||||
<plurals name="outgoing_file_title">
|
||||
<item quantity="one">"%2$s(r)i %1$d fitxategi bidaltzea"</item>
|
||||
<item quantity="other">"%2$s(r)i %1$d fitxategi bidaltzea"</item>
|
||||
</plurals>
|
||||
<plurals name="outgoing_files_text">
|
||||
<item quantity="one">Fitxategia: %1$s</item>
|
||||
<item quantity="other">(%3$d(e)tik %2$d. fitxategia) : %1$s</item>
|
||||
</plurals>
|
||||
<plurals name="received_files_title">
|
||||
<item quantity="one">Fitxategi bat jaso da %1$s-tik</item>
|
||||
<item quantity="other">%2$d fitxategi jaso dira %1$s-tik</item>
|
||||
@@ -104,6 +114,14 @@
|
||||
<item quantity="one">Huts egin du fitxategi bat %1$s-tik jasotzeak</item>
|
||||
<item quantity="other">Huts egin du %2$d/%3$d fitxategi %1$s-tik jasotzeak</item>
|
||||
</plurals>
|
||||
<plurals name="sent_files_title">
|
||||
<item quantity="one">Fitxategia %1$s(e)ra bidali da</item>
|
||||
<item quantity="other">%2$d fitxategi %1$s(e)ra bidali dira</item>
|
||||
</plurals>
|
||||
<plurals name="send_files_fail_title">
|
||||
<item quantity="one">Huts egin du fitxategia %1$s(e)ra bidaltzea</item>
|
||||
<item quantity="other">"Huts egin du %3$d(e)tik %2$d fitxategi %1$s(e)ra bidaltzea"</item>
|
||||
</plurals>
|
||||
<string name="received_file_text">Tak egin \'%1s\' irekitzeko</string>
|
||||
<string name="cannot_create_file">Ezin da sortu %s fitxategia</string>
|
||||
<string name="tap_to_answer">Tak egin erantzuteko</string>
|
||||
@@ -140,6 +158,10 @@
|
||||
<string name="shareplugin_text_saved">Testua jaso da, arbelean kopiatu da</string>
|
||||
<string name="custom_devices_settings">Gailuen zerrenda pertsonalizatua</string>
|
||||
<string name="custom_device_list">Gehitu gailuak IP bidez</string>
|
||||
<string name="custom_device_deleted">Norberak finkatutako gailua ezabatu da</string>
|
||||
<string name="custom_device_list_help">Zure gailua ez bada automatikoki detektatzen bere IP helbidea edo ostalari-izena gehitu dezakezu ekintza botoi mugikorrean klik eginez</string>
|
||||
<string name="custom_device_fab_hint">Gehitu gailu bat</string>
|
||||
<string name="undo">Desegin</string>
|
||||
<string name="share_notification_preference">Jakinarazpen zaratatsuak</string>
|
||||
<string name="share_notification_preference_summary">Bibratu eta jo soinua fitxategia jasotzean</string>
|
||||
<string name="share_destination_customize">Pertsonalizatu direktorio xedea</string>
|
||||
@@ -154,7 +176,27 @@
|
||||
<string name="sftp_sdcard">SD txartela</string>
|
||||
<string name="sftp_readonly">(irakurri soilik)</string>
|
||||
<string name="sftp_camera">Kamerako irudiak</string>
|
||||
<string name="no_players_connected">Ez da jokalaririk aurkitu</string>
|
||||
<string name="add_device_dialog_title">Gehitu gailua</string>
|
||||
<string name="add_device_hint">Ostalari-izena edo IP helbidea</string>
|
||||
<string name="sftp_preference_detected_sdcards">Detektatutako SD txartelak</string>
|
||||
<string name="sftp_preference_edit_sdcard_title">Editatu SD txartela</string>
|
||||
<string name="sftp_preference_configured_storage_locations">Konfiguratutako biltegiratze kokalekuak</string>
|
||||
<string name="sftp_preference_add_storage_location_title">Gehitu biltegiratze kokalekua</string>
|
||||
<string name="sftp_preference_edit_storage_location">Editatu biltegiratze kokalekua</string>
|
||||
<string name="sftp_preference_add_camera_shortcut">Gehitu kamera karpetaren lasterbidea</string>
|
||||
<string name="sftp_preference_add_camera_shortcut_summary_on">Gehitu lasterbide bat kamera karpetara</string>
|
||||
<string name="sftp_preference_add_camera_shortcut_summary_off">Ez gehitu lasterbide bat kamera karpetara</string>
|
||||
<string name="sftp_storage_preference_storage_location">Biltegiratze kokalekua</string>
|
||||
<string name="sftp_storage_preference_storage_location_already_configured">Kokaleku hau jada konfiguratuta dago</string>
|
||||
<string name="sftp_storage_preference_click_to_select">klik egin aukeratzeko</string>
|
||||
<string name="sftp_storage_preference_display_name">Azaltzeko izena</string>
|
||||
<string name="sftp_storage_preference_display_name_already_used">Azaltzeko izen hau jada erabilita dago</string>
|
||||
<string name="sftp_storage_preference_display_name_cannot_be_empty">Azaltzeko izena ezin da hutsik egon</string>
|
||||
<string name="sftp_action_mode_menu_delete">Ezabatu</string>
|
||||
<string name="sftp_no_sdcard_detected">Ez da SD txartelik detektatu</string>
|
||||
<string name="sftp_no_storage_locations_configured">Ez da biltegiratze kokalekurik konfiguratu</string>
|
||||
<string name="sftp_saf_permission_explanation">Fitxategiak urrunetik atzitzeko biltegiratze kokalekuak konfiguratu behar dituzu</string>
|
||||
<string name="no_players_connected">Ez da jotzailerik aurkitu</string>
|
||||
<string name="send_files">Bidali fitxategiak</string>
|
||||
<string name="pairing_title">KDE Connect gailuak</string>
|
||||
<string name="pairing_description">KDE Connect darabilten sareko beste gailuak hemen agertu beharko lirateke.</string>
|
||||
@@ -162,6 +204,7 @@
|
||||
<string name="device_rename_confirm">Aldatu izena</string>
|
||||
<string name="refresh">Freskatu</string>
|
||||
<string name="unreachable_description">Parekatutako gailu hau ez dago eskuragarri. Egiaztatu sare berera konektatuta dagoela.</string>
|
||||
<string name="no_wifi">Ez zaude Wi-Fi sare batera konektatuta, baliteke gailurik ez ikustea. Egin klik hemen Wi-Fia gaitzeko.</string>
|
||||
<string name="no_file_browser">Ez dago fitxategi arakatzailerik instalatuta.</string>
|
||||
<string name="pref_plugin_telepathy">Bidali SMSa</string>
|
||||
<string name="pref_plugin_telepathy_desc">Bidali testu-mezuak zure mahaigainetik</string>
|
||||
@@ -178,6 +221,7 @@
|
||||
<string name="plugins_need_optional_permission">Plugin batzuek desgaitutako eginbideak dituzte baimenak faltan dituztelako (tak egin informazio gehiagorako):</string>
|
||||
<string name="share_optional_permission_explanation">Zure telefonoa eta mahaigainaren artean fitxategiak partekatzeko telefonoaren biltegiratzea atzitzeko baimena eman behar duzu</string>
|
||||
<string name="telepathy_permission_explanation">SMSak zure mahaigainetik bidali ahal izateko, SMSak erabiltzeko baimena eman behar duzu</string>
|
||||
<string name="telephony_permission_explanation">Telefono deiak zure mahaigainetik ikusteko, telefono deien egunkarira eta telefonoaren egoerara baimena eman behar duzu</string>
|
||||
<string name="telephony_optional_permission_explanation">Telefono zenbakiaren ordez kontaktuaren izena ikusteko telefonoko kontaktuak atzitzeko baimena eman behar duzu</string>
|
||||
<string name="contacts_permission_explanation">Zure kontaktuen liburuak mahaigainarekin partekatzeko, kontaktuetara baimena eman behar duzu</string>
|
||||
<string name="select_ringtone">Hautatu dei-tonu bat</string>
|
||||
@@ -188,11 +232,13 @@
|
||||
<string name="settings_icon_description">Ezarpenen ikonoa</string>
|
||||
<string name="presenter_fullscreen">Pantaila-betea</string>
|
||||
<string name="presenter_exit">Irten aurkezpenetik</string>
|
||||
<string name="presenter_lock_tip">Zure gailua giltzatu dezakezu eta bolumen teklak botoi gisa erabili aurreko/hurrengo diapositibara joateko</string>
|
||||
<string name="add_command">Gehitu komando bat</string>
|
||||
<string name="addcommand_explanation">Ez dago komandorik erregistraturik</string>
|
||||
<string name="addcommand_explanation2">Komando berriak gehitu ditzakezu KDE Connect sistemaren ezarpenetan</string>
|
||||
<string name="add_command_description">Komandoak gehitu ditzakezu mahaigainean</string>
|
||||
<string name="pref_plugin_mprisreceiver">Euskarri-jotzailearen kontrola</string>
|
||||
<string name="pref_plugin_mprisreceiver_desc">Kontrolatu zure telefonoaren euskarri-jotzaileak beste gailu batetik</string>
|
||||
<string name="notification_channel_default">Beste jakinarazpen batzuk</string>
|
||||
<string name="notification_channel_persistent">Adierazle iraunkorra</string>
|
||||
<string name="notification_channel_media_control">Euskarrien kontrola</string>
|
||||
@@ -217,10 +263,17 @@
|
||||
<string name="settings_more_settings_title">Ezarpen gehiago</string>
|
||||
<string name="settings_more_settings_text">Gailu-bakoitzeko ezarpenak aurki daitezke \'Pluginen ezarpenak\' barruan.</string>
|
||||
<string name="setting_persistent_notification">Erakutsi jakinarazpen iraunkorra</string>
|
||||
<string name="setting_persistent_notification_oreo">Jakinarazpen iraunkorra</string>
|
||||
<string name="setting_persistent_notification_description">Sakatu gaitzeko/desgaitzeko jakinarazpen ezarpenetan</string>
|
||||
<string name="extra_options">Aukera gehigarriak</string>
|
||||
<string name="privacy_options">Pribatutasun aukerak</string>
|
||||
<string name="set_privacy_options">Ezarri zure pribatutasun aukerak</string>
|
||||
<string name="block_contents">Oztopatu jakinarazpenen edukiak</string>
|
||||
<string name="block_images">Oztopatu jakinarazpenen irudiak</string>
|
||||
<string name="notification_channel_receivenotification">Beste gailu batzuen jakinarazpenak</string>
|
||||
<string name="take_picture">Abiarazi kamera</string>
|
||||
<string name="plugin_photo_desc">Abiarazi kamerako aplikazioa argazkiak hartzeko eta transferitzeko</string>
|
||||
<string name="no_app_for_opening">Ez da fitxategi hau irekitzeko aplikazio egokirik aurkitu</string>
|
||||
<string name="remote_keyboard_service">KDE Connect urruneko teklatua</string>
|
||||
<string name="presenter_pointer">Erakuslea</string>
|
||||
</resources>
|
||||
|
@@ -230,6 +230,7 @@
|
||||
<string name="addcommand_explanation2">시스템 설정의 KDE Connect에서 새로운 명령을 추가할 수 있습니다</string>
|
||||
<string name="add_command_description">데스크톱에서 명령을 추가할 수 있습니다</string>
|
||||
<string name="pref_plugin_mprisreceiver">미디어 재생기 제어</string>
|
||||
<string name="pref_plugin_mprisreceiver_desc">다른 장치에서 휴대폰의 미디어 재생기 제어</string>
|
||||
<string name="notification_channel_default">기타 알림</string>
|
||||
<string name="notification_channel_persistent">항상 표시된 표시기</string>
|
||||
<string name="notification_channel_media_control">미디어 제어</string>
|
||||
|
@@ -220,6 +220,7 @@
|
||||
<string name="device_rename_confirm">Pervadinti</string>
|
||||
<string name="refresh">Įkelti iš naujo</string>
|
||||
<string name="unreachable_description">Šis suporuotas įrenginys nepasiekiamas. Įsitikinkite, kad jis yra prijungtas prie to paties tinklo.</string>
|
||||
<string name="no_wifi">Nesate prisijungę prie belaidžio (Wi-Fi) tinklo, taigi, galite nematyti jokių įrenginių. Spustelėkite čia, norėdami įjungti belaidį (Wi-Fi).</string>
|
||||
<string name="no_file_browser">Nėra įdiegta jokių failų tvarkytuvių.</string>
|
||||
<string name="pref_plugin_telepathy">Siųsti SMS žinutę</string>
|
||||
<string name="pref_plugin_telepathy_desc">Siųsti tekstines žinutes iš savo darbalaukio</string>
|
||||
@@ -253,6 +254,7 @@
|
||||
<string name="addcommand_explanation2">Galite pridėti naujas komandas KDE Connect sistemos nustatymuose</string>
|
||||
<string name="add_command_description">Galite pridėti komandas darbalaukyje</string>
|
||||
<string name="pref_plugin_mprisreceiver">Medijos leistuvės valdymas</string>
|
||||
<string name="pref_plugin_mprisreceiver_desc">Valdyti savo telefono medijos leistuves iš kito įrenginio</string>
|
||||
<string name="notification_channel_default">Kiti pranešimai</string>
|
||||
<string name="notification_channel_persistent">Pastovus indikatorius</string>
|
||||
<string name="notification_channel_media_control">Įvairialypės terpės valdymas</string>
|
||||
|
@@ -259,7 +259,7 @@
|
||||
<string name="all">Alles</string>
|
||||
<string name="devices">Apparaten</string>
|
||||
<string name="settings_rename">Apparaatnaam</string>
|
||||
<string name="settings_dark_mode">Donker themea</string>
|
||||
<string name="settings_dark_mode">Donker thema</string>
|
||||
<string name="settings_more_settings_title">Meer instellingen</string>
|
||||
<string name="settings_more_settings_text">Instellingen per apparaat kunnen gevonden worden onder \'Plug-in-instellingen\' vanuit een apparaat.</string>
|
||||
<string name="setting_persistent_notification">Blijvende melding tonen</string>
|
||||
|
@@ -238,6 +238,7 @@
|
||||
<string name="addcommand_explanation2">Du kan leggja til nye kommandoar i systeminnstillingane til KDE Connect</string>
|
||||
<string name="add_command_description">Du kan leggja til kommandoar på skrivebordet</string>
|
||||
<string name="pref_plugin_mprisreceiver">Mediespelarkontrollar</string>
|
||||
<string name="pref_plugin_mprisreceiver_desc">Kontroller mediespelarar på telefonen din frå ei anna eining</string>
|
||||
<string name="notification_channel_default">Andre varslingar</string>
|
||||
<string name="notification_channel_persistent">Evigvarande varslingar</string>
|
||||
<string name="notification_channel_media_control">Mediestyring</string>
|
||||
|
@@ -11,8 +11,8 @@
|
||||
<string name="pref_plugin_sftp_desc">Daje dostęp do plików innemu urządzeniu</string>
|
||||
<string name="pref_plugin_clipboard">Synchronizacja schowka</string>
|
||||
<string name="pref_plugin_clipboard_desc">Udostępnia zawartość schowka</string>
|
||||
<string name="pref_plugin_mousepad">Zdalne sterowanie</string>
|
||||
<string name="pref_plugin_mousepad_desc">Wykorzystuje ekran jako mysz i klawiaturę</string>
|
||||
<string name="pref_plugin_mousepad">Sterowanie z urządzenia przenośnego</string>
|
||||
<string name="pref_plugin_mousepad_desc">Telefon lub tablet służy jako gładzik i klawiatura</string>
|
||||
<string name="pref_plugin_presenter">Sterowanie pokazem przeźroczy</string>
|
||||
<string name="pref_plugin_presenter_desc">Przełącza przeźrocza przy użyciu telefonu</string>
|
||||
<string name="pref_plugin_remotekeyboard">Odbieranie zdalnych naciśnięć klawiszy</string>
|
||||
@@ -29,8 +29,8 @@
|
||||
<string name="pref_plugin_notifications_desc">Wysyła powiadomienia na inne urządzenia</string>
|
||||
<string name="pref_plugin_receive_notifications">Odbieranie powiadomień</string>
|
||||
<string name="pref_plugin_receive_notifications_desc">Odbiera powiadomienia z innych urządzeń</string>
|
||||
<string name="pref_plugin_sharereceiver">Udostępnianie i odbieranie</string>
|
||||
<string name="pref_plugin_sharereceiver_desc">Współdzieli pliki i adresy URL pomiędzy urządzeniami</string>
|
||||
<string name="pref_plugin_sharereceiver">Udostępnianie i pobieranie</string>
|
||||
<string name="pref_plugin_sharereceiver_desc">Udostępnia pliki i adresy URL pomiędzy urządzeniami</string>
|
||||
<string name="device_list_empty">Brak urządzeń</string>
|
||||
<string name="ok">OK</string>
|
||||
<string name="cancel">Zaniechaj</string>
|
||||
@@ -224,10 +224,10 @@
|
||||
<string name="no_file_browser">Nie wgrano żadnych przeglądarek plików.</string>
|
||||
<string name="pref_plugin_telepathy">Wysyłanie SMSów</string>
|
||||
<string name="pref_plugin_telepathy_desc">Wysyła wiadomość tekstową z komputera</string>
|
||||
<string name="findmyphone_title">Znajdź mój telefon</string>
|
||||
<string name="findmyphone_title_tablet">Znajdź mój tablet</string>
|
||||
<string name="findmyphone_title_tv">Znajdź mój telewizor</string>
|
||||
<string name="findmyphone_description">Dzwoni na dane urządzenie, tak abyś mógł je znaleźć.</string>
|
||||
<string name="findmyphone_title">Poszukiwania telefonu</string>
|
||||
<string name="findmyphone_title_tablet">Poszukiwania tabletu</string>
|
||||
<string name="findmyphone_title_tv">Poszukiwania telewizora</string>
|
||||
<string name="findmyphone_description">Dzwoni na dane urządzenie, aby można je odnaleźć.</string>
|
||||
<string name="findmyphone_found">Znaleziony</string>
|
||||
<string name="open">Otwórz</string>
|
||||
<string name="close">Zamknij</string>
|
||||
@@ -266,8 +266,8 @@
|
||||
<string name="runcommand_notpaired">Urządzenie jest niesparowane</string>
|
||||
<string name="runcommand_nosuchdevice">Nie ma takiego urządzenia</string>
|
||||
<string name="runcommand_noruncommandplugin">To urządzenie nie ma włączonej wtyczki wykonywania poleceń</string>
|
||||
<string name="pref_plugin_findremotedevice">Znajdź swoje urządzenie zdalne</string>
|
||||
<string name="pref_plugin_findremotedevice_desc">Zadzwoń na urządzenie zdalne</string>
|
||||
<string name="pref_plugin_findremotedevice">Poszukiwania urządzenia przenośnego</string>
|
||||
<string name="pref_plugin_findremotedevice_desc">Dzwoni na urządzenie przenośne</string>
|
||||
<string name="ring">Zadzwoń</string>
|
||||
<string name="pref_plugin_systemvolume">Głośność systemowa</string>
|
||||
<string name="pref_plugin_systemvolume_desc">Sterowanie głośnością systemu zdalnego urządzenia</string>
|
||||
|
@@ -230,6 +230,7 @@
|
||||
<string name="addcommand_explanation2">您可以在 KDE Connect 系统设置中添加新命令</string>
|
||||
<string name="add_command_description">您可以在桌面添加新命令</string>
|
||||
<string name="pref_plugin_mprisreceiver">控制媒体播放器</string>
|
||||
<string name="pref_plugin_mprisreceiver_desc">从其他设备控制您的手机的播放器</string>
|
||||
<string name="notification_channel_default">其他通知</string>
|
||||
<string name="notification_channel_persistent">持久性通知</string>
|
||||
<string name="notification_channel_media_control">媒体控制</string>
|
||||
|
@@ -45,7 +45,7 @@
|
||||
<string name="remotekeyboard_connected">遠端鍵盤連線為啟用狀態</string>
|
||||
<string name="remotekeyboard_multiple_connections">這裡有兩個以上的遠端鍵盤連結,選擇一個裝置以設定。</string>
|
||||
<string name="open_mousepad">遠端輸入</string>
|
||||
<string name="mousepad_info">在您的智慧型手機的螢幕上移動手指頭,用來控制電腦螢幕的鼠標。按一下表示滑鼠的左鍵,使用兩隻/三隻手指頭按一下來表示滑鼠的右鍵/中鍵。使用兩隻手指頭捲動。長按則表示要拖拉。</string>
|
||||
<string name="mousepad_info">在您的智慧型手機的螢幕上移動手指頭,用來控制電腦螢幕的游標。按一下表示滑鼠的左鍵,使用兩隻/三隻手指頭按一下來表示滑鼠的右鍵/中鍵。使用兩隻手指頭捲動。長按則表示要拖拉。</string>
|
||||
<string name="mousepad_double_tap_settings_title">設定兩隻手指頭按一下的動作</string>
|
||||
<string name="mousepad_triple_tap_settings_title">設定三隻手指頭按一下的動作</string>
|
||||
<string name="mousepad_sensitivity_settings_title">設定觸碰板的靈敏度</string>
|
||||
|
@@ -76,6 +76,9 @@ public class LanLinkProvider extends BaseLinkProvider implements LanLink.LinkDis
|
||||
private ServerSocket tcpServer;
|
||||
private DatagramSocket udpServer;
|
||||
|
||||
private long lastBroadcast = 0;
|
||||
private final static long delayBetweenBroadcasts = 500;
|
||||
|
||||
private boolean listening = false;
|
||||
|
||||
// To prevent infinte loop between Android < IceCream because both device can only broadcast identity package but cannot connect via TCP
|
||||
@@ -355,6 +358,12 @@ public class LanLinkProvider extends BaseLinkProvider implements LanLink.LinkDis
|
||||
}
|
||||
|
||||
private void broadcastUdpPacket() {
|
||||
if (System.currentTimeMillis() < lastBroadcast + delayBetweenBroadcasts) {
|
||||
Log.i("LanLinkProvider", "broadcastUdpPacket: relax cowboy");
|
||||
return;
|
||||
}
|
||||
lastBroadcast = System.currentTimeMillis();
|
||||
|
||||
new Thread(() -> {
|
||||
ArrayList<String> iplist = CustomDevicesActivity
|
||||
.getCustomDeviceList(PreferenceManager.getDefaultSharedPreferences(context));
|
||||
|
@@ -33,8 +33,8 @@ import android.util.Base64OutputStream;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.collection.LongSparseArray;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
@@ -52,6 +52,7 @@ import java.util.Set;
|
||||
|
||||
public class ContactsHelper {
|
||||
|
||||
static final String LOG_TAG = "ContactsHelper";
|
||||
|
||||
/**
|
||||
* Lookup the name and photoID of a contact given a phone number
|
||||
@@ -103,7 +104,7 @@ public class ContactsHelper {
|
||||
}
|
||||
return encodedPhoto.toString();
|
||||
} catch (Exception ex) {
|
||||
Log.e("ContactsHelper", ex.toString());
|
||||
Log.e(LOG_TAG, ex.toString());
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@@ -140,7 +141,7 @@ public class ContactsHelper {
|
||||
} else {
|
||||
// Something went wrong with this contact
|
||||
// If you are experiencing this, please open a bug report indicating how you got here
|
||||
Log.e("ContactsHelper", "Got a contact which does not have a LOOKUP_KEY");
|
||||
Log.e(LOG_TAG, "Got a contact which does not have a LOOKUP_KEY");
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -155,59 +156,7 @@ public class ContactsHelper {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get VCards using the batch database query which requires Android API 21
|
||||
*
|
||||
* @param context android.content.Context running the request
|
||||
* @param IDs collection of raw contact IDs to look up
|
||||
* @param lookupKeys
|
||||
* @return Mapping of raw contact IDs to corresponding VCard
|
||||
*/
|
||||
@SuppressWarnings("ALL") // Since this method is busted anyway
|
||||
@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
@Deprecated
|
||||
protected static Map<Long, VCardBuilder> getVCardsFast(Context context, Collection<Long> IDs, Map<Long, String> lookupKeys) {
|
||||
LongSparseArray<VCardBuilder> toReturn = new LongSparseArray<>();
|
||||
StringBuilder keys = new StringBuilder();
|
||||
|
||||
List<Long> orderedIDs = new ArrayList<>(IDs);
|
||||
|
||||
for (Long ID : orderedIDs) {
|
||||
String key = lookupKeys.get(ID);
|
||||
keys.append(key);
|
||||
keys.append(':');
|
||||
}
|
||||
|
||||
// Remove trailing ':'
|
||||
keys.deleteCharAt(keys.length() - 1);
|
||||
|
||||
Uri vcardURI = Uri.withAppendedPath(
|
||||
ContactsContract.Contacts.CONTENT_MULTI_VCARD_URI,
|
||||
Uri.encode(keys.toString()));
|
||||
|
||||
;
|
||||
StringBuilder vcardJumble = new StringBuilder();
|
||||
try (InputStream input = context.getContentResolver().openInputStream(vcardURI)) {
|
||||
BufferedReader bufferedInput = new BufferedReader(new InputStreamReader(input));
|
||||
String line;
|
||||
while ((line = bufferedInput.readLine()) != null) {
|
||||
vcardJumble.append(line).append('\n');
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// If you are experiencing this, please open a bug report indicating how you got here
|
||||
Log.e("Contacts", "Exception while fetching vcards", e);
|
||||
}
|
||||
|
||||
// At this point we are screwed:
|
||||
// There is no way to figure out, given the lookup we just made, which VCard belonges
|
||||
// to which ID. They appear to be in the same order as the request was made, but this
|
||||
// is (provably) unreliable. I am leaving this code in case it is useful, but unless
|
||||
// Android improves their API there is nothing we can do with it
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get VCards using serial database lookups. This is tragically slow, but the faster method using
|
||||
* Get VCards using serial database lookups. This is tragically slow, so call only when needed.
|
||||
*
|
||||
* There is a faster API specified using ContactsContract.Contacts.CONTENT_MULTI_VCARD_URI,
|
||||
* but there does not seem to be a way to figure out which ID resulted in which VCard using that API
|
||||
@@ -263,97 +212,110 @@ public class ContactsHelper {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a mapping of contact IDs to a map of the requested data from the Contacts database
|
||||
* <p>
|
||||
* If for some reason there is no row associated with the contact ID in the database,
|
||||
* there will not be a corresponding field in the returned map
|
||||
* Get the last-modified timestamp for every contact in the database
|
||||
*
|
||||
* @param context android.content.Context running the request
|
||||
* @param IDs collection of contact uIDs to look up
|
||||
* @param contactsProjection List of column names to extract, defined in ContactsContract.Contacts
|
||||
* @param context android.content.Context running the request
|
||||
* @return Mapping of contact uID to last-modified timestamp
|
||||
*/
|
||||
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2) // Need API 18 for contact timestamps
|
||||
public static Map<uID, Long> getAllContactTimestamps(Context context) {
|
||||
String[] projection = { uID.COLUMN, ContactsContract.Contacts.CONTACT_LAST_UPDATED_TIMESTAMP };
|
||||
|
||||
Map<uID, Map<String, String>> databaseValues = accessContactsDatabase(context, projection, null, null, null);
|
||||
|
||||
Map<uID, Long> timestamps = new HashMap<>();
|
||||
for (uID contactID : databaseValues.keySet()) {
|
||||
Map<String, String> data = databaseValues.get(contactID);
|
||||
timestamps.put(
|
||||
contactID,
|
||||
Long.parseLong(data.get(ContactsContract.Contacts.CONTACT_LAST_UPDATED_TIMESTAMP))
|
||||
);
|
||||
}
|
||||
|
||||
return timestamps;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the last-modified timestamp for the specified contact
|
||||
*
|
||||
* @param context android.content.Context running the request
|
||||
* @param contactID Contact uID to read
|
||||
* @throws ContactNotFoundException If the given ID for some reason does not match a contact
|
||||
* @return Last-modified timestamp of the contact
|
||||
*/
|
||||
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2) // Need API 18 for contact timestamps
|
||||
public static Long getContactTimestamp(Context context, uID contactID) throws ContactNotFoundException {
|
||||
String[] projection = { uID.COLUMN, ContactsContract.Contacts.CONTACT_LAST_UPDATED_TIMESTAMP };
|
||||
String selection = uID.COLUMN + " = ?";
|
||||
String[] selectionArgs = { contactID.toString() };
|
||||
|
||||
Map<uID, Map<String, String>> databaseValue = accessContactsDatabase(context, projection, selection, selectionArgs, null);
|
||||
|
||||
if (databaseValue.size() == 0) {
|
||||
throw new ContactNotFoundException("Querying for contact with id " + contactID + " returned no results.");
|
||||
}
|
||||
|
||||
if (databaseValue.size() != 1) {
|
||||
Log.w(LOG_TAG, "Received an improper number of return values from the database in getContactTimestamp: " + databaseValue.size());
|
||||
}
|
||||
|
||||
Long timestamp = Long.parseLong(databaseValue.get(contactID).get(ContactsContract.Contacts.CONTACT_LAST_UPDATED_TIMESTAMP));
|
||||
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a mapping of contact IDs to a map of the requested data from the Contacts database.
|
||||
*
|
||||
* @param context android.content.Context running the request
|
||||
* @param projection List of column names to extract, defined in ContactsContract.Contacts. Must contain uID.COLUMN
|
||||
* @param selection Parameterizable filter to use with the ContentResolver query. May be null.
|
||||
* @param selectionArgs Parameters for selection. May be null.
|
||||
* @param sortOrder Sort order to request from the ContentResolver query. May be null.
|
||||
* @return mapping of contact uIDs to desired values, which are a mapping of column names to the data contained there
|
||||
*/
|
||||
@TargetApi(Build.VERSION_CODES.HONEYCOMB) // Needed for Cursor.getType(..)
|
||||
public static Map<uID, Map<String, Object>> getColumnsFromContactsForIDs(Context context, Collection<uID> IDs, String[] contactsProjection) {
|
||||
HashMap<uID, Map<String, Object>> toReturn = new HashMap<>();
|
||||
|
||||
if (IDs.isEmpty()) {
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
private static Map<uID, Map<String, String>> accessContactsDatabase(
|
||||
@NonNull Context context,
|
||||
@NonNull String[] projection,
|
||||
@Nullable String selection,
|
||||
@Nullable String[] selectionArgs,
|
||||
@Nullable String sortOrder
|
||||
) {
|
||||
Uri contactsUri = ContactsContract.Contacts.CONTENT_URI;
|
||||
|
||||
// Regardless of whether it was requested, we need to look up the uID column
|
||||
Set<String> lookupProjection = new HashSet<>(Arrays.asList(contactsProjection));
|
||||
lookupProjection.add(uID.COLUMN);
|
||||
|
||||
// We need a selection which looks like "<column> IN(?,?,...?)" with one ? per ID
|
||||
StringBuilder contactsSelection = new StringBuilder(uID.COLUMN);
|
||||
contactsSelection.append(" IN(");
|
||||
|
||||
for (int i = 0; i < IDs.size(); i++) {
|
||||
contactsSelection.append("?,");
|
||||
}
|
||||
// Remove trailing comma
|
||||
contactsSelection.deleteCharAt(contactsSelection.length() - 1);
|
||||
contactsSelection.append(")");
|
||||
|
||||
// We need selection arguments as simply a String representation of each ID
|
||||
List<String> contactsArgs = new ArrayList<>();
|
||||
for (uID ID : IDs) {
|
||||
contactsArgs.add(ID.toString());
|
||||
}
|
||||
HashMap<uID, Map<String, String>> toReturn = new HashMap<>();
|
||||
|
||||
try (Cursor contactsCursor = context.getContentResolver().query(
|
||||
contactsUri,
|
||||
lookupProjection.toArray(new String[0]),
|
||||
contactsSelection.toString(),
|
||||
contactsArgs.toArray(new String[0]),
|
||||
null
|
||||
projection,
|
||||
selection,
|
||||
selectionArgs,
|
||||
sortOrder
|
||||
)) {
|
||||
if (contactsCursor != null && contactsCursor.moveToFirst()) {
|
||||
do {
|
||||
Map<String, Object> requestedData = new HashMap<>();
|
||||
Map<String, String> requestedData = new HashMap<>();
|
||||
|
||||
int lookupKeyIdx = contactsCursor.getColumnIndexOrThrow(uID.COLUMN);
|
||||
String lookupKey = contactsCursor.getString(lookupKeyIdx);
|
||||
int uIDIndex = contactsCursor.getColumnIndexOrThrow(uID.COLUMN);
|
||||
uID uID = new uID(contactsCursor.getString(uIDIndex));
|
||||
|
||||
// For each column, collect the data from that column
|
||||
for (String column : contactsProjection) {
|
||||
for (String column : projection) {
|
||||
int index = contactsCursor.getColumnIndex(column);
|
||||
// Since we might be getting various kinds of data, Object is the best we can do
|
||||
Object data;
|
||||
int type;
|
||||
String data;
|
||||
if (index == -1) {
|
||||
// This contact didn't have the requested column? Something is very wrong.
|
||||
// If you are experiencing this, please open a bug report indicating how you got here
|
||||
Log.e("ContactsHelper", "Got a contact which does not have a requested column");
|
||||
Log.e(LOG_TAG, "Got a contact which does not have a requested column");
|
||||
continue;
|
||||
}
|
||||
|
||||
type = contactsCursor.getType(index);
|
||||
switch (type) {
|
||||
case Cursor.FIELD_TYPE_INTEGER:
|
||||
data = contactsCursor.getInt(index);
|
||||
break;
|
||||
case Cursor.FIELD_TYPE_FLOAT:
|
||||
data = contactsCursor.getFloat(index);
|
||||
break;
|
||||
case Cursor.FIELD_TYPE_STRING:
|
||||
data = contactsCursor.getString(index);
|
||||
break;
|
||||
case Cursor.FIELD_TYPE_BLOB:
|
||||
data = contactsCursor.getBlob(index);
|
||||
break;
|
||||
default:
|
||||
Log.e("ContactsHelper", "Got an undefined type of column " + column);
|
||||
continue;
|
||||
}
|
||||
data = contactsCursor.getString(index);
|
||||
|
||||
requestedData.put(column, data);
|
||||
}
|
||||
|
||||
toReturn.put(new uID(lookupKey), requestedData);
|
||||
toReturn.put(uID, requestedData);
|
||||
} while (contactsCursor.moveToNext());
|
||||
}
|
||||
}
|
||||
@@ -443,4 +405,17 @@ public class ContactsHelper {
|
||||
return contactLookupKey.equals(other);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Exception to indicate that a specified contact was not found
|
||||
*/
|
||||
public static class ContactNotFoundException extends Exception {
|
||||
public ContactNotFoundException(uID contactID) {
|
||||
super("Unable to find contact with ID " + contactID);
|
||||
}
|
||||
|
||||
public ContactNotFoundException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -114,8 +114,7 @@ public class SMSHelper {
|
||||
// By my understanding, "simple=true" means we can't support multi-target messages.
|
||||
// Go complain to Samsung about their annoying OS changes!
|
||||
if ("Samsung".equalsIgnoreCase(Build.MANUFACTURER)) {
|
||||
Log.i("SMSHelper", "Samsung compatibility mode enabled. This may cause some features to not work properly.");
|
||||
return Uri.parse("content://mms-sms/conversations?simple=true");
|
||||
Log.i("SMSHelper", "This appears to be a Samsung device. This may cause some features to not work properly.");
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
@@ -187,6 +186,41 @@ public class SMSHelper {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if device supports `Telephony.Sms.SUBSCRIPTION_ID` column in database with URI `uri`
|
||||
*
|
||||
* @param uri Uri indicating the messages database to check
|
||||
* @param context android.content.Context running the request.
|
||||
*/
|
||||
private static boolean getSubscriptionIdSupport(@NonNull Uri uri, @NonNull Context context) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP_MR1) {
|
||||
return false;
|
||||
}
|
||||
// Some (Xiaomi) devices running >= Android Lollipop (SDK 22+) don't support
|
||||
// `Telephony.Sms.SUBSCRIPTION_ID`, so additional check is needed.
|
||||
// It may be possible to use "sim_id" instead of "sub_id" on these devices
|
||||
// https://stackoverflow.com/a/38152331/6509200
|
||||
try (Cursor availableColumnsCursor = context.getContentResolver().query(
|
||||
uri,
|
||||
new String[] {Telephony.Sms.SUBSCRIPTION_ID},
|
||||
null,
|
||||
null,
|
||||
null)
|
||||
) {
|
||||
if (availableColumnsCursor != null) {
|
||||
return true; // if we got the cursor, the query shouldn't fail
|
||||
}
|
||||
return false;
|
||||
} catch (SQLiteException e) {
|
||||
// With uri content://mms-sms/conversations this query throws an exception if sub_id is not supported
|
||||
String errMessage = e.getMessage();
|
||||
if (errMessage != null && errMessage.contains(Telephony.Sms.SUBSCRIPTION_ID)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets messages which match the selection
|
||||
*
|
||||
@@ -215,7 +249,7 @@ public class SMSHelper {
|
||||
Set<String> allColumns = new HashSet<>();
|
||||
allColumns.addAll(Arrays.asList(Message.smsColumns));
|
||||
allColumns.addAll(Arrays.asList(Message.mmsColumns));
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) {
|
||||
if (getSubscriptionIdSupport(uri, context)) {
|
||||
allColumns.addAll(Arrays.asList(Message.multiSIMColumns));
|
||||
}
|
||||
|
||||
@@ -372,7 +406,8 @@ public class SMSHelper {
|
||||
int read = Integer.parseInt(messageInfo.get(Message.READ));
|
||||
@NonNull ThreadID threadID = new ThreadID(Long.parseLong(messageInfo.get(Message.THREAD_ID)));
|
||||
long uID = Long.parseLong(messageInfo.get(Message.U_ID));
|
||||
int subscriptionID = Integer.parseInt(messageInfo.get(Message.SUBSCRIPTION_ID));
|
||||
int subscriptionID = messageInfo.get(Message.SUBSCRIPTION_ID) != null ?
|
||||
Integer.parseInt(messageInfo.get(Message.SUBSCRIPTION_ID)) : 0;
|
||||
|
||||
return new Message(
|
||||
address,
|
||||
@@ -404,7 +439,8 @@ public class SMSHelper {
|
||||
int read = Integer.parseInt(messageInfo.get(Message.READ));
|
||||
@NonNull ThreadID threadID = new ThreadID(Long.parseLong(messageInfo.get(Message.THREAD_ID)));
|
||||
long uID = Long.parseLong(messageInfo.get(Message.U_ID));
|
||||
int subscriptionID = Integer.parseInt(messageInfo.get(Message.SUBSCRIPTION_ID));
|
||||
int subscriptionID = messageInfo.get(Message.SUBSCRIPTION_ID) != null ?
|
||||
Integer.parseInt(messageInfo.get(Message.SUBSCRIPTION_ID)) : 0;
|
||||
|
||||
String[] columns = {
|
||||
Telephony.Mms.Part._ID, // The content ID of this part
|
||||
|
@@ -108,6 +108,13 @@ public class NetworkPacket {
|
||||
return mBody.optInt(key, defaultValue);
|
||||
}
|
||||
|
||||
public void set(String key, int value) {
|
||||
try {
|
||||
mBody.put(key, value);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
public long getLong(String key) {
|
||||
return mBody.optLong(key, -1);
|
||||
}
|
||||
@@ -116,7 +123,7 @@ public class NetworkPacket {
|
||||
return mBody.optLong(key, defaultValue);
|
||||
}
|
||||
|
||||
public void set(String key, int value) {
|
||||
public void set(String key, long value) {
|
||||
try {
|
||||
mBody.put(key, value);
|
||||
} catch (Exception ignored) {
|
||||
|
@@ -26,12 +26,12 @@ package org.kde.kdeconnect.Plugins.ContactsPlugin;
|
||||
import android.Manifest;
|
||||
import android.annotation.TargetApi;
|
||||
import android.os.Build;
|
||||
import android.provider.ContactsContract;
|
||||
import android.util.Log;
|
||||
|
||||
import org.kde.kdeconnect.Helpers.ContactsHelper;
|
||||
import org.kde.kdeconnect.Helpers.ContactsHelper.VCardBuilder;
|
||||
import org.kde.kdeconnect.Helpers.ContactsHelper.uID;
|
||||
import org.kde.kdeconnect.Helpers.ContactsHelper.ContactNotFoundException;
|
||||
import org.kde.kdeconnect.NetworkPacket;
|
||||
import org.kde.kdeconnect.Plugins.Plugin;
|
||||
import org.kde.kdeconnect.Plugins.PluginFactory;
|
||||
@@ -141,9 +141,10 @@ public class ContactsPlugin extends Plugin {
|
||||
*
|
||||
* @param vcard vcard to apply metadata to
|
||||
* @param uID uID to which the vcard corresponds
|
||||
* @throws ContactNotFoundException If the given ID for some reason does not match a contact
|
||||
* @return The same VCard as was passed in, but now with KDE Connect-specific fields
|
||||
*/
|
||||
private VCardBuilder addVCardMetadata(VCardBuilder vcard, uID uID) {
|
||||
private VCardBuilder addVCardMetadata(VCardBuilder vcard, uID uID) throws ContactNotFoundException {
|
||||
// Append the device ID line
|
||||
// Unclear if the deviceID forms a valid name per the vcard spec. Worry about that later..
|
||||
vcard.appendLine("X-KDECONNECT-ID-DEV-" + device.getDeviceId(),
|
||||
@@ -151,16 +152,9 @@ public class ContactsPlugin extends Plugin {
|
||||
|
||||
// Build the timestamp line
|
||||
// Maybe one day this should be changed into the vcard-standard REV key
|
||||
List<uID> uIDs = new ArrayList<>();
|
||||
uIDs.add(uID);
|
||||
|
||||
final String[] contactsProjection = new String[]{
|
||||
ContactsContract.Contacts.CONTACT_LAST_UPDATED_TIMESTAMP
|
||||
};
|
||||
|
||||
Map<uID, Map<String, Object>> timestamp = ContactsHelper.getColumnsFromContactsForIDs(context, uIDs, contactsProjection);
|
||||
Long timestamp = ContactsHelper.getContactTimestamp(context, uID);
|
||||
vcard.appendLine("X-KDECONNECT-TIMESTAMP",
|
||||
timestamp.get(uID).get(ContactsContract.Contacts.CONTACT_LAST_UPDATED_TIMESTAMP).toString());
|
||||
timestamp.toString());
|
||||
|
||||
return vcard;
|
||||
}
|
||||
@@ -178,26 +172,19 @@ public class ContactsPlugin extends Plugin {
|
||||
private boolean handleRequestAllUIDsTimestamps(@SuppressWarnings("unused") NetworkPacket np) {
|
||||
NetworkPacket reply = new NetworkPacket(PACKET_TYPE_CONTACTS_RESPONSE_UIDS_TIMESTAMPS);
|
||||
|
||||
List<uID> uIDs = ContactsHelper.getAllContactContactIDs(context);
|
||||
Map<uID, Long> uIDsToTimestamps = ContactsHelper.getAllContactTimestamps(context);
|
||||
|
||||
List<String> uIDsAsStrings = new ArrayList<>(uIDs.size());
|
||||
int contactCount = uIDsToTimestamps.size();
|
||||
|
||||
for (uID uID : uIDs) {
|
||||
uIDsAsStrings.add(uID.toString());
|
||||
List<String> uIDs = new ArrayList<>(contactCount);
|
||||
|
||||
for (uID contactID : uIDsToTimestamps.keySet()) {
|
||||
Long timestamp = uIDsToTimestamps.get(contactID);
|
||||
reply.set(contactID.toString(), timestamp);
|
||||
uIDs.add(contactID.toString());
|
||||
}
|
||||
|
||||
final String[] contactsProjection = new String[]{
|
||||
ContactsContract.Contacts.CONTACT_LAST_UPDATED_TIMESTAMP
|
||||
};
|
||||
|
||||
reply.set("uids", uIDsAsStrings);
|
||||
|
||||
// Add last-modified timestamps
|
||||
Map<uID, Map<String, Object>> uIDsToTimestamps = ContactsHelper.getColumnsFromContactsForIDs(context, uIDs, contactsProjection);
|
||||
for (uID ID : uIDsToTimestamps.keySet()) {
|
||||
Map<String, Object> data = uIDsToTimestamps.get(ID);
|
||||
reply.set(ID.toString(), (Integer) data.get(ContactsContract.Contacts.CONTACT_LAST_UPDATED_TIMESTAMP));
|
||||
}
|
||||
reply.set("uids", uIDs);
|
||||
|
||||
device.sendPacket(reply);
|
||||
|
||||
@@ -230,12 +217,17 @@ public class ContactsPlugin extends Plugin {
|
||||
for (uID uID : uIDsToVCards.keySet()) {
|
||||
VCardBuilder vcard = uIDsToVCards.get(uID);
|
||||
|
||||
vcard = this.addVCardMetadata(vcard, uID);
|
||||
try {
|
||||
vcard = this.addVCardMetadata(vcard, uID);
|
||||
|
||||
// Store this as a valid uID
|
||||
uIDsAsStrings.add(uID.toString());
|
||||
// Add the uid -> vcard pairing to the packet
|
||||
reply.set(uID.toString(), vcard.toString());
|
||||
// Store this as a valid uID
|
||||
uIDsAsStrings.add(uID.toString());
|
||||
// Add the uid -> vcard pairing to the packet
|
||||
reply.set(uID.toString(), vcard.toString());
|
||||
|
||||
} catch (ContactsHelper.ContactNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
// Add the valid uIDs to the packet
|
||||
|
@@ -116,6 +116,11 @@ public class MprisMediaSession implements SharedPreferences.OnSharedPreferenceCh
|
||||
public void onStop() {
|
||||
notificationPlayer.stop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSeekTo(long pos) {
|
||||
notificationPlayer.setPosition((int) pos);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -425,6 +430,13 @@ public class MprisMediaSession implements SharedPreferences.OnSharedPreferenceCh
|
||||
playbackActions |= PlaybackStateCompat.ACTION_SKIP_TO_NEXT;
|
||||
++numActions;
|
||||
}
|
||||
// Documentation says that this was added in Lollipop (21) but we had crashes on Marshmallow (23)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
if (notificationPlayer.isSeekAllowed()) {
|
||||
playbackActions |= PlaybackStateCompat.ACTION_SEEK_TO;
|
||||
++numActions;
|
||||
}
|
||||
}
|
||||
playbackState.setActions(playbackActions);
|
||||
mediaSession.setPlaybackState(playbackState.build());
|
||||
|
||||
|
@@ -199,7 +199,7 @@ public class NotificationFilterActivity extends AppCompatActivity {
|
||||
compoundButton.isChecked()));
|
||||
|
||||
ad.cancel();
|
||||
myBuilder.create().show();
|
||||
myBuilder.show();
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
@@ -184,7 +184,8 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
||||
if ((notification.flags & Notification.FLAG_FOREGROUND_SERVICE) != 0
|
||||
|| (notification.flags & Notification.FLAG_ONGOING_EVENT) != 0
|
||||
|| (notification.flags & Notification.FLAG_LOCAL_ONLY) != 0
|
||||
|| (notification.flags & NotificationCompat.FLAG_GROUP_SUMMARY) != 0) //The notification that groups other notifications
|
||||
|| (notification.flags & NotificationCompat.FLAG_GROUP_SUMMARY) != 0 //The notification that groups other notifications
|
||||
)
|
||||
{
|
||||
//This is not a notification we want!
|
||||
return;
|
||||
@@ -237,6 +238,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
||||
np.set("actions", extractActions(notification, key));
|
||||
|
||||
np.set("id", key);
|
||||
np.set("silent", (notification.flags & NotificationCompat.FLAG_ONLY_ALERT_ONCE) != 0);
|
||||
np.set("isClearable", statusBarNotification.isClearable());
|
||||
np.set("appName", appName == null ? packageName : appName);
|
||||
np.set("time", Long.toString(statusBarNotification.getPostTime()));
|
||||
@@ -369,7 +371,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
||||
for (Parcelable p : ms) {
|
||||
Bundle m = (Bundle) p;
|
||||
|
||||
if (isGroupConversation) {
|
||||
if (isGroupConversation && m.containsKey("sender")) {
|
||||
messagesBuilder.append(m.get("sender"));
|
||||
messagesBuilder.append(": ");
|
||||
}
|
||||
|
@@ -118,14 +118,12 @@ public class RunCommandActivity extends AppCompatActivity {
|
||||
|
||||
addCommandButton.setOnClickListener(v -> BackgroundService.RunWithPlugin(RunCommandActivity.this, deviceId, RunCommandPlugin.class, plugin -> {
|
||||
plugin.sendSetupPacket();
|
||||
AlertDialog dialog = new AlertDialog.Builder(RunCommandActivity.this)
|
||||
new AlertDialog.Builder(RunCommandActivity.this)
|
||||
.setTitle(R.string.add_command)
|
||||
.setMessage(R.string.add_command_description)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.create();
|
||||
dialog.show();
|
||||
.show();
|
||||
}));
|
||||
|
||||
updateView();
|
||||
}
|
||||
|
||||
|
@@ -149,7 +149,7 @@ public class CompositeReceiveFileJob extends BackgroundJob<Device, Void> {
|
||||
|
||||
setProgress((int)prevProgressPercentage);
|
||||
|
||||
fileDocument = getDocumentFileFor(currentFileName, currentNetworkPacket.getBoolean("open"));
|
||||
fileDocument = getDocumentFileFor(currentFileName, currentNetworkPacket.getBoolean("open", false));
|
||||
|
||||
if (currentNetworkPacket.hasPayload()) {
|
||||
outputStream = new BufferedOutputStream(getDevice().getContext().getContentResolver().openOutputStream(fileDocument.getUri()));
|
||||
|
@@ -185,9 +185,9 @@ public class SharePlugin extends Plugin {
|
||||
CompositeReceiveFileJob job;
|
||||
|
||||
boolean hasNumberOfFiles = np.has(KEY_NUMBER_OF_FILES);
|
||||
boolean hasOpen = np.has("open");
|
||||
boolean isOpen = np.getBoolean("open", false);
|
||||
|
||||
if (hasNumberOfFiles && !hasOpen && receiveFileJob != null) {
|
||||
if (hasNumberOfFiles && !isOpen && receiveFileJob != null) {
|
||||
job = receiveFileJob;
|
||||
} else {
|
||||
job = new CompositeReceiveFileJob(device, receiveFileJobCallback);
|
||||
@@ -201,7 +201,7 @@ public class SharePlugin extends Plugin {
|
||||
job.addNetworkPacket(np);
|
||||
|
||||
if (job != receiveFileJob) {
|
||||
if (hasNumberOfFiles && !hasOpen) {
|
||||
if (hasNumberOfFiles && !isOpen) {
|
||||
receiveFileJob = job;
|
||||
}
|
||||
backgroundJobHandler.runJob(job);
|
||||
|
@@ -245,7 +245,7 @@ public class DeviceFragment extends Fragment {
|
||||
builder.setMessage(context.getResources().getString(R.string.my_device_fingerprint) + "\n" + SslHelper.getCertificateHash(SslHelper.certificate) + "\n\n"
|
||||
+ context.getResources().getString(R.string.remote_device_fingerprint) + "\n" + SslHelper.getCertificateHash(device.certificate));
|
||||
}
|
||||
builder.create().show();
|
||||
builder.show();
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
@@ -286,7 +286,10 @@ public class MainActivity extends AppCompatActivity implements SharedPreferences
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
BackgroundService.RunCommand(this, service -> service.addDeviceListChangedCallback("MainActivity", this::updateDeviceList));
|
||||
BackgroundService.RunCommand(this, service -> {
|
||||
service.onNetworkChange();
|
||||
service.addDeviceListChangedCallback("MainActivity", this::updateDeviceList);
|
||||
});
|
||||
updateDeviceList();
|
||||
}
|
||||
|
||||
|
@@ -254,6 +254,7 @@ public class PairingFragment extends Fragment implements PairingDeviceItem.Callb
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
mSwipeRefreshLayout.setEnabled(true);
|
||||
BackgroundService.RunCommand(mActivity, service -> service.addDeviceListChangedCallback("PairingFragment", this::updateDeviceList));
|
||||
updateDeviceList();
|
||||
}
|
||||
|
@@ -3,10 +3,12 @@ package org.kde.kdeconnect.UserInterface;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
|
||||
@@ -52,7 +54,12 @@ public class SettingsFragment extends PreferenceFragmentCompat {
|
||||
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
if (getView() != null) {
|
||||
Snackbar.make(getView(), R.string.invalid_device_name, Snackbar.LENGTH_LONG).show();
|
||||
Snackbar snackbar = Snackbar.make(getView(), R.string.invalid_device_name, Snackbar.LENGTH_LONG);
|
||||
if (!prefs.getBoolean("darkTheme", false)) {
|
||||
// white color is set to the background of snackbar if dark mode is off
|
||||
snackbar.getView().setBackgroundColor(Color.WHITE);
|
||||
}
|
||||
snackbar.show();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user