Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,6 @@ dependencies {
implementation "androidx.camera:camera-lifecycle:$cameraX_version"
implementation 'com.google.android.gms:play-services-mlkit-face-detection:17.1.0'
implementation "com.google.firebase:firebase-auth:22.3.0"
//Tobe removed with nav version 2.9
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3'

}

ext {
Expand Down
2 changes: 1 addition & 1 deletion app/src/org/commcare/connect/ConnectAppUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ object ConnectAppUtils {
val passwordLength = 20
val charSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_!.?"
val secureRandom = SecureRandom()
return (1..passwordLength)
return (1 until passwordLength)
.map { charSet[secureRandom.nextInt(charSet.length)] }
.joinToString("")
}
Expand Down
8 changes: 4 additions & 4 deletions app/src/org/commcare/connect/ConnectJobHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ object ConnectJobHelper {
val modules = json.getJSONArray(key)
val learningRecords: MutableList<ConnectJobLearningRecord> =
ArrayList(modules.length())
for (i in 0..<modules.length()) {
for (i in 0 until modules.length()) {
val obj = modules[i] as JSONObject
val record = ConnectJobLearningRecord.fromJson(obj, job.jobId)
learningRecords.add(record)
Expand All @@ -101,7 +101,7 @@ object ConnectJobHelper {
val assessments = json.getJSONArray(key)
val assessmentRecords: MutableList<ConnectJobAssessmentRecord> =
ArrayList(assessments.length())
for (i in 0..<assessments.length()) {
for (i in 0 until assessments.length()) {
val obj = assessments[i] as JSONObject
val record = ConnectJobAssessmentRecord.fromJson(obj, job.jobId)
assessmentRecords.add(record)
Expand Down Expand Up @@ -210,7 +210,7 @@ object ConnectJobHelper {
key = "deliveries"
if (json.has(key)) {
val array = json.getJSONArray(key)
for (i in 0..<array.length()) {
for (i in 0 until array.length()) {
val obj = array[i] as JSONObject
deliveries.add(ConnectJobDeliveryRecord.fromJson(obj, job.jobId))
}
Expand All @@ -225,7 +225,7 @@ object ConnectJobHelper {
key = "payments"
if (json.has(key)) {
val array = json.getJSONArray(key)
for (i in 0..<array.length()) {
for (i in 0 until array.length()) {
val obj = array[i] as JSONObject
payments.add(ConnectJobPaymentRecord.fromJson(obj, job.jobId))
}
Expand Down