remember the last used SIM card on a per-number basis

This commit is contained in:
tibbi 2020-05-03 23:12:00 +02:00
parent f5d3c2ab70
commit cc2a4e596f
4 changed files with 33 additions and 8 deletions

View file

@ -7,4 +7,10 @@ class Config(context: Context) : BaseConfig(context) {
companion object {
fun newInstance(context: Context) = Config(context)
}
fun saveUseSIMIdAtNumber(number: String, SIMId: Int) {
prefs.edit().putInt(USE_SIM_ID_PREFIX + number, SIMId).apply()
}
fun getUseSIMIdAtNumber(number: String) = prefs.getInt(USE_SIM_ID_PREFIX + number, 0)
}