From ca83ae9a3070dd326d08b6364f9cb84798d70a40 Mon Sep 17 00:00:00 2001 From: Yusuf Sahin HAMZA Date: Fri, 28 Feb 2020 03:11:04 +0300 Subject: [PATCH 1/2] Fix Travis CI --- .travis.yml | 29 +++++++++++++++++++++++++---- tools/android-wait-for-emulator.sh | 25 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 tools/android-wait-for-emulator.sh diff --git a/.travis.yml b/.travis.yml index ba37552..00009a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,28 @@ language: android -dist: trusty + +jdk: oraclejdk8 + +env: + global: + - ANDROID_TARGET=android-22 + - ANDROID_ABI=armeabi-v7a + android: components: - - build-tools-26.0.2 - - android-26 - - extra + - tools + - platform-tools + - build-tools-28.0.3 + - android-28 + - $ANDROID_TARGET + - extra-android-m2repository + - sys-img-${ANDROID_ABI}-${ANDROID_TARGET} + +before_script: + - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 100M + - emulator -avd test -no-window & + - bash ./tools/android-wait-for-emulator.sh + - adb shell input keyevent 82 & + +script: + - bash ./gradlew build + - bash ./gradlew test -x lint --stacktrace diff --git a/tools/android-wait-for-emulator.sh b/tools/android-wait-for-emulator.sh new file mode 100644 index 0000000..aa6345d --- /dev/null +++ b/tools/android-wait-for-emulator.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Originally written by Ralf Kistner , but placed in the public domain + +set +e + +bootanim="" +failcounter=0 +timeout_in_sec=360 + +until [[ "$bootanim" =~ "stopped" ]]; do + bootanim=`adb -e shell getprop init.svc.bootanim 2>&1 &` + if [[ "$bootanim" =~ "device not found" || "$bootanim" =~ "device offline" + || "$bootanim" =~ "running" ]]; then + let "failcounter += 1" + echo "Waiting for emulator to start" + if [[ $failcounter -gt timeout_in_sec ]]; then + echo "Timeout ($timeout_in_sec seconds) reached; failed to start emulator" + exit 1 + fi + fi + sleep 1 +done + +echo "Emulator is ready" From 841ff4f5165ca2b15f993cb29a60a4f13af525f8 Mon Sep 17 00:00:00 2001 From: Yusuf Sahin HAMZA Date: Fri, 28 Feb 2020 03:11:30 +0300 Subject: [PATCH 2/2] Fix current errors --- README.md | 2 +- app/src/main/java/org/myhush/silentdragon/MainActivity.kt | 3 ++- app/src/main/res/values-bg/strings.xml | 4 +++- app/src/main/res/values-de/strings.xml | 2 ++ app/src/main/res/values-el/strings.xml | 4 +++- app/src/main/res/values-fa/strings.xml | 4 +++- app/src/main/res/values-fi/strings.xml | 2 ++ app/src/main/res/values-fil/strings.xml | 4 +++- app/src/main/res/values-fr/strings.xml | 4 +++- app/src/main/res/values-hu/strings.xml | 6 ++++-- app/src/main/res/values-in/strings.xml | 6 ++++-- app/src/main/res/values-it/strings.xml | 6 ++++-- app/src/main/res/values-lv/strings.xml | 6 ++++-- app/src/main/res/values-pl/strings.xml | 4 +++- app/src/main/res/values-pt/strings.xml | 6 ++++-- app/src/main/res/values-ro/strings.xml | 2 ++ app/src/main/res/values-ru/strings.xml | 5 +++-- app/src/main/res/values-sv/strings.xml | 6 ++++-- 18 files changed, 54 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 4cbbfa6..e7c6bf9 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ The `keytool` command can be used, for example: * Set the Key Store Name to `silent_dragon_keystore.jks` and the path to that of the project, create a password for the keystore path, a Key alias, and a key password. The store password and key password should be the same. Fill out some basic organization information and click Ok. * On the next screen make sure the build variant "release" is selected and click Finish. -### Preparing properties file +### Preparing a properties file Copy `secrets.properties` file from `examples` folder and paste it to the projects main directory. Fill store_file_location, key_alias, key_password and store_password when you created the release keystore. diff --git a/app/src/main/java/org/myhush/silentdragon/MainActivity.kt b/app/src/main/java/org/myhush/silentdragon/MainActivity.kt index a0d2318..3ab609f 100644 --- a/app/src/main/java/org/myhush/silentdragon/MainActivity.kt +++ b/app/src/main/java/org/myhush/silentdragon/MainActivity.kt @@ -7,6 +7,7 @@ import android.app.Activity import android.app.AlertDialog import android.content.* import android.net.Uri +import android.os.Build import android.os.Bundle import android.os.Handler import android.os.StrictMode @@ -70,7 +71,7 @@ class MainActivity : AppCompatActivity(), btnHelp.setOnClickListener { val dialogBuilder = AlertDialog.Builder(this) - dialogBuilder.setMessage(Html.fromHtml(resources.getString(R.string.help_text), HtmlCompat.FROM_HTML_MODE_LEGACY)) + dialogBuilder.setMessage(if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) Html.fromHtml(resources.getString(R.string.help_text), HtmlCompat.FROM_HTML_MODE_LEGACY) else Html.fromHtml(resources.getString(R.string.help_text))) .setNegativeButton(resources.getString(R.string.ok), DialogInterface.OnClickListener { dialog, id -> dialog.cancel() }) diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 9f124c9..6e11bb0 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -21,6 +21,8 @@ Предишни транзакции OR Свържи се отново + Help + This application does remote control for your full node.<br><br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.<br><br>After your node is synced, go to <b>Apps -> Connect Mobile App</b> to view the connection QR Code, which you can scan from this app for connect SilentDragon. SilentDragon @@ -131,4 +133,4 @@ Настройки Относно - \ No newline at end of file + diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 22bfbf5..85ed219 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -26,6 +26,8 @@ letzte Transaktionen OR Wiederverbinden + Help + This application does remote control for your full node.<br><br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.<br><br>After your node is synced, go to <b>Apps -> Connect Mobile App</b> to view the connection QR Code, which you can scan from this app for connect SilentDragon. SilentDragon diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 7f10884..9738deb 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -23,6 +23,8 @@ Προηγούμενες συναλλαγές Η Επανασύνδεση + Help + This application does remote control for your full node.<br><br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.<br><br>After your node is synced, go to <b>Apps -> Connect Mobile App</b> to view the connection QR Code, which you can scan from this app for connect SilentDragon. SilentDragon @@ -133,4 +135,4 @@ Ρυθμίσεις Σχετικά με - \ No newline at end of file + diff --git a/app/src/main/res/values-fa/strings.xml b/app/src/main/res/values-fa/strings.xml index 540a505..4c06876 100644 --- a/app/src/main/res/values-fa/strings.xml +++ b/app/src/main/res/values-fa/strings.xml @@ -21,6 +21,8 @@ تراکنش های گذشته یا اتصال دوباره + Help + This application does remote control for your full node.<br><br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.<br><br>After your node is synced, go to <b>Apps -> Connect Mobile App</b> to view the connection QR Code, which you can scan from this app for connect SilentDragon. SilentDragon|سایلنت دراگون @@ -136,4 +138,4 @@ تنظیمات درباره - \ No newline at end of file + diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 881a5ba..64e39ec 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -26,6 +26,8 @@ Aiemmat Tapahtumat Tai Yhdistä Uudelleen + Help + This application does remote control for your full node.<br><br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.<br><br>After your node is synced, go to <b>Apps -> Connect Mobile App</b> to view the connection QR Code, which you can scan from this app for connect SilentDragon. SilentDragon diff --git a/app/src/main/res/values-fil/strings.xml b/app/src/main/res/values-fil/strings.xml index 7341cd4..5766667 100644 --- a/app/src/main/res/values-fil/strings.xml +++ b/app/src/main/res/values-fil/strings.xml @@ -22,6 +22,8 @@ Mga Nakaraang Transaksyon O Kumonekta Muli + Help + This application does remote control for your full node.<br><br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.<br><br>After your node is synced, go to <b>Apps -> Connect Mobile App</b> to view the connection QR Code, which you can scan from this app for connect SilentDragon. SilentDragon @@ -132,4 +134,4 @@ Settings About - \ No newline at end of file + diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 484b6d4..1129183 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -21,7 +21,9 @@ Historique des transactions OU Se reconnecter - + Help + This application does remote control for your full node.<br><br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.<br><br>After your node is synced, go to <b>Apps -> Connect Mobile App</b> to view the connection QR Code, which you can scan from this app for connect SilentDragon. + SilentDragon Aucune connexion diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 4abf3ff..2992ed7 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -22,7 +22,9 @@ Korábbi tranzakciók vagy Ójrakapcsolódás - + Help + This application does remote control for your full node.<br><br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.<br><br>After your node is synced, go to <b>Apps -> Connect Mobile App</b> to view the connection QR Code, which you can scan from this app for connect SilentDragon. + SilentDragon Nincs kapcsolat @@ -132,4 +134,4 @@ Beállítások Infó - \ No newline at end of file + diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 8db582a..1f6407b 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -21,6 +21,8 @@ Transaksi Yang lalu OR Menghubungkan Ulang + Help + This application does remote control for your full node.<br><br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.<br><br>After your node is synced, go to <b>Apps -> Connect Mobile App</b> to view the connection QR Code, which you can scan from this app for connect SilentDragon. SilentDragon @@ -115,7 +117,7 @@ Pengriman Transaksi Error! Bidang Memo Terlalu Panjang! Paling Banyak 512 Bytes. %1$s %2$s lebih dari saldo dalam alamat terlindung Anda. Tx ini harus dikirim dari alamat transparan, dan tidak akan bersifat pribadi.\n\nApakah Anda benar-benar yakin? - Tidak bisa menghabiskan lebih dari %1$d %2$ dalam satu Tx + Tidak bisa menghabiskan lebih dari %1$d %2$s dalam satu Tx Balas Kepada @@ -131,4 +133,4 @@ Pengaturan Tentang - \ No newline at end of file + diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 137fd8c..43738d6 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -23,7 +23,9 @@ Transazioni Recenti OPPURE Riconnetti - + Help + This application does remote control for your full node.<br><br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.<br><br>After your node is synced, go to <b>Apps -> Connect Mobile App</b> to view the connection QR Code, which you can scan from this app for connect SilentDragon. + SilentDragon Nessuna Connessione @@ -137,4 +139,4 @@ Impostazioni About - \ No newline at end of file + diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index 2965d91..b8a8d5f 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -21,7 +21,9 @@ Iepriekšējie darījumi VAI Atkārtoti izveidot savienojumu - + Help + This application does remote control for your full node.<br><br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.<br><br>After your node is synced, go to <b>Apps -> Connect Mobile App</b> to view the connection QR Code, which you can scan from this app for connect SilentDragon. + SilentDragon Nav savienojuma @@ -131,4 +133,4 @@ Iestātījumi Par - \ No newline at end of file + diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 5fcb263..e6efacc 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -26,6 +26,8 @@ TADDR (adres transparentny) Poprzednie tranzakcje LUB Połącz ponownie + Help + This application does remote control for your full node.<br><br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.<br><br>After your node is synced, go to <b>Apps -> Connect Mobile App</b> to view the connection QR Code, which you can scan from this app for connect SilentDragon. SilentDragon @@ -140,4 +142,4 @@ TADDR (adres transparentny) Ustawienia O aplikacji - \ No newline at end of file + diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 220f29a..4107909 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -23,7 +23,9 @@ Últimas transacções OU Reconectar - + Help + This application does remote control for your full node.<br><br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.<br><br>After your node is synced, go to <b>Apps -> Connect Mobile App</b> to view the connection QR Code, which you can scan from this app for connect SilentDragon. + SilentDragon Sem ligação @@ -132,4 +134,4 @@ Opções Sobre - \ No newline at end of file + diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index ed66a9d..8e0b383 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -22,6 +22,8 @@ Tranzacţii anterioare ori Reconectare + Help + This application does remote control for your full node.<br><br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.<br><br>After your node is synced, go to <b>Apps -> Connect Mobile App</b> to view the connection QR Code, which you can scan from this app for connect SilentDragon. SilentDragon diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 0c851f8..178adc3 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -24,7 +24,8 @@ Прошедшие транзакции Или Переподключиться - + Help + This application does remote control for your full node.<br><br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.<br><br>After your node is synced, go to <b>Apps -> Connect Mobile App</b> to view the connection QR Code, which you can scan from this app for connect SilentDragon. ТихийДракон @@ -135,7 +136,7 @@ Невозможно отправить мемо на т-адрес Ошибка в отправке транзакции! Поле мемо слишком длинное! Должно быть менее 512 байт. - Сумма %1$d %2$s больше, чем баланс на Вашем затененном адресе. Данная транзакция будет отправлена с т-адреса и не будет скрытой. Вы абсолютно уверены? + Сумма %1$s %2$s больше, чем баланс на Вашем затененном адресе. Данная транзакция будет отправлена с т-адреса и не будет скрытой. Вы абсолютно уверены? Невозможно отправить больше, чем %1$d %2$s в одной транзакции" Ответить diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index cc4f409..6284558 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -22,7 +22,9 @@ tidigare transaktioner eller återanslut - + Help + This application does remote control for your full node.<br><br>In order to let your Android phone connect to your desktop, you need to run the deskop SilentDragon and sync fully.<br><br>After your node is synced, go to <b>Apps -> Connect Mobile App</b> to view the connection QR Code, which you can scan from this app for connect SilentDragon. + SilentDragon ingen anslutning @@ -132,4 +134,4 @@ inställningar om - \ No newline at end of file +