Cleanup.
This commit is contained in:
parent
4dbf99ec39
commit
ecd3583b23
4 changed files with 43 additions and 18 deletions
|
@ -73,7 +73,6 @@ import java.util.Locale
|
||||||
@RuntimePermissions
|
@RuntimePermissions
|
||||||
class MainActivity : AppCompatActivity(), AnkoLogger {
|
class MainActivity : AppCompatActivity(), AnkoLogger {
|
||||||
private lateinit var config: Config
|
private lateinit var config: Config
|
||||||
// private val aboutConfig: AboutConfig = AboutConfig.getInstance()
|
|
||||||
private val configurationsData = "configurations.dat"
|
private val configurationsData = "configurations.dat"
|
||||||
private val currentConfigData = "config.dat"
|
private val currentConfigData = "config.dat"
|
||||||
private val defaultConfigurations = listOf(
|
private val defaultConfigurations = listOf(
|
||||||
|
|
|
@ -45,18 +45,28 @@ data class Field(
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("unused")
|
@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(
|
constructor(source: Parcel) : this(
|
||||||
source.readString().ifNull(),
|
hint = source.readString().ifNull(),
|
||||||
source.readString().ifNull(),
|
digits = source.readString().ifNull(),
|
||||||
1 == source.readInt(),
|
alpha = 1 == source.readInt(),
|
||||||
1 == source.readInt(),
|
alt = 1 == source.readInt(),
|
||||||
1 == source.readInt(),
|
zeros = 1 == source.readInt(),
|
||||||
source.readInt(),
|
minSize = source.readInt(),
|
||||||
source.readInt(),
|
size = source.readInt(),
|
||||||
source.readInt(),
|
min = source.readInt(),
|
||||||
source.readInt()
|
max = source.readInt()
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun describeContents() = 0
|
override fun describeContents() = 0
|
||||||
|
|
|
@ -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(
|
constructor(source: Parcel) : this(
|
||||||
source.readString().ifNull(),
|
title = source.readString().ifNull(),
|
||||||
source.createTypedArrayList(Field.CREATOR) ?: emptyList(),
|
fields = source.createTypedArrayList(Field.CREATOR) ?: emptyList(),
|
||||||
1 == source.readInt(),
|
nodial = 1 == source.readInt(),
|
||||||
1 == source.readInt(),
|
nosteps = 1 == source.readInt(),
|
||||||
source.readString().ifNull()
|
dtmf = source.readString().ifNull()
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun compareTo(other: Option): Int = title.compareTo(other.title)
|
override fun compareTo(other: Option): Int = title.compareTo(other.title)
|
||||||
|
|
|
@ -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(
|
constructor(source: Parcel) : this(
|
||||||
source.readString().ifNull(),
|
source.readString().ifNull(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue