mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
fix: launch CallActivity when call is picked from notification
- add CallActivity.getStartIntent method to get the start intent for CallActivity and update in CallNotificationManager and CallService where the CallActivity is started - in CallActionReceiver, start the CallActivity before answering the call
This commit is contained in:
@ -3,6 +3,7 @@ package com.simplemobiletools.dialer.activities
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.KeyguardManager
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.graphics.Bitmap
|
||||
import android.media.AudioManager
|
||||
import android.os.Bundle
|
||||
@ -29,6 +30,14 @@ import kotlinx.android.synthetic.main.activity_call.*
|
||||
import kotlinx.android.synthetic.main.dialpad.*
|
||||
|
||||
class CallActivity : SimpleActivity() {
|
||||
companion object {
|
||||
fun getStartIntent(context: Context): Intent {
|
||||
val openAppIntent = Intent(context, CallActivity::class.java)
|
||||
openAppIntent.flags = Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT or Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
return openAppIntent
|
||||
}
|
||||
}
|
||||
|
||||
private var isSpeakerOn = false
|
||||
private var isMicrophoneOn = true
|
||||
private var isCallEnded = false
|
||||
|
Reference in New Issue
Block a user