For 19804:Fixed call order in the
This commit is contained in:
parent
b8bbdb45bc
commit
db01fab8a9
|
@ -476,9 +476,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
|||
*/
|
||||
fun checkDefaultBrowserAndSet(): Boolean {
|
||||
val prefKey = appContext.getPreferenceKey(R.string.pref_key_default_browser)
|
||||
val isDefaultBrowser = isDefaultBrowser()
|
||||
this.preferences.edit().putBoolean(prefKey, isDefaultBrowser).apply()
|
||||
return this.preferences.getBoolean(prefKey, isDefaultBrowser) != isDefaultBrowser
|
||||
val isDefaultBrowserNow = isDefaultBrowser()
|
||||
val isDefaultBrowserBefore = this.preferences.getBoolean(prefKey, isDefaultBrowserNow)
|
||||
this.preferences.edit().putBoolean(prefKey, isDefaultBrowserNow).apply()
|
||||
return isDefaultBrowserNow != isDefaultBrowserBefore
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue