mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
prevent calling blocked numbers
This commit is contained in:
@ -36,6 +36,12 @@ class DialerActivity : SimpleActivity() {
|
|||||||
@SuppressLint("MissingPermission")
|
@SuppressLint("MissingPermission")
|
||||||
private fun initOutgoingCall() {
|
private fun initOutgoingCall() {
|
||||||
try {
|
try {
|
||||||
|
if (this.isNumberBlocked(callNumber.toString().replace("tel:", ""), this.getBlockedNumbers())) {
|
||||||
|
toast(R.string.blocked_number)
|
||||||
|
finish()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
getHandleToUse(intent, callNumber.toString()) { handle ->
|
getHandleToUse(intent, callNumber.toString()) { handle ->
|
||||||
if (handle != null) {
|
if (handle != null) {
|
||||||
Bundle().apply {
|
Bundle().apply {
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
<string name="call_number">Call number</string>
|
<string name="call_number">Call number</string>
|
||||||
<string name="dialpad_beeps">Enable beeps on dialpad button clicks</string>
|
<string name="dialpad_beeps">Enable beeps on dialpad button clicks</string>
|
||||||
<string name="dialpad_vibrations">Enable vibrations on dialpad button clicks</string>
|
<string name="dialpad_vibrations">Enable vibrations on dialpad button clicks</string>
|
||||||
|
<string name="calling_blocked_numbe">الرقم الذي تحاول الإتصال به محظور</string>
|
||||||
<!-- Dialer -->
|
<!-- Dialer -->
|
||||||
<string name="dialer">Dialer</string>
|
<string name="dialer">Dialer</string>
|
||||||
<string name="accept">Accept</string>
|
<string name="accept">Accept</string>
|
||||||
|
@ -64,6 +64,7 @@
|
|||||||
<string name="audio_route_wired_headset">Wired Headset</string>
|
<string name="audio_route_wired_headset">Wired Headset</string>
|
||||||
<string name="audio_route_wired_or_earpiece">Wired or Earpiece</string>
|
<string name="audio_route_wired_or_earpiece">Wired or Earpiece</string>
|
||||||
<string name="choose_audio_route">Choose audio route</string>
|
<string name="choose_audio_route">Choose audio route</string>
|
||||||
|
<string name="calling_blocked_numbe">The calling number is blocked</string>
|
||||||
|
|
||||||
<!-- Speed dial -->
|
<!-- Speed dial -->
|
||||||
<string name="speed_dial">Speed dial</string>
|
<string name="speed_dial">Speed dial</string>
|
||||||
|
Reference in New Issue
Block a user