adding some Dialer call related things that might be needed soon
This commit is contained in:
parent
b95a8aec99
commit
945c5c8e9a
|
@ -6,6 +6,7 @@
|
||||||
android:installLocation="auto">
|
android:installLocation="auto">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.CALL_PHONE"/>
|
<uses-permission android:name="android.permission.CALL_PHONE"/>
|
||||||
|
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
|
||||||
<uses-permission android:name="android.permission.READ_CONTACTS"/>
|
<uses-permission android:name="android.permission.READ_CONTACTS"/>
|
||||||
<uses-permission android:name="android.permission.WRITE_CONTACTS"/>
|
<uses-permission android:name="android.permission.WRITE_CONTACTS"/>
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||||
|
@ -216,6 +217,15 @@
|
||||||
android:resource="@xml/provider_paths"/>
|
android:resource="@xml/provider_paths"/>
|
||||||
</provider>
|
</provider>
|
||||||
|
|
||||||
|
<service
|
||||||
|
android:name=".helpers.MyConnectionService"
|
||||||
|
android:label="SimpleContacts ConnectionService"
|
||||||
|
android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.telecom.ConnectionService"/>
|
||||||
|
</intent-filter>
|
||||||
|
</service>
|
||||||
|
|
||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Red"
|
android:name=".activities.SplashActivity.Red"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
|
|
@ -23,6 +23,7 @@ import kotlinx.android.synthetic.main.activity_dialpad.*
|
||||||
|
|
||||||
class DialpadActivity : SimpleActivity() {
|
class DialpadActivity : SimpleActivity() {
|
||||||
var contacts = ArrayList<Contact>()
|
var contacts = ArrayList<Contact>()
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_dialpad)
|
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 -> {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue