Make sure TelecomHelper is correctly created in CoreContext
This commit is contained in:
parent
fdaabf6fc0
commit
d7f2b629da
1 changed files with 2 additions and 1 deletions
|
@ -295,7 +295,8 @@ class CoreContext(val context: Context, coreConfig: Config) {
|
||||||
if (Compatibility.hasTelecomManagerPermissions(context)) {
|
if (Compatibility.hasTelecomManagerPermissions(context)) {
|
||||||
Log.i("[Context] Creating Telecom Helper, disabling audio focus requests in AudioHelper")
|
Log.i("[Context] Creating Telecom Helper, disabling audio focus requests in AudioHelper")
|
||||||
core.config.setBool("audio", "android_disable_audio_focus_requests", true)
|
core.config.setBool("audio", "android_disable_audio_focus_requests", true)
|
||||||
TelecomHelper.create(context)
|
val telecomHelper = TelecomHelper.required(context)
|
||||||
|
Log.i("[Context] Telecom Helper created, account is ${if (telecomHelper.isAccountEnabled()) "enabled" else "disabled"}")
|
||||||
} else {
|
} else {
|
||||||
Log.w("[Context] Can't create Telecom Helper, permissions have been revoked")
|
Log.w("[Context] Can't create Telecom Helper, permissions have been revoked")
|
||||||
corePreferences.useTelecomManager = false
|
corePreferences.useTelecomManager = false
|
||||||
|
|
Loading…
Reference in a new issue