mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
adding some Dialer call related things that might be needed soon
This commit is contained in:
@ -23,6 +23,7 @@ import kotlinx.android.synthetic.main.activity_dialpad.*
|
||||
|
||||
class DialpadActivity : SimpleActivity() {
|
||||
var contacts = ArrayList<Contact>()
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_dialpad)
|
||||
|
@ -0,0 +1,10 @@
|
||||
package com.simplemobiletools.contacts.pro.helpers
|
||||
|
||||
import android.annotation.TargetApi
|
||||
import android.os.Build
|
||||
import android.telecom.ConnectionService
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.M)
|
||||
class MyConnectionService : ConnectionService() {
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.simplemobiletools.contacts.pro.helpers
|
||||
|
||||
import android.telephony.PhoneStateListener
|
||||
import android.telephony.TelephonyManager
|
||||
|
||||
class MyPhoneStateListener : PhoneStateListener() {
|
||||
override fun onCallStateChanged(state: Int, phoneNumber: String?) {
|
||||
super.onCallStateChanged(state, phoneNumber)
|
||||
when (state) {
|
||||
TelephonyManager.CALL_STATE_IDLE -> {
|
||||
}
|
||||
TelephonyManager.CALL_STATE_RINGING -> {
|
||||
}
|
||||
TelephonyManager.CALL_STATE_OFFHOOK -> {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user