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
|
- Going back to the dialer when pressing back in a chat room after clicking on a chat message notification
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
- Dialer will no longer make DTMF sound when pressing digits
|
||||||
- Global push notification setting in Network, use the switch in each Account instead
|
- Global push notification setting in Network, use the switch in each Account instead
|
||||||
|
|
||||||
## [4.5.5] - 2021-10-28
|
## [4.5.5] - 2021-10-28
|
||||||
|
|
|
@ -21,7 +21,6 @@ package org.linphone.activities.main.dialer.viewmodels
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.Vibrator
|
import android.os.Vibrator
|
||||||
import android.provider.Settings
|
|
||||||
import android.text.Editable
|
import android.text.Editable
|
||||||
import android.widget.EditText
|
import android.widget.EditText
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
@ -69,23 +68,8 @@ class DialerViewModel : LogsUploadViewModel() {
|
||||||
}
|
}
|
||||||
enteredUri.value = sb.toString()
|
enteredUri.value = sb.toString()
|
||||||
|
|
||||||
if (coreContext.core.callsNb == 0) {
|
if (vibrator.hasVibrator() && corePreferences.dtmfKeypadVibration) {
|
||||||
val contentResolver = coreContext.context.contentResolver
|
Compatibility.eventVibration(vibrator)
|
||||||
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")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue