mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
Merge pull request #216 from p0ppy-fl0w3r/master
FR #200 Remove dialer from recent apps after hanging up a call
This commit is contained in:
@ -89,6 +89,7 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".activities.CallActivity"
|
android:name=".activities.CallActivity"
|
||||||
android:label="@string/ongoing_call"
|
android:label="@string/ongoing_call"
|
||||||
|
android:excludeFromRecents="true"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:showOnLockScreen="true" />
|
android:showOnLockScreen="true" />
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ import android.media.AudioManager
|
|||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
|
import android.os.Looper
|
||||||
import android.os.PowerManager
|
import android.os.PowerManager
|
||||||
import android.provider.MediaStore
|
import android.provider.MediaStore
|
||||||
import android.telecom.Call
|
import android.telecom.Call
|
||||||
@ -278,7 +279,7 @@ class CallActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isCallEnded) {
|
if (isCallEnded) {
|
||||||
finish()
|
finishAndRemoveTask()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,7 +293,7 @@ class CallActivity : SimpleActivity() {
|
|||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
call_status_label.text = "${callDuration.getFormattedDuration()} (${getString(R.string.call_ended)})"
|
call_status_label.text = "${callDuration.getFormattedDuration()} (${getString(R.string.call_ended)})"
|
||||||
Handler().postDelayed({
|
Handler().postDelayed({
|
||||||
finish()
|
finishAndRemoveTask()
|
||||||
}, 3000)
|
}, 3000)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user