This commit is contained in:
Erik C. Thauvin 2019-09-27 21:53:59 -07:00
parent 4dbf99ec39
commit ecd3583b23
4 changed files with 43 additions and 18 deletions

View file

@ -73,7 +73,6 @@ import java.util.Locale
@RuntimePermissions
class MainActivity : AppCompatActivity(), AnkoLogger {
private lateinit var config: Config
// private val aboutConfig: AboutConfig = AboutConfig.getInstance()
private val configurationsData = "configurations.dat"
private val currentConfigData = "config.dat"
private val defaultConfigurations = listOf(

View file

@ -45,18 +45,28 @@ data class Field(
}
@Suppress("unused")
constructor() : this("", "", false, false, false, -1, -1, -1, -1)
constructor() : this(
hint = "",
digits = "",
alpha = false,
alt = false,
zeros = false,
minSize = -1,
size = -1,
min = -1,
max = -1
)
constructor(source: Parcel) : this(
source.readString().ifNull(),
source.readString().ifNull(),
1 == source.readInt(),
1 == source.readInt(),
1 == source.readInt(),
source.readInt(),
source.readInt(),
source.readInt(),
source.readInt()
hint = source.readString().ifNull(),
digits = source.readString().ifNull(),
alpha = 1 == source.readInt(),
alt = 1 == source.readInt(),
zeros = 1 == source.readInt(),
minSize = source.readInt(),
size = source.readInt(),
min = source.readInt(),
max = source.readInt()
)
override fun describeContents() = 0

View file

@ -40,14 +40,20 @@ data class Option(
}
}
constructor() : this("", emptyList(), false, false, "")
constructor() : this(
title = "",
fields = emptyList(),
nodial = false,
nosteps = false,
dtmf = ""
)
constructor(source: Parcel) : this(
source.readString().ifNull(),
source.createTypedArrayList(Field.CREATOR) ?: emptyList(),
1 == source.readInt(),
1 == source.readInt(),
source.readString().ifNull()
title = source.readString().ifNull(),
fields = source.createTypedArrayList(Field.CREATOR) ?: emptyList(),
nodial = 1 == source.readInt(),
nosteps = 1 == source.readInt(),
dtmf = source.readString().ifNull()
)
override fun compareTo(other: Option): Int = title.compareTo(other.title)

View file

@ -45,7 +45,17 @@ data class Params(
}
}
constructor() : this("", "", "", "", -1, "", "", "", "")
constructor() : this(
name = "",
type = "",
phone = "",
master = "",
size = -1,
ack = "",
alt = "",
begin = "",
end = ""
)
constructor(source: Parcel) : this(
source.readString().ifNull(),