Skip to content

Commit

Permalink
Merge pull request #228 from SecUSo/development
Browse files Browse the repository at this point in the history
Update to version 4.6.0
  • Loading branch information
udenr authored Mar 27, 2024
2 parents 125a67b + f443d04 commit 8533b1d
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 20 deletions.
32 changes: 26 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Build Test
on: [ push, pull_request ]
name: Continuous Integration
on: [push, pull_request]

jobs:
build:
test:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
submodules: "recursive"

- name: Set up JDK environment
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: "zulu"
java-version: 17

- name: Make gradlew executable
Expand All @@ -25,5 +25,25 @@ jobs:
- name: Run local unit tests
run: bash ./gradlew test --stacktrace

build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: "recursive"

- name: Set up JDK environment
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: 17

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Build the app
run: bash ./gradlew build --stacktrace
run: bash ./gradlew build --stacktrace
10 changes: 5 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
compileSdk 34
targetSdkVersion 34
multiDexEnabled true
versionCode 40
versionName "4.5.9"
versionCode 42
versionName "4.6.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
buildFeatures.dataBinding = true
vectorDrawables.useSupportLibrary = true
Expand Down Expand Up @@ -76,7 +76,7 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

implementation('com.journeyapps:zxing-android-embedded:4.3.0') { transitive = false }
implementation 'com.google.zxing:core:3.4.1' //newer version requires java.nio.charset.StandardCharsets in Encoder.java -> minSdkVersion = 19
implementation 'com.google.zxing:core:3.5.3'

coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
implementation "androidx.multidex:multidex:2.0.1"
Expand All @@ -89,10 +89,10 @@ dependencies {
ksp "androidx.room:room-compiler:$room_version"
androidTestImplementation "androidx.room:room-testing:$room_version"

implementation 'com.google.code.gson:gson:2.10'
implementation 'com.google.code.gson:gson:2.9.1' //Versions newer than 2.9 only work on API levels > 21 (https://github.com/google/gson/issues/2310). App crashes e.g. when saving a generated QR code to history on API 17.
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation "androidx.core:core-ktx:1.12.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2" //2.7.0+ not compatible with API < 19
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

implementation project(path: ':backup-api')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ class DeleteActionMode(private val historyActivity: HistoryActivity) : ActionMod
override fun onCreateActionMode(mode: ActionMode, menu: Menu?): Boolean {
val menuInflater = mode.menuInflater
menuInflater.inflate(R.menu.multi_delete_menu, menu)
mode.title = historyActivity.resources.getQuantityString(R.plurals.entries_selected, 0, 0)
ViewModelProvider(historyActivity)[HistoryViewModel::class.java].selectedItemCount.observe(historyActivity) { count: Int ->
mode.title = historyActivity.resources.getQuantityString(R.plurals.entries_selected, count, count)
}
return true
}

override fun onPrepareActionMode(mode: ActionMode, menu: Menu?): Boolean {
isDeleteModeActive = true
ViewModelProvider(historyActivity)[HistoryViewModel::class.java].selectedItemCount.observe(historyActivity) { count: Int? ->
mode.title = String.format(historyActivity.resources.getString(R.string.entries_selected), count)
}
return true
}

Expand Down Expand Up @@ -68,6 +69,7 @@ class DeleteActionMode(private val historyActivity: HistoryActivity) : ActionMod
isDeleteModeActive = false
isSelectAll = false
selectList.clear()
ViewModelProvider(historyActivity)[HistoryViewModel::class.java].setSelectedItemCount(0)
historyActivity.historyAdapter.notifyDataSetChanged()
}

Expand Down
5 changes: 4 additions & 1 deletion app/src/main/res/values-ca/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@
<string name="Content_copied">S\'ha copiat el contingut</string>
<string name="Share_via">Comparteix via</string>
<string name="select_all">Selecciona-ho tot</string>
<string name="entries_selected">%1$d seleccionats</string>
<plurals name="entries_selected">
<item quantity="one">%1$d seleccionat</item>
<item quantity="other">%1$d seleccionats</item>
</plurals>
<string name="activity_scanner_permission_needed_explanation">Aquesta aplicació necessita el permís d\'accés a la càmera per a poder escanejar codis QR.</string>
<string name="generator_text_explanation">Podeu introduir qualsevol text que vulgueu codificar. Es permeten línies múltiples.</string>
<string name="generator_market_explanation">Aquí podeu introduir el nom del paquet de l\'aplicació. P. ex.</string>
Expand Down
6 changes: 5 additions & 1 deletion app/src/main/res/values-cs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@
<string name="Share_via">Sdílet přes</string>
<string name="select_all">Vybrat vše</string>
<string name="selected_1">Zvoleno</string>
<string name="entries_selected">%1$d zvoleno</string>
<plurals name="entries_selected">
<item quantity="one">%1$d vybraný</item>
<item quantity="few">%1$d vybrané</item>
<item quantity="many">%1$d vybraných</item>
</plurals>
<string name="activity_scanner_permission_needed_explanation">Tato aplikace vyžaduje přístup k fotoaparátu pro čtení QR kódů.</string>
<string name="app_name">Čtečka QR</string>
<string name="history">Historie</string>
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@
<string name="selected_item">Artikel ausgewählt</string>
<string name="removed_item">Artikel entfernt</string>
<string name="selected_items">Artikel ausgewählt</string>
<string name="entries_selected">%1$d ausgewählt</string>
<string name="removed_items">Artikel entfernt</string>
<string name="canncelled_scan">Sie haben den Scanvorgang abgebrochen</string>
<string name="Scan_qr">Scan</string>
Expand Down Expand Up @@ -224,6 +223,10 @@
<string name="Share_via">Teilen per</string>
<string name="select_all">Wählen Sie Alle</string>
<string name="selected_1">Ausgewählt</string>
<plurals name="entries_selected">
<item quantity="one">%1$d Eintrag ausgewählt</item>
<item quantity="other">%1$d Einträge ausgewählt</item>
</plurals>
<string name="D_all">Alle Einträge löschen</string>
<string name="History">Historie</string>
<string name="QRGenerator">QR Generator</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-pl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@
<string name="url_secuso"><a href="https://www.secuso.org/pfa">Strona SECUSO</a></string>
<string name="activity_history_list_item_qr_image_descriptor">Kod QR</string>
<string name="github"><a href="https://github.com/SecUSo/privacy-friendly-qr-scanner">Repozytorium na GitHubie</a></string>
<string name="entries_selected">%1$d wybrane</string>
<string name="switch_camera">Przełącz aparat</string>
<string name="cannot_connect_to_encrypted_wifi_without_password">Nie można nawiązać połączenia z szyfrowaną siecią Wi-Fi bez hasła.</string>
</resources>
5 changes: 4 additions & 1 deletion app/src/main/res/values-tr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,10 @@
<string name="pref_app_theme_title">Tema</string>
<string name="ssid_value">SSID: %1$s</string>
<string name="item_result_calendar_end">Bitiş:</string>
<string name="entries_selected">%1$d seçildi</string>
<plurals name="entries_selected">
<item quantity="one">%1$d seçilmiş</item>
<item quantity="other">%1$d seçildi</item>
</plurals>
<string name="switch_camera">Kamera değiştir</string>
<string name="unsupported_wifi_encryption">Bu WiFi şifrelemesi şu anda desteklenmiyor: %1$s</string>
<string name="cannot_connect_to_encrypted_wifi_without_password">Şifreli bir WiFi ağına parola olmadan bağlantı kurulamaz.</string>
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,10 @@
<string name="Share_via">Share via</string>
<string name="select_all">Select All</string>
<string name="selected_1">Selected</string>
<string name="entries_selected">%1$d selected</string>
<plurals name="entries_selected">
<item quantity="one">%1$d entry selected</item>
<item quantity="other">%1$d entries selected</item>
</plurals>
<string name="activity_scanner_permission_needed_explanation">The app needs the camera permission in order to scan QR codes.</string>

<string name="select_image_from_gallery_explanation">This function allows you to open images from your gallery and scan codes contained in them. This requires access to the images.</string>
Expand Down

0 comments on commit 8533b1d

Please sign in to comment.