diff --git a/app/build.gradle b/app/build.gradle index 9f791167..01a77f74 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -15,7 +15,7 @@ android { defaultConfig { applicationId "com.simplemobiletools.contacts.pro" - minSdkVersion 21 + minSdkVersion 23 targetSdkVersion 29 versionCode 60 versionName "6.9.0" @@ -57,7 +57,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.27.1' + implementation 'com.simplemobiletools:commons:5.27.2' implementation 'joda-time:joda-time:2.10.1' implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4' implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5' diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/CallActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/CallActivity.kt index 103eea42..9f28ec2f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/CallActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/CallActivity.kt @@ -16,11 +16,10 @@ import android.util.Size import android.view.WindowManager import android.widget.RemoteViews import androidx.core.app.NotificationCompat +import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.extensions.* -import com.simplemobiletools.commons.helpers.MINUTE_SECONDS -import com.simplemobiletools.commons.helpers.isOreoMr1Plus -import com.simplemobiletools.commons.helpers.isOreoPlus -import com.simplemobiletools.commons.helpers.isQPlus +import com.simplemobiletools.commons.helpers.* +import com.simplemobiletools.commons.models.RadioItem import com.simplemobiletools.contacts.pro.R import com.simplemobiletools.contacts.pro.extensions.audioManager import com.simplemobiletools.contacts.pro.extensions.config @@ -159,9 +158,11 @@ class CallActivity : SimpleActivity() { private fun updateCallState(state: Int) { when (state) { + Call.STATE_RINGING -> callRinging() Call.STATE_ACTIVE -> callStarted() Call.STATE_DISCONNECTED -> endCall() Call.STATE_CONNECTING -> initOutgoingCallUI() + Call.STATE_SELECT_PHONE_ACCOUNT -> showPhoneAccountPicker() } if (state == Call.STATE_DISCONNECTED || state == Call.STATE_DISCONNECTING) { @@ -190,6 +191,10 @@ class CallActivity : SimpleActivity() { ongoing_call_holder.beVisible() } + private fun callRinging() { + incoming_call_holder.beVisible() + } + private fun callStarted() { incoming_call_holder.beGone() ongoing_call_holder.beVisible() @@ -197,6 +202,31 @@ class CallActivity : SimpleActivity() { callTimer.scheduleAtFixedRate(getCallTimerUpdateTask(), 1000, 1000) } + @SuppressLint("MissingPermission") + private fun showPhoneAccountPicker() { + if (!hasPermission(PERMISSION_READ_PHONE_STATE)) { + return + } + + val items = ArrayList() + telecomManager.callCapablePhoneAccounts.forEachIndexed { index, account -> + val phoneAccount = telecomManager.getPhoneAccount(account) + var label = phoneAccount.label.toString() + var address = phoneAccount.address.toString() + if (address.startsWith("tel:") && address.substringAfter("tel:").isNotEmpty()) { + address = Uri.decode(address.substringAfter("tel:")) + label += " ($address)" + } + + val radioItem = RadioItem(index, label, phoneAccount.accountHandle) + items.add(radioItem) + } + + RadioGroupDialog(this, items, titleId = R.string.select_sim) { + + } + } + private fun endCall() { CallManager.reject() if (proximityWakeLock?.isHeld == true) { diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/DialerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/DialerActivity.kt index b05ff469..7f5aee0e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/DialerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/DialerActivity.kt @@ -1,10 +1,8 @@ package com.simplemobiletools.contacts.pro.activities import android.annotation.SuppressLint -import android.annotation.TargetApi import android.content.Intent import android.net.Uri -import android.os.Build import android.os.Bundle import android.telecom.PhoneAccount import android.telecom.TelecomManager @@ -16,7 +14,6 @@ import com.simplemobiletools.commons.extensions.toast import com.simplemobiletools.commons.helpers.REQUEST_CODE_SET_DEFAULT_DIALER import com.simplemobiletools.contacts.pro.R -@TargetApi(Build.VERSION_CODES.M) class DialerActivity : SimpleActivity() { private var callNumber: Uri? = null diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/services/CallService.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/services/CallService.kt index 139bd208..644628ee 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/services/CallService.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/services/CallService.kt @@ -1,14 +1,11 @@ package com.simplemobiletools.contacts.pro.services import android.content.Intent -import android.os.Build import android.telecom.Call import android.telecom.InCallService -import androidx.annotation.RequiresApi import com.simplemobiletools.contacts.pro.activities.CallActivity import com.simplemobiletools.contacts.pro.helpers.CallManager -@RequiresApi(Build.VERSION_CODES.M) class CallService : InCallService() { override fun onCallAdded(call: Call) { super.onCallAdded(call) diff --git a/app/src/main/res/layout/activity_call.xml b/app/src/main/res/layout/activity_call.xml index dfd946cd..644dd093 100644 --- a/app/src/main/res/layout/activity_call.xml +++ b/app/src/main/res/layout/activity_call.xml @@ -44,7 +44,8 @@ + android:layout_height="match_parent" + android:visibility="gone"> + android:layout_height="match_parent" + android:visibility="gone"> - @@ -25,7 +23,7 @@ android:id="@+id/contact_photo" android:layout_width="@dimen/contact_photo_size" android:layout_height="@dimen/contact_photo_size" - android:layout_marginBottom="@dimen/normal_margin"/> + android:layout_marginBottom="@dimen/normal_margin" /> + android:visibility="gone" /> + android:src="@drawable/ic_email_vector" /> + android:src="@drawable/ic_phone_vector" /> + android:src="@drawable/ic_sms_vector" /> @@ -94,7 +92,7 @@ android:paddingTop="@dimen/medium_margin" android:paddingEnd="@dimen/small_margin" android:paddingBottom="@dimen/small_margin" - android:src="@drawable/ic_person_vector"/> + android:src="@drawable/ic_person_vector" /> + android:textSize="@dimen/bigger_text_size" /> + android:textSize="@dimen/bigger_text_size" /> + android:textSize="@dimen/bigger_text_size" /> + android:textSize="@dimen/bigger_text_size" /> + android:textSize="@dimen/bigger_text_size" /> + android:textSize="@dimen/bigger_text_size" /> + android:src="@drawable/img_write_storage" + android:visibility="gone" /> diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 917d6c63..00ade1ed 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index 7f6b8438..6135e086 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index e03a1c19..92052208 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Rychlé vytáčení diff --git a/app/src/main/res/values-cy/strings.xml b/app/src/main/res/values-cy/strings.xml index 5d1eedf8..d49922ab 100644 --- a/app/src/main/res/values-cy/strings.xml +++ b/app/src/main/res/values-cy/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 66768e8e..1b2a90a0 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index c41b99d1..65b24c63 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index f79ca9e3..565bf54c 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -103,14 +103,16 @@ Πληκτρολόγιο - Accept - Decline - Unknown Caller - Is Calling - Dialing - Call Ended - Call Ending - Ongoing Call + Αποδοχή + Απόρριψη + Άγνωστος + Καλεί + Πληκτρολόγηση + Τέλος Κλήσης + Τερματισμός Κλήσης + Τρέχουσα κλήση + Επιλέξτε SIM για αυτήν την κλήση + Χρήση πάντα αυτής της SIM για αυτόν τον αριθμό Ταχεία Κλήση diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index d5d50c0a..cc1d78ef 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml index 3db5c68b..f65c3e45 100644 --- a/app/src/main/res/values-eu/strings.xml +++ b/app/src/main/res/values-eu/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 7ef62ebb..149de07b 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 5c7cd66d..cfe05b8c 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index a20c0d29..33393fd5 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 419d27b2..15fc551c 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml index ac3115ff..6e48e75c 100644 --- a/app/src/main/res/values-id/strings.xml +++ b/app/src/main/res/values-id/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index ac3115ff..6e48e75c 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 4622cc2b..b0651f6d 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index df600c95..1f70c3f5 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-ko-rKR/strings.xml b/app/src/main/res/values-ko-rKR/strings.xml index ed878c5f..e54ac1e1 100644 --- a/app/src/main/res/values-ko-rKR/strings.xml +++ b/app/src/main/res/values-ko-rKR/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 354bfd72..c0e16ec1 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 5c63a8b5..ed725d5a 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Snelkiezer diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 42e9932f..d98bbba5 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 8cabf290..31b446c9 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index d0921e3f..349a9303 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Ligação rápida diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 94b12b99..baf030ee 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -111,6 +111,8 @@ Вызов завершён Завершение вызова Текущий вызов + Select a SIM for this call + Always use this SIM for this number Быстрый набор diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 53ed85a2..01e7c5e2 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -111,6 +111,8 @@ Hovor ukončený Hovor končí Prebiehajúci hovor + Zvoľte SIM pre tento hovor + Stále použiť túto SIM pri volaní tohto čísla Rýchle vytáčanie diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index ef29bb81..36a0a321 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index fea41639..64524035 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -103,14 +103,16 @@ Çevirici - Accept - Decline - Unknown Caller - Is Calling - Dialing - Call Ended - Call Ending - Ongoing Call + Kabul Et + Reddet + Bilinmeyen Arama + Arıyor + Çevriliyor + Arama Sonlandırıldı + Arama Sonlandırılıyor + Devam Eden Arama + Select a SIM for this call + Always use this SIM for this number Hızlı arama @@ -173,7 +175,7 @@ Bu basit kişi düzenleyicisi, ana ekranda telefon numaralarını göstermek, kişi küçük resminin görünürlüğünü değiştirmek, yalnızca telefon numaralarına sahip kişileri göstermek, bir arama başlatmadan önce bir arama onay kutusu göstermek gibi birçok kullanışlı ayara sahiptir. Harfleri de kullanan hızlı bir çevirici ile birlikte gelir. - Kullanıcı deneyimini daha da geliştirmek için, bir kişiye tıklandığında neler olacağını özelleştirebilirsiniz. Bir çağrı başlatabilir, Ayrıntıları Görüntüle ekranına gidebilir veya seçilen kişiyi düzenleyebilirsiniz. + Kullanıcı deneyimini daha da geliştirmek için, bir kişiye tıklandığında neler olacağını özelleştirebilirsiniz. Bir arama başlatabilir, Ayrıntıları Görüntüle ekranına gidebilir veya seçilen kişiyi düzenleyebilirsiniz. İstenmeyen gelen aramaları önlemek için telefon numaralarını kolayca engelleyebilirsiniz. diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index a2fc5223..21f36bb2 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index eb60dfe3..051174a5 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 5e834514..fbcc4374 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number 快速撥號 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ddd2a7c2..ee20b9dc 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -111,6 +111,8 @@ Call Ended Call Ending Ongoing Call + Select a SIM for this call + Always use this SIM for this number Speed dial