From 9e463b83f9742e1a80540f9965b2d01c61c2347e Mon Sep 17 00:00:00 2001 From: Harrison Caldicott Date: Thu, 18 Dec 2025 17:03:22 +1100 Subject: [PATCH 1/2] fix: Correct typos, update dependencies, and modernize codebase This commit addresses several issues across the application, including dependency updates, code style modernization, and minor bug fixes. **Build & Dependencies:** - Updates the Gradle build scripts to use modern Groovy syntax with explicit assignment operators. - Bumps the versions of several dependencies, including `okhttp`, `code-scanner`, and various AndroidX and Firebase libraries, to resolve potential bugs and improve stability. - Updates the Gradle wrapper to a newer version more widely compatible with newer versions of Android Studio. - Fixes and updates several other dependencies. **Code Refinements:** - Removes redundant semicolons throughout the Kotlin files to adhere to modern code style conventions. - Replaces `var` with `val` for variables that are not reassigned, enhancing code immutability and safety. - Modernizes string and character handling by replacing `toUpperCase()` with the idiomatic `uppercase()`. - Unused parameters in lambdas and exception blocks are now correctly marked with an underscore (`_`). **Bug Fixes:** - Corrects a typo in the `invalid_server_pairing_link` string resource from "Linbk" to "Link". - Addresses a hardcoded string by moving "000000" into a new `zero_string` resource in `strings.xml`. - Suppresses a deprecation warning for the `vibrate()` method on older API levels to clean up build output. - Improves null safety by using a safe cast (`as?`) when retrieving the `Vibrator` system service. --- .idea/gradle.xml | 5 +- .idea/misc.xml | 1 + app/build.gradle | 35 ++-- .../com/meshcentral/agent/AuthFragment.kt | 22 +-- .../com/meshcentral/agent/MainActivity.kt | 78 ++++----- .../java/com/meshcentral/agent/MeshAgent.kt | 17 +- .../agent/MeshFirebaseMessagingService.kt | 2 +- .../java/com/meshcentral/agent/MeshTunnel.kt | 158 +++++++++--------- app/src/main/res/values/strings.xml | 3 +- build.gradle | 17 +- gradle.properties | 1 - gradle/wrapper/gradle-wrapper.properties | 3 +- 12 files changed, 170 insertions(+), 172 deletions(-) diff --git a/.idea/gradle.xml b/.idea/gradle.xml index a2cc883..e6dd38d 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -4,11 +4,10 @@