Removed DTMF sounds on Dialer, soundcard takes too much time to start to make it useful
This commit is contained in:
parent
170cf1189b
commit
b305a10f08
2 changed files with 3 additions and 18 deletions
|
@ -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
|
||||
|
|
|
@ -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,25 +68,10 @@ 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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun handleLongClick(key: Char): Boolean {
|
||||
if (key == '1') {
|
||||
|
|
Loading…
Reference in a new issue