Add settings option to launch dialpad by default

- also account for process death of the MainActivity by persisting the state of whether the dialer had been launched by default
This commit is contained in:
Paul Akhamiogu
2021-08-14 17:59:48 +01:00
parent bbc61c34eb
commit 81d09c658f
26 changed files with 73 additions and 1 deletions

View File

@ -43,4 +43,8 @@ class Config(context: Context) : BaseConfig(context) {
var groupSubsequentCalls: Boolean
get() = prefs.getBoolean(GROUP_SUBSEQUENT_CALLS, true)
set(groupSubsequentCalls) = prefs.edit().putBoolean(GROUP_SUBSEQUENT_CALLS, groupSubsequentCalls).apply()
var openDialPadAtLaunch: Boolean
get() = prefs.getBoolean(OPEN_DIAL_PAD_AT_LAUNCH, false)
set(openDialPad) = prefs.edit().putBoolean(OPEN_DIAL_PAD_AT_LAUNCH, openDialPad).apply()
}

View File

@ -4,6 +4,7 @@ package com.simplemobiletools.dialer.helpers
const val SPEED_DIAL = "speed_dial"
const val REMEMBER_SIM_PREFIX = "remember_sim_"
const val GROUP_SUBSEQUENT_CALLS = "group_subsequent_calls"
const val OPEN_DIAL_PAD_AT_LAUNCH = "open_dial_pad_at_launch"
const val CONTACTS_TAB_MASK = 1
const val FAVORITES_TAB_MASK = 2