Removed DTMF sounds on Dialer, soundcard takes too much time to start to make it useful

This commit is contained in:
Sylvain Berfini 2021-11-05 09:14:46 +01:00
parent 170cf1189b
commit b305a10f08
2 changed files with 3 additions and 18 deletions

View file

@ -36,6 +36,7 @@ Group changes to describe their impact on the project, as follows:
- Going back to the dialer when pressing back in a chat room after clicking on a chat message notification
### Removed
- Dialer will no longer make DTMF sound when pressing digits
- Global push notification setting in Network, use the switch in each Account instead
## [4.5.5] - 2021-10-28

View file

@ -21,7 +21,6 @@ package org.linphone.activities.main.dialer.viewmodels
import android.content.Context
import android.os.Vibrator
import android.provider.Settings
import android.text.Editable
import android.widget.EditText
import androidx.lifecycle.MutableLiveData
@ -69,23 +68,8 @@ class DialerViewModel : LogsUploadViewModel() {
}
enteredUri.value = sb.toString()
if (coreContext.core.callsNb == 0) {
val contentResolver = coreContext.context.contentResolver
try {
if (Settings.System.getInt(
contentResolver,
Settings.System.DTMF_TONE_WHEN_DIALING
) == 1
) {
coreContext.core.playDtmf(key, 1)
if (vibrator.hasVibrator() && corePreferences.dtmfKeypadVibration) {
Compatibility.eventVibration(vibrator)
}
}
} catch (snfe: Settings.SettingNotFoundException) {
Log.e("[Dialer] Can't play DTMF: $snfe")
}
if (vibrator.hasVibrator() && corePreferences.dtmfKeypadVibration) {
Compatibility.eventVibration(vibrator)
}
}