From a9330e60150096d24760e5f3ef7fb3633ccfbd32 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Fri, 15 May 2020 17:43:15 +0200 Subject: [PATCH 001/131] Dutch2 --- app/src/main/res/values-nl/strings.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 10f1a0f5..e6fdbf41 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -171,17 +171,17 @@ Met deze moderne en stabiele app kunnen contactpersonen worden beschermd door ze niet te delen met andere apps en zo privé te houden. - Like the contact source, you can also easily change the contact name, email, phone number, address, organization, groups and many other customizable fields. You can use it for storing contact events too, like birthdays, anniversaries, or any other custom ones. + Naam, adres, telefoonnummer, e-mail, organisatie, groepen en vele andere velden zijn gemakkelijk aan te passen. Contacten kunnen worden verplaatst naar een andere account. Ook datums van verjaardagen en jubileums zijn op te slaan. - This simple contact editor has many handy settings like showing phone numbers on the main screen, toggle contact thumbnail visibility, showing only contacts with phone numbers, showing a call confirmation dialog before initiating a call. It comes with a quick dialer that also makes use of letters. + Er zijn vele handige functies, zoals het tonen van telefoonnummers in het hoofdscherm, het tonen/verbergen van contactafbeeldingen, het alleen weergeven van contacten tonen met een telefoonnummer en het vooraf om bevestiging vragen bij het beginnen van een gesprek. De app bevat een snelkiezer waarin ook op naam gezocht kan worden. - To further improve the user experience, you can customize what happens at clicking on a contact. You can either initiate a call, go to the View Details screen, or edit the selected contact. + Om de gebruikerservaring nog verder te verbeteren, kan worden gekozen wat er gebeurt bij een klik op een contact: er kan direct gebeld worden, de details kunnen worden geopend of het contact kan direct bewerkt worden. - You can easily block phone numbers to avoid unwanted incoming calls. + Telefoonnummers kunnen eenvoudig worden geblokkeerd om ongewenste gesprekken te voorkomen. - To avoid showing potentially unwanted contacts, it has a powerful built in duplicate contact merger. + Om potentieel ongewenste vermeldingen van contacten te voorkomen, kan de app dubbele contacten samenvoegen. - It comes with material design and dark theme by default, provides great user experience for easy usage. The lack of internet access gives you more privacy, security and stability than other apps. + De app is ontworpen volgens material design en heeft standaard een donker thema. De app heeft geen toegang tot het internet nodig en voorziet van meer privacy, veiligheid en stabiliteit dan andere apps. Bevat geen advertenties of onnodige machtigingen. Volledig open-source. Kleuren van de app kunnen worden aangepast. From e8b83801f439b38956c217c0bca8e7f05e4ac1ab Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 18 May 2020 20:19:57 +0200 Subject: [PATCH 002/131] allow sharing private contacts with Simple Dialer and SMS Messenger --- app/build.gradle | 2 +- app/src/main/AndroidManifest.xml | 5 ++ .../contacts/pro/activities/MainActivity.kt | 1 - .../pro/activities/SettingsActivity.kt | 9 +++ .../MyContactsContentProvider.kt | 47 +++++++++++++++ .../contacts/pro/helpers/Config.kt | 4 ++ .../contacts/pro/helpers/Constants.kt | 1 + .../pro/helpers/LocalContactsHelper.kt | 12 +++- app/src/main/res/layout/activity_settings.xml | 60 +++++++++++++------ 9 files changed, 119 insertions(+), 22 deletions(-) create mode 100644 app/src/main/kotlin/com/simplemobiletools/contacts/pro/contentproviders/MyContactsContentProvider.kt diff --git a/app/build.gradle b/app/build.gradle index 6eb98b50..a6030711 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -57,7 +57,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.28.2' + implementation 'com.simplemobiletools:commons:5.28.10' implementation 'joda-time:joda-time:2.10.1' implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5' implementation 'com.github.tibbi:IndicatorFastScroll:08f512858a' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 9d3a040a..5e6d20a1 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -299,6 +299,11 @@ android:resource="@xml/provider_paths"/> + + ?, selection: String?, selectionArgs: Array?, sortOrder: String?): Cursor? { + if (context == null || !context!!.config.showPrivateContacts) { + return null + } else { + val matrixCursor = MatrixCursor(arrayOf( + MyContactsContentProvider.COL_RAW_ID, + MyContactsContentProvider.COL_CONTACT_ID, + MyContactsContentProvider.COL_NAME, + MyContactsContentProvider.COL_PHOTO_URI, + MyContactsContentProvider.COL_PHONE_NUMBER) + ) + + LocalContactsHelper(context!!).getPrivateSimpleContactsSync().forEach { + matrixCursor.newRow() + .add(MyContactsContentProvider.COL_RAW_ID, it.rawId) + .add(MyContactsContentProvider.COL_CONTACT_ID, it.contactId) + .add(MyContactsContentProvider.COL_NAME, it.name) + .add(MyContactsContentProvider.COL_PHOTO_URI, it.photoUri) + .add(MyContactsContentProvider.COL_PHONE_NUMBER, it.phoneNumber) + } + + return matrixCursor + } + } + + override fun onCreate() = true + + override fun update(uri: Uri, values: ContentValues?, selection: String?, selectionArgs: Array?) = 1 + + override fun delete(uri: Uri, selection: String?, selectionArgs: Array?): Int = 0 + + override fun getType(uri: Uri) = "" +} diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt index b931a9ee..097447b3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt @@ -73,6 +73,10 @@ class Config(context: Context) : BaseConfig(context) { get() = prefs.getString(SPEED_DIAL, "")!! set(speedDial) = prefs.edit().putString(SPEED_DIAL, speedDial).apply() + var showPrivateContacts: Boolean + get() = prefs.getBoolean(SHOW_PRIVATE_CONTACTS, true) + set(showPrivateContacts) = prefs.edit().putBoolean(SHOW_PRIVATE_CONTACTS, showPrivateContacts).apply() + fun saveCustomSIM(number: String, SIMlabel: String) { prefs.edit().putString(REMEMBER_SIM_PREFIX + number, Uri.encode(SIMlabel)).apply() } diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt index 3fdf1044..b1ff52cc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt @@ -21,6 +21,7 @@ const val SPEED_DIAL = "speed_dial" const val LAST_EXPORT_PATH = "last_export_path" const val WAS_LOCAL_ACCOUNT_INITIALIZED = "was_local_account_initialized" const val REMEMBER_SIM_PREFIX = "remember_sim_" +const val SHOW_PRIVATE_CONTACTS = "show_private_contacts" const val CONTACT_ID = "contact_id" const val SMT_PRIVATE = "smt_private" // used at the contact source of local contacts hidden from other apps diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/LocalContactsHelper.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/LocalContactsHelper.kt index d4bf5d95..977c82ce 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/LocalContactsHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/LocalContactsHelper.kt @@ -6,6 +6,7 @@ import android.graphics.BitmapFactory import android.net.Uri import android.provider.MediaStore import com.simplemobiletools.commons.extensions.getChoppedList +import com.simplemobiletools.commons.models.SimpleContact import com.simplemobiletools.contacts.pro.extensions.contactsDB import com.simplemobiletools.contacts.pro.extensions.getByteArray import com.simplemobiletools.contacts.pro.extensions.getEmptyContact @@ -104,7 +105,6 @@ class LocalContactsHelper(val context: Context) { surname = localContact.surname suffix = localContact.suffix nickname = localContact.nickname - photoUri = "" phoneNumbers = localContact.phoneNumbers emails = localContact.emails addresses = localContact.addresses @@ -152,4 +152,14 @@ class LocalContactsHelper(val context: Context) { IMs = contact.IMs } } + + private fun convertContactToSimpleContact(contact: Contact?): SimpleContact? { + return if (contact == null || contact.phoneNumbers.isEmpty()) { + null + } else { + SimpleContact(contact.id, 0, contact.getNameToDisplay(), contact.photoUri, contact.phoneNumbers.first().value) + } + } + + fun getPrivateSimpleContactsSync() = getAllContacts().mapNotNull { convertContactToSimpleContact(it) } } diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index fbfd5d15..86855c88 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -1,6 +1,5 @@ - + android:text="@string/customize_colors" /> @@ -52,7 +51,7 @@ android:clickable="false" android:paddingStart="@dimen/medium_margin" android:text="@string/use_english_language" - app:switchPadding="@dimen/medium_margin"/> + app:switchPadding="@dimen/medium_margin" /> @@ -73,7 +72,7 @@ android:layout_height="wrap_content" android:layout_centerVertical="true" android:paddingStart="@dimen/medium_margin" - android:text="@string/manage_shown_contact_fields"/> + android:text="@string/manage_shown_contact_fields" /> @@ -94,7 +93,7 @@ android:layout_height="wrap_content" android:layout_centerVertical="true" android:paddingStart="@dimen/medium_margin" - android:text="@string/manage_shown_tabs"/> + android:text="@string/manage_shown_tabs" /> @@ -115,7 +114,7 @@ android:layout_height="wrap_content" android:layout_centerVertical="true" android:paddingStart="@dimen/medium_margin" - android:text="@string/manage_blocked_numbers"/> + android:text="@string/manage_blocked_numbers" /> @@ -136,7 +135,7 @@ android:layout_height="wrap_content" android:layout_centerVertical="true" android:paddingStart="@dimen/medium_margin" - android:text="@string/manage_speed_dial"/> + android:text="@string/manage_speed_dial" /> @@ -159,7 +158,7 @@ android:layout_toStartOf="@+id/settings_font_size" android:paddingLeft="@dimen/medium_margin" android:paddingRight="@dimen/medium_margin" - android:text="@string/font_size"/> + android:text="@string/font_size" /> + android:clickable="false" /> @@ -191,7 +190,7 @@ android:clickable="false" android:paddingStart="@dimen/medium_margin" android:text="@string/show_contact_thumbnails" - app:switchPadding="@dimen/medium_margin"/> + app:switchPadding="@dimen/medium_margin" /> @@ -214,7 +213,7 @@ android:clickable="false" android:paddingStart="@dimen/medium_margin" android:text="@string/show_phone_numbers" - app:switchPadding="@dimen/medium_margin"/> + app:switchPadding="@dimen/medium_margin" /> @@ -237,7 +236,7 @@ android:clickable="false" android:paddingStart="@dimen/medium_margin" android:text="@string/show_only_contacts_with_numbers" - app:switchPadding="@dimen/medium_margin"/> + app:switchPadding="@dimen/medium_margin" /> @@ -260,7 +259,7 @@ android:clickable="false" android:paddingStart="@dimen/medium_margin" android:text="@string/start_name_with_surname" - app:switchPadding="@dimen/medium_margin"/> + app:switchPadding="@dimen/medium_margin" /> @@ -283,7 +282,7 @@ android:clickable="false" android:paddingStart="@dimen/medium_margin" android:text="@string/show_call_confirmation_dialog" - app:switchPadding="@dimen/medium_margin"/> + app:switchPadding="@dimen/medium_margin" /> @@ -306,7 +305,7 @@ android:clickable="false" android:paddingStart="@dimen/medium_margin" android:text="@string/show_dialpad_button" - app:switchPadding="@dimen/medium_margin"/> + app:switchPadding="@dimen/medium_margin" /> @@ -329,7 +328,30 @@ android:clickable="false" android:paddingStart="@dimen/medium_margin" android:text="@string/show_dialpad_letters" - app:switchPadding="@dimen/medium_margin"/> + app:switchPadding="@dimen/medium_margin" /> + + + + + + @@ -352,7 +374,7 @@ android:layout_toStartOf="@+id/settings_on_contact_click" android:paddingStart="@dimen/medium_margin" android:paddingEnd="@dimen/medium_margin" - android:text="@string/on_contact_click"/> + android:text="@string/on_contact_click" /> + android:clickable="false" /> From dce4f88f7ebfad80790712e0a7812b88c4270640 Mon Sep 17 00:00:00 2001 From: spkprs Date: Mon, 18 May 2020 22:21:39 +0300 Subject: [PATCH 003/131] fix --- app/src/main/res/values-el/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index c7fac1a2..f80e3ae3 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -66,7 +66,7 @@ Εμφάνιση διαλόγου επιβεβαίωσης πριν από την έναρξη μιας κλήσης Προβολή όλων των Επαφών με αριθμούς τηλεφώνου Εμφάνιση γραμμάτων στην πληκτρολόγιο - Εμφάνιση ιδιωτικών επαφών σε Simple Dialer και Simple SMS Messenger + Εμφάνιση ιδιωτικών επαφών σε Απλή Κλήση και Απλός SMS Messenger Οικία From 135f9420b3ca294b17a2db98b0bab6fd6a2f16dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Marques?= Date: Tue, 19 May 2020 23:42:14 +0100 Subject: [PATCH 004/131] Update strings.xml --- app/src/main/res/values-pt/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 3ad0404a..1ad1a370 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -66,7 +66,7 @@ Mostrar diálogo para confirmar a chamada Mostrar apenas contactos com número de telefone Mostrar letras no marcador - Show private contacts to Simple Dialer and Simple SMS Messenger + Mostrar contactos privados em Simple Dialer e em Simple SMS Messenger Pessoal From 697726b7e1f23685466c78786cbb972a905b742d Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 20 May 2020 15:06:12 +0200 Subject: [PATCH 005/131] use same id at local contacts as raw and contact id --- .../contacts/pro/helpers/LocalContactsHelper.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/LocalContactsHelper.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/LocalContactsHelper.kt index 977c82ce..9b867d49 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/LocalContactsHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/LocalContactsHelper.kt @@ -157,7 +157,7 @@ class LocalContactsHelper(val context: Context) { return if (contact == null || contact.phoneNumbers.isEmpty()) { null } else { - SimpleContact(contact.id, 0, contact.getNameToDisplay(), contact.photoUri, contact.phoneNumbers.first().value) + SimpleContact(contact.id, contact.id, contact.getNameToDisplay(), contact.photoUri, contact.phoneNumbers.first().value) } } From c0bfe2103281a699e4c90629e46f31b261be000b Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 23 May 2020 20:00:02 +0200 Subject: [PATCH 006/131] updating commons, reuse TAB constants from there --- app/build.gradle | 2 +- .../activities/InsertOrEditContactActivity.kt | 21 ++++++++---------- .../contacts/pro/activities/MainActivity.kt | 18 +++++++-------- .../contacts/pro/adapters/ContactsAdapter.kt | 16 ++++++-------- .../contacts/pro/adapters/GroupsAdapter.kt | 6 ++--- .../contacts/pro/adapters/ViewPagerAdapter.kt | 12 +++++----- .../pro/dialogs/ManageVisibleTabsDialog.kt | 22 +++++++++---------- .../pro/fragments/FavoritesFragment.kt | 4 ++-- .../contacts/pro/fragments/GroupsFragment.kt | 4 ++-- .../pro/fragments/MyViewPagerFragment.kt | 12 +++++----- .../contacts/pro/helpers/Constants.kt | 14 ++++++------ 11 files changed, 62 insertions(+), 69 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a6030711..481da433 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -57,7 +57,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.28.10' + implementation 'com.simplemobiletools:commons:5.28.20' implementation 'joda-time:joda-time:2.10.1' implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5' implementation 'com.github.tibbi:IndicatorFastScroll:08f512858a' diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/InsertOrEditContactActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/InsertOrEditContactActivity.kt index 6710812a..4787df2b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/InsertOrEditContactActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/InsertOrEditContactActivity.kt @@ -13,10 +13,7 @@ import androidx.appcompat.widget.SearchView import androidx.core.view.MenuItemCompat import androidx.viewpager.widget.ViewPager import com.simplemobiletools.commons.extensions.* -import com.simplemobiletools.commons.helpers.KEY_PHONE -import com.simplemobiletools.commons.helpers.PERMISSION_GET_ACCOUNTS -import com.simplemobiletools.commons.helpers.PERMISSION_READ_CONTACTS -import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_CONTACTS +import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.contacts.pro.R import com.simplemobiletools.contacts.pro.adapters.ViewPagerAdapter import com.simplemobiletools.contacts.pro.dialogs.ChangeSortingDialog @@ -39,8 +36,8 @@ class InsertOrEditContactActivity : SimpleActivity(), RefreshContactsListener { private var searchMenuItem: MenuItem? = null private val contactsFavoritesList = arrayListOf( - CONTACTS_TAB_MASK, - FAVORITES_TAB_MASK + TAB_CONTACTS, + TAB_FAVORITES ) override fun onCreate(savedInstanceState: Bundle?) { @@ -133,7 +130,7 @@ class InsertOrEditContactActivity : SimpleActivity(), RefreshContactsListener { insert_or_edit_tabs_holder.removeAllTabs() var skippedTabs = 0 contactsFavoritesList.forEachIndexed { index, value -> - if (config.showTabs and value == 0 && value == FAVORITES_TAB_MASK) { + if (config.showTabs and value == 0 && value == TAB_FAVORITES) { skippedTabs++ } else { val tab = insert_or_edit_tabs_holder.newTab().setIcon(getTabIcon(index)) @@ -220,11 +217,11 @@ class InsertOrEditContactActivity : SimpleActivity(), RefreshContactsListener { return@getContacts } - if (refreshTabsMask and CONTACTS_TAB_MASK != 0) { + if (refreshTabsMask and TAB_CONTACTS != 0) { contacts_fragment?.refreshContacts(contacts) } - if (refreshTabsMask and FAVORITES_TAB_MASK != 0) { + if (refreshTabsMask and TAB_FAVORITES != 0) { favorites_fragment?.refreshContacts(contacts) } } @@ -298,9 +295,9 @@ class InsertOrEditContactActivity : SimpleActivity(), RefreshContactsListener { } fun getTabsMask(): Int { - var mask = CONTACTS_TAB_MASK - if (config.showTabs and FAVORITES_TAB_MASK != 0) { - mask += FAVORITES_TAB_MASK + var mask = TAB_CONTACTS + if (config.showTabs and TAB_FAVORITES != 0) { + mask += TAB_FAVORITES } return mask } diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt index 9918dfe2..663752f8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt @@ -342,15 +342,15 @@ class MainActivity : SimpleActivity(), RefreshContactsListener { private fun getCurrentFragment(): MyViewPagerFragment? { val showTabs = config.showTabs val fragments = arrayListOf() - if (showTabs and CONTACTS_TAB_MASK != 0) { + if (showTabs and TAB_CONTACTS != 0) { fragments.add(contacts_fragment) } - if (showTabs and FAVORITES_TAB_MASK != 0) { + if (showTabs and TAB_FAVORITES != 0) { fragments.add(favorites_fragment) } - if (showTabs and GROUPS_TAB_MASK != 0) { + if (showTabs and TAB_GROUPS != 0) { fragments.add(groups_fragment) } @@ -446,14 +446,14 @@ class MainActivity : SimpleActivity(), RefreshContactsListener { private fun showSortingDialog() { ChangeSortingDialog(this) { - refreshContacts(CONTACTS_TAB_MASK or FAVORITES_TAB_MASK) + refreshContacts(TAB_CONTACTS or TAB_FAVORITES) } } fun showFilterDialog() { FilterContactSourcesDialog(this) { contacts_fragment?.forceListRedraw = true - refreshContacts(CONTACTS_TAB_MASK or FAVORITES_TAB_MASK) + refreshContacts(TAB_CONTACTS or TAB_FAVORITES) } } @@ -590,16 +590,16 @@ class MainActivity : SimpleActivity(), RefreshContactsListener { return@getContacts } - if (refreshTabsMask and CONTACTS_TAB_MASK != 0) { + if (refreshTabsMask and TAB_CONTACTS != 0) { contacts_fragment?.refreshContacts(contacts) } - if (refreshTabsMask and FAVORITES_TAB_MASK != 0) { + if (refreshTabsMask and TAB_FAVORITES != 0) { favorites_fragment?.refreshContacts(contacts) } - if (refreshTabsMask and GROUPS_TAB_MASK != 0) { - if (refreshTabsMask == GROUPS_TAB_MASK) { + if (refreshTabsMask and TAB_GROUPS != 0) { + if (refreshTabsMask == TAB_GROUPS) { groups_fragment.skipHashComparing = true } groups_fragment?.refreshContacts(contacts) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/ContactsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/ContactsAdapter.kt index bb51e5eb..aee2c3ca 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/ContactsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/ContactsAdapter.kt @@ -16,8 +16,7 @@ import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.extensions.* -import com.simplemobiletools.commons.helpers.SimpleContactsHelper -import com.simplemobiletools.commons.helpers.ensureBackgroundThread +import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.commons.models.RadioItem import com.simplemobiletools.commons.views.FastScroller import com.simplemobiletools.commons.views.MyRecyclerView @@ -137,9 +136,8 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList, val val group = getItemWithKey(selectedKeys.first()) ?: return RenameGroupDialog(activity, group) { finishActMode() - refreshListener?.refreshContacts(GROUPS_TAB_MASK) + refreshListener?.refreshContacts(TAB_GROUPS) } } @@ -143,7 +143,7 @@ class GroupsAdapter(activity: SimpleActivity, var groups: ArrayList, val activity.runOnUiThread { if (groups.isEmpty()) { - refreshListener?.refreshContacts(GROUPS_TAB_MASK) + refreshListener?.refreshContacts(TAB_GROUPS) finishActMode() } else { removeSelectedItems(positions) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/ViewPagerAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/ViewPagerAdapter.kt index ab141e80..e4cb8d3e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/ViewPagerAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/ViewPagerAdapter.kt @@ -3,12 +3,12 @@ package com.simplemobiletools.contacts.pro.adapters import android.view.View import android.view.ViewGroup import androidx.viewpager.widget.PagerAdapter +import com.simplemobiletools.commons.helpers.TAB_CONTACTS +import com.simplemobiletools.commons.helpers.TAB_FAVORITES +import com.simplemobiletools.commons.helpers.TAB_GROUPS import com.simplemobiletools.contacts.pro.R import com.simplemobiletools.contacts.pro.activities.SimpleActivity import com.simplemobiletools.contacts.pro.fragments.MyViewPagerFragment -import com.simplemobiletools.contacts.pro.helpers.CONTACTS_TAB_MASK -import com.simplemobiletools.contacts.pro.helpers.FAVORITES_TAB_MASK -import com.simplemobiletools.contacts.pro.helpers.GROUPS_TAB_MASK class ViewPagerAdapter(val activity: SimpleActivity, val currTabsList: ArrayList, val showTabs: Int) : PagerAdapter() { @@ -34,15 +34,15 @@ class ViewPagerAdapter(val activity: SimpleActivity, val currTabsList: ArrayList private fun getFragment(position: Int): Int { val fragments = arrayListOf() - if (showTabs and CONTACTS_TAB_MASK != 0) { + if (showTabs and TAB_CONTACTS != 0) { fragments.add(R.layout.fragment_contacts) } - if (showTabs and FAVORITES_TAB_MASK != 0) { + if (showTabs and TAB_FAVORITES != 0) { fragments.add(R.layout.fragment_favorites) } - if (showTabs and GROUPS_TAB_MASK != 0) { + if (showTabs and TAB_GROUPS != 0) { fragments.add(R.layout.fragment_groups) } diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/ManageVisibleTabsDialog.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/ManageVisibleTabsDialog.kt index 0ecc7271..d73a2218 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/ManageVisibleTabsDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/ManageVisibleTabsDialog.kt @@ -3,13 +3,13 @@ package com.simplemobiletools.contacts.pro.dialogs import androidx.appcompat.app.AlertDialog import com.simplemobiletools.commons.activities.BaseSimpleActivity import com.simplemobiletools.commons.extensions.setupDialogStuff +import com.simplemobiletools.commons.helpers.TAB_CONTACTS +import com.simplemobiletools.commons.helpers.TAB_FAVORITES +import com.simplemobiletools.commons.helpers.TAB_GROUPS import com.simplemobiletools.commons.views.MyAppCompatCheckbox import com.simplemobiletools.contacts.pro.R import com.simplemobiletools.contacts.pro.extensions.config import com.simplemobiletools.contacts.pro.helpers.ALL_TABS_MASK -import com.simplemobiletools.contacts.pro.helpers.CONTACTS_TAB_MASK -import com.simplemobiletools.contacts.pro.helpers.FAVORITES_TAB_MASK -import com.simplemobiletools.contacts.pro.helpers.GROUPS_TAB_MASK class ManageVisibleTabsDialog(val activity: BaseSimpleActivity) { private var view = activity.layoutInflater.inflate(R.layout.dialog_manage_visible_tabs, null) @@ -17,9 +17,9 @@ class ManageVisibleTabsDialog(val activity: BaseSimpleActivity) { init { tabs.apply { - put(CONTACTS_TAB_MASK, R.id.manage_visible_tabs_contacts) - put(FAVORITES_TAB_MASK, R.id.manage_visible_tabs_favorites) - put(GROUPS_TAB_MASK, R.id.manage_visible_tabs_groups) + put(TAB_CONTACTS, R.id.manage_visible_tabs_contacts) + put(TAB_FAVORITES, R.id.manage_visible_tabs_favorites) + put(TAB_GROUPS, R.id.manage_visible_tabs_groups) } val showTabs = activity.config.showTabs @@ -28,11 +28,11 @@ class ManageVisibleTabsDialog(val activity: BaseSimpleActivity) { } AlertDialog.Builder(activity) - .setPositiveButton(R.string.ok) { dialog, which -> dialogConfirmed() } - .setNegativeButton(R.string.cancel, null) - .create().apply { - activity.setupDialogStuff(view, this) - } + .setPositiveButton(R.string.ok) { dialog, which -> dialogConfirmed() } + .setNegativeButton(R.string.cancel, null) + .create().apply { + activity.setupDialogStuff(view, this) + } } private fun dialogConfirmed() { diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/FavoritesFragment.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/FavoritesFragment.kt index 2502edd8..f8460f1f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/FavoritesFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/FavoritesFragment.kt @@ -2,11 +2,11 @@ package com.simplemobiletools.contacts.pro.fragments import android.content.Context import android.util.AttributeSet +import com.simplemobiletools.commons.helpers.TAB_FAVORITES import com.simplemobiletools.contacts.pro.activities.MainActivity import com.simplemobiletools.contacts.pro.activities.SimpleActivity import com.simplemobiletools.contacts.pro.dialogs.SelectContactsDialog import com.simplemobiletools.contacts.pro.helpers.ContactsHelper -import com.simplemobiletools.contacts.pro.helpers.FAVORITES_TAB_MASK class FavoritesFragment(context: Context, attributeSet: AttributeSet) : MyViewPagerFragment(context, attributeSet) { override fun fabClicked() { @@ -25,7 +25,7 @@ class FavoritesFragment(context: Context, attributeSet: AttributeSet) : MyViewPa removeFavorites(removedContacts) } - (activity as? MainActivity)?.refreshContacts(FAVORITES_TAB_MASK) + (activity as? MainActivity)?.refreshContacts(TAB_FAVORITES) } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/GroupsFragment.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/GroupsFragment.kt index 22ba261a..23f1bf37 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/GroupsFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/GroupsFragment.kt @@ -2,10 +2,10 @@ package com.simplemobiletools.contacts.pro.fragments import android.content.Context import android.util.AttributeSet +import com.simplemobiletools.commons.helpers.TAB_GROUPS import com.simplemobiletools.contacts.pro.activities.MainActivity import com.simplemobiletools.contacts.pro.activities.SimpleActivity import com.simplemobiletools.contacts.pro.dialogs.CreateNewGroupDialog -import com.simplemobiletools.contacts.pro.helpers.GROUPS_TAB_MASK class GroupsFragment(context: Context, attributeSet: AttributeSet) : MyViewPagerFragment(context, attributeSet) { override fun fabClicked() { @@ -19,7 +19,7 @@ class GroupsFragment(context: Context, attributeSet: AttributeSet) : MyViewPager private fun showNewGroupsDialog() { CreateNewGroupDialog(activity as SimpleActivity) { - (activity as? MainActivity)?.refreshContacts(GROUPS_TAB_MASK) + (activity as? MainActivity)?.refreshContacts(TAB_GROUPS) } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/MyViewPagerFragment.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/MyViewPagerFragment.kt index 2d108fb2..25b1b5e5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/MyViewPagerFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/MyViewPagerFragment.kt @@ -8,9 +8,7 @@ import androidx.coordinatorlayout.widget.CoordinatorLayout import com.reddit.indicatorfastscroll.FastScrollItemIndicator import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter import com.simplemobiletools.commons.extensions.* -import com.simplemobiletools.commons.helpers.SORT_BY_FIRST_NAME -import com.simplemobiletools.commons.helpers.SORT_BY_MIDDLE_NAME -import com.simplemobiletools.commons.helpers.SORT_BY_SURNAME +import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.contacts.pro.R import com.simplemobiletools.contacts.pro.activities.GroupContactsActivity import com.simplemobiletools.contacts.pro.activities.InsertOrEditContactActivity @@ -108,15 +106,15 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet) if (this !is GroupsFragment) { (fragment_list.adapter as? ContactsAdapter)?.apply { config.sorting = if (startNameWithSurname) SORT_BY_SURNAME else SORT_BY_FIRST_NAME - (this@MyViewPagerFragment.activity!! as MainActivity).refreshContacts(CONTACTS_TAB_MASK or FAVORITES_TAB_MASK) + (this@MyViewPagerFragment.activity!! as MainActivity).refreshContacts(TAB_CONTACTS or TAB_FAVORITES) } } } fun refreshContacts(contacts: ArrayList) { - if ((config.showTabs and CONTACTS_TAB_MASK == 0 && this is ContactsFragment && activity !is InsertOrEditContactActivity) || - (config.showTabs and FAVORITES_TAB_MASK == 0 && this is FavoritesFragment) || - (config.showTabs and GROUPS_TAB_MASK == 0 && this is GroupsFragment)) { + if ((config.showTabs and TAB_CONTACTS == 0 && this is ContactsFragment && activity !is InsertOrEditContactActivity) || + (config.showTabs and TAB_FAVORITES == 0 && this is FavoritesFragment) || + (config.showTabs and TAB_GROUPS == 0 && this is GroupsFragment)) { return } diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt index b1ff52cc..353e7175 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt @@ -2,6 +2,9 @@ package com.simplemobiletools.contacts.pro.helpers import android.provider.ContactsContract.CommonDataKinds import com.simplemobiletools.commons.extensions.normalizeString +import com.simplemobiletools.commons.helpers.TAB_CONTACTS +import com.simplemobiletools.commons.helpers.TAB_FAVORITES +import com.simplemobiletools.commons.helpers.TAB_GROUPS import com.simplemobiletools.contacts.pro.models.LocalContact // shared prefs @@ -47,14 +50,11 @@ const val LOCATION_GROUP_CONTACTS = 2 const val LOCATION_DIALPAD = 3 const val LOCATION_INSERT_OR_EDIT = 4 -const val CONTACTS_TAB_MASK = 1 -const val FAVORITES_TAB_MASK = 2 -const val GROUPS_TAB_MASK = 8 -const val ALL_TABS_MASK = CONTACTS_TAB_MASK or FAVORITES_TAB_MASK or GROUPS_TAB_MASK +const val ALL_TABS_MASK = TAB_CONTACTS or TAB_FAVORITES or TAB_GROUPS -val tabsList = arrayListOf(CONTACTS_TAB_MASK, - FAVORITES_TAB_MASK, - GROUPS_TAB_MASK +val tabsList = arrayListOf(TAB_CONTACTS, + TAB_FAVORITES, + TAB_GROUPS ) // contact photo changes From 4ae0cb3ba583639b0707b6862ea3dcc0e5d677c9 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 23 May 2020 20:14:06 +0200 Subject: [PATCH 007/131] show a dialog warning about calling functionality moved into Simple Dialer --- .../contacts/pro/activities/MainActivity.kt | 22 ++++++++++--- .../contacts/pro/dialogs/DialerMovedDialog.kt | 30 ++++++++++++++++++ .../contacts/pro/helpers/Config.kt | 4 +++ .../contacts/pro/helpers/Constants.kt | 1 + .../res/drawable-hdpi/ic_launcher_dialer.png | Bin 0 -> 2930 bytes .../res/drawable-xhdpi/ic_launcher_dialer.png | Bin 0 -> 3690 bytes .../drawable-xxhdpi/ic_launcher_dialer.png | Bin 0 -> 6849 bytes .../drawable-xxxhdpi/ic_launcher_dialer.png | Bin 0 -> 7231 bytes .../main/res/layout/dialog_dialer_moved.xml | 28 ++++++++++++++++ 9 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/DialerMovedDialog.kt create mode 100644 app/src/main/res/drawable-hdpi/ic_launcher_dialer.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_launcher_dialer.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_launcher_dialer.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_launcher_dialer.png create mode 100644 app/src/main/res/layout/dialog_dialer_moved.xml diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt index 663752f8..8a8b81dd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt @@ -27,15 +27,15 @@ import com.simplemobiletools.contacts.pro.BuildConfig import com.simplemobiletools.contacts.pro.R import com.simplemobiletools.contacts.pro.adapters.ViewPagerAdapter import com.simplemobiletools.contacts.pro.databases.ContactsDatabase -import com.simplemobiletools.contacts.pro.dialogs.ChangeSortingDialog -import com.simplemobiletools.contacts.pro.dialogs.ExportContactsDialog -import com.simplemobiletools.contacts.pro.dialogs.FilterContactSourcesDialog -import com.simplemobiletools.contacts.pro.dialogs.ImportContactsDialog +import com.simplemobiletools.contacts.pro.dialogs.* import com.simplemobiletools.contacts.pro.extensions.config import com.simplemobiletools.contacts.pro.extensions.getTempFile import com.simplemobiletools.contacts.pro.extensions.handleGenericContactClick import com.simplemobiletools.contacts.pro.fragments.MyViewPagerFragment -import com.simplemobiletools.contacts.pro.helpers.* +import com.simplemobiletools.contacts.pro.helpers.ALL_TABS_MASK +import com.simplemobiletools.contacts.pro.helpers.ContactsHelper +import com.simplemobiletools.contacts.pro.helpers.VcfExporter +import com.simplemobiletools.contacts.pro.helpers.tabsList import com.simplemobiletools.contacts.pro.interfaces.RefreshContactsListener import com.simplemobiletools.contacts.pro.models.Contact import kotlinx.android.synthetic.main.activity_main.* @@ -76,6 +76,7 @@ class MainActivity : SimpleActivity(), RefreshContactsListener { checkContactPermissions() storeStateVariables() checkWhatsNewDialog() + checkDialerMigrationDialog() } private fun checkContactPermissions() { @@ -613,6 +614,17 @@ class MainActivity : SimpleActivity(), RefreshContactsListener { private fun getAllFragments() = arrayListOf(contacts_fragment, favorites_fragment, groups_fragment) + private fun checkDialerMigrationDialog() { + if (config.appRunCount < 3) { + config.wasDialerMigrationShown = true + } + + if (!config.wasDialerMigrationShown) { + config.wasDialerMigrationShown = true + DialerMovedDialog(this) + } + } + private fun checkWhatsNewDialog() { arrayListOf().apply { add(Release(10, R.string.release_10)) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/DialerMovedDialog.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/DialerMovedDialog.kt new file mode 100644 index 00000000..d9258f8d --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/DialerMovedDialog.kt @@ -0,0 +1,30 @@ +package com.simplemobiletools.contacts.pro.dialogs + +import android.text.Html +import android.text.method.LinkMovementMethod +import androidx.appcompat.app.AlertDialog +import com.simplemobiletools.commons.activities.BaseSimpleActivity +import com.simplemobiletools.commons.extensions.launchViewIntent +import com.simplemobiletools.commons.extensions.setupDialogStuff +import com.simplemobiletools.contacts.pro.R +import kotlinx.android.synthetic.main.dialog_dialer_moved.view.* + +class DialerMovedDialog(val activity: BaseSimpleActivity) { + init { + val view = activity.layoutInflater.inflate(R.layout.dialog_dialer_moved, null).apply { + dialer_moved.text = Html.fromHtml(activity.getString(R.string.dialer_moved)) + dialer_moved.movementMethod = LinkMovementMethod.getInstance() + + dialer_moved_icon.setOnClickListener { + activity.launchViewIntent("https://play.google.com/store/apps/details?id=com.simplemobiletools.dialer") + } + } + + AlertDialog.Builder(activity) + .setPositiveButton(R.string.download) { dialog, which -> } + .setNegativeButton(R.string.cancel, null) + .create().apply { + activity.setupDialogStuff(view, this) + } + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt index 097447b3..98c5bea8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt @@ -96,4 +96,8 @@ class Config(context: Context) : BaseConfig(context) { return speedDialValues } + + var wasDialerMigrationShown: Boolean + get() = prefs.getBoolean(WAS_DIALER_MIGRATION_SHOWN, false) + set(wasDialerMigrationShown) = prefs.edit().putBoolean(WAS_DIALER_MIGRATION_SHOWN, wasDialerMigrationShown).apply() } diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt index 353e7175..6f61d448 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt @@ -25,6 +25,7 @@ const val LAST_EXPORT_PATH = "last_export_path" const val WAS_LOCAL_ACCOUNT_INITIALIZED = "was_local_account_initialized" const val REMEMBER_SIM_PREFIX = "remember_sim_" const val SHOW_PRIVATE_CONTACTS = "show_private_contacts" +const val WAS_DIALER_MIGRATION_SHOWN = "was_dialer_migration_shown" const val CONTACT_ID = "contact_id" const val SMT_PRIVATE = "smt_private" // used at the contact source of local contacts hidden from other apps diff --git a/app/src/main/res/drawable-hdpi/ic_launcher_dialer.png b/app/src/main/res/drawable-hdpi/ic_launcher_dialer.png new file mode 100644 index 0000000000000000000000000000000000000000..e78912bb3222a845f713f911a39fd75541710a06 GIT binary patch literal 2930 zcmV-&3yt)NP)fC3Q=CW;X>1cRhd z)Mx}mgB0R}VAK#LDhe!>g&=|yC2B!Q6oV#Fqh%EF5h(=|e8mv(6)KAO0^}tK>|=Ij z?!BE4z_PP5bMHKN{lNdz?zw%s&-~|{?mp-A9XO8TIF2Gh+QR6b8wt0oq-z|y<8Xp$ z&=aLnp%O4eIH<7CP`2B`PU7segzX&`@NH|4wN(hx8iKVA^z;Qd4`HM_3`D2|$^f5x zXKbJm;ai2R;;;^r7a9++rRo6=6?^POB}ng}eZ!8(ZW`b=foq}Y#3VwA z0xzgCuWUZ=7mBEY5maBzbpo>$dKOA&PEZaaEDQOVD>XFct1fSXw1#dCaqb7kAZ-&B z(_jjO2+W~k%vu)xXRF>;P#pE}%D7T__d!O2B|k*nqUSzPQWFNx6q zJ4y~fl^8tKXfZ>_VdkPBrw>+N&2=bC5lV9D-|A2lSQ_$ktJDz7rfb$SsBR`#3*476 zIfg%56NSg&8Gb_~&Z2B*QdR^tR&$;hEY-squsebk_(v_KZJs70F0_W_(!jRKsXbV#Y8}0adbA{%S1RMf+BH# z2b}4tY`~?IjC~9#tw{OY-|qs<8CDR??aPlr`Ii*p2)A?{>K$NmH- zJck6`cNk{(Gq4Ztz}dM8X-l4z?y(Sc^Vjp1o0#i|-g6^i0~R9QMEZu_3Z<2v;}SDK z@WRD7T~5a-=(aLT2qFfzH&)ZfP0W>`@(RWx4E8h@>WJ?L6Oat2gi+dovdjO373|cu zBta)trn?EGC20R0v{zx4o6J#|14e@{nAOOP&ZiI>y_^^&ZAy{@6Y6I&DBbh4AHLMj z7{z`1H7V)t>A#a8BKQYfLg~<{L@ls$+9?$TAq*y`d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cXDxT-`1Vwx42 zE7|w02pNSWS%G8(dK9_@(yF|t!UiL(G0I9@)=3$N5~8% v>oUR!BaAS@2qTOz!U!XbFv18U3@QE_X+%oya~8c>00000NkvXXu0mjfnkP3> literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxxhdpi/ic_launcher_dialer.png b/app/src/main/res/drawable-xxxhdpi/ic_launcher_dialer.png new file mode 100644 index 0000000000000000000000000000000000000000..832d540c3e28daddd73bf5e9e33cfb9dd97b9669 GIT binary patch literal 7231 zcmZ`;bx_pNxBu=^3rP1;OLs|kN;eXcOCv}l9lJ}4f{3JaD;*+8cMBrYBB|8Ef=Ji% z{oZ?jzB6;rnYlA}=H#6@pU(?JeGMW4C;3e;)|$KW+Tu86E&I;A*KU zKMr0x$P4PAnr$BL4x5^I+QI^6g;Bp70ta&7Hxz#3XFnPkdD%hBb{v7`G$`0M_Ue^8 z$%l$Vb;t=b5@Hs#(9nNYV1W<<;Xd`dnuv_b_0Z_t&d-(>-A1o&`>Tz~o19%uT6#<^ zc|>RYe_}?Zy<=tAmHUMDNzQxYff)A0Vth9+F5jRJHc?*GoQ^VcVbJy}7d8Y(qF$@V z62}9(8dpL6E7GBil%KlZnkuT>h=(AK-5LLnpF}bfhzLR|TrSX&4A9BgY+Z`?QD^AN7}j4$J5lTm1l7;s2`s~aaJfyYN%2jA9bGXThx%#ObQ zQKB9JFq*+ky|)bzk^~ot-8VBpTJ^*O{^24mNT6AwBP9dT1L8&JQsg%F1l3U~>b#Vl z%43@4E$-Sre|a`i+qV^kg`Do`;icQ^K+zyHu;n<3n3BJ6mT6dH8H(Mo<4OC-2$S#N zXPJh7=7E1kESGI1S`ae30q#?4Wu$)%QO9E}AK-38^gVX5rHt|O8=e7fK;_DXs}EvR z7(WaAcm57zq8e=6D-hR0aOZgts3wwQKB_`iEa0*{17BK6EvxG$JBEkKpz8| zQzRW;|M;c=Yx847rW5Vc!Y4enH6E_fxUle|NuOc+HUtHg#ZqZ|O%PH?H+sLM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4KlOwXG5GP)iq25KrIi9a6CFg}8IWu!}xjLivF(9uq=5fWL7Y z=H#fT_7N1r-{nTpcwt14W@Fu7{p_&|*5p;$!gv8&%a$OT>VBY6l7`;wQjC_IAfxw9 zlE3!qVi_+0{4c-=|ERu}Bj1~WJC#!K+5 zsx}3ldbZSiudM#q^sf1b+|hy@8U(H8IZ+`Ie`hlllCRJwzq+fwQ_NH5Qe$tDPy!9q z5-i#LJ{7Av;!5z*y*5rB!*VCf>Q*l~QUa&4##*N5Tnq$h$Eq?8KDPY~=kup#v3M7K zT92}J%=X(YiQ~b4(^hCjq*&aBm@PuU`Onvx-wN(v| zQ(Vn{lyWR-@3=!%R~xxzblYpPY{!2V8k1V2nm-ujAv%y_nhP_hlCLt>I>VhbIV!P? zEllGzrg`O($MTuo#ph8+((AtP)yndxR^@c#$Oi7(n%Q0BI(Z~FXB#0|E>tv_>!sY5Bs+4R^tgHA31RdiiVUs_945sI+4q4i@%QeN?oPra&~_2|B(Ywlo$O-Sov0J zaLj&jQb!ev&Dw3-e1)SdDQxcgyP~!5x+(7C`Az|yUybWTSC0F)Uug#Y-E?M zW}Wu$0?2u=<Jfn14cY1P8mEqtvGRfHC12~K%GC~$7?##uzUEM1RR zFJI4AU&4F0RCThMo&ny+?kI#hveTPeWpA2A4MJ + + + + + + + From 6158b2d09574d97a29c251aa3aab664b27613d44 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 23 May 2020 20:17:39 +0200 Subject: [PATCH 008/131] lowering SDK version back to 21 (Lollipop) --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 481da433..23151ee2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -15,7 +15,7 @@ android { defaultConfig { applicationId "com.simplemobiletools.contacts.pro" - minSdkVersion 23 + minSdkVersion 21 targetSdkVersion 29 versionCode 63 versionName "6.10.2" From a38e5ac68bd96c13bc69d0309ea4ff277c2edea0 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 23 May 2020 20:19:47 +0200 Subject: [PATCH 009/131] removing Speed Dial related things --- app/src/main/AndroidManifest.xml | 5 -- .../pro/activities/ManageSpeedDialActivity.kt | 68 ---------------- .../pro/activities/SettingsActivity.kt | 7 -- .../contacts/pro/adapters/SpeedDialAdapter.kt | 80 ------------------- .../res/layout/activity_manage_speed_dial.xml | 34 -------- app/src/main/res/layout/activity_settings.xml | 21 ----- app/src/main/res/layout/item_speed_dial.xml | 15 ---- 7 files changed, 230 deletions(-) delete mode 100644 app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/ManageSpeedDialActivity.kt delete mode 100644 app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/SpeedDialAdapter.kt delete mode 100644 app/src/main/res/layout/activity_manage_speed_dial.xml delete mode 100644 app/src/main/res/layout/item_speed_dial.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 5e6d20a1..01f03f52 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -230,11 +230,6 @@ android:label="@string/blocked_numbers" android:parentActivityName=".activities.SettingsActivity"/> - - () - private var speedDialValues = ArrayList() - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_manage_speed_dial) - - speedDialValues = config.getSpeedDialValues() - updateAdapter() - ContactsHelper(this).getContacts { contacts -> - allContacts = contacts - } - - updateTextColors(manage_speed_dial_scrollview) - } - - override fun onStop() { - super.onStop() - config.speedDial = Gson().toJson(speedDialValues) - } - - private fun updateAdapter() { - SpeedDialAdapter(this, speedDialValues, this, speed_dial_list) { - val clickedContact = it as SpeedDial - if (allContacts.isEmpty()) { - return@SpeedDialAdapter - } - - SelectContactsDialog(this, allContacts, false, true) { addedContacts, removedContacts -> - val selectedContact = addedContacts.first() - speedDialValues.first { it.id == clickedContact.id }.apply { - displayName = selectedContact.getNameToDisplay() - number = selectedContact.phoneNumbers.first().value - } - updateAdapter() - } - }.apply { - speed_dial_list.adapter = this - } - } - - override fun removeSpeedDial(ids: ArrayList) { - ids.forEach { - val dialId = it - speedDialValues.first { it.id == dialId }.apply { - displayName = "" - number = "" - } - } - updateAdapter() - } -} diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/SettingsActivity.kt index e5c86ad4..c934225e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/SettingsActivity.kt @@ -35,7 +35,6 @@ class SettingsActivity : SimpleActivity() { setupManageShownContactFields() setupManageShownTabs() setupManageBlockedNumbers() - setupManageSpeedDial() setupFontSize() setupUseEnglish() setupShowContactThumbnails() @@ -83,12 +82,6 @@ class SettingsActivity : SimpleActivity() { } } - private fun setupManageSpeedDial() { - settings_manage_speed_dial_holder.setOnClickListener { - startActivity(Intent(this, ManageSpeedDialActivity::class.java)) - } - } - private fun setupFontSize() { settings_font_size.text = getFontSizeText() settings_font_size_holder.setOnClickListener { diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/SpeedDialAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/SpeedDialAdapter.kt deleted file mode 100644 index b2cc64d3..00000000 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/SpeedDialAdapter.kt +++ /dev/null @@ -1,80 +0,0 @@ -package com.simplemobiletools.contacts.pro.adapters - -import android.view.Menu -import android.view.View -import android.view.ViewGroup -import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter -import com.simplemobiletools.commons.views.MyRecyclerView -import com.simplemobiletools.contacts.pro.R -import com.simplemobiletools.contacts.pro.activities.SimpleActivity -import com.simplemobiletools.contacts.pro.interfaces.RemoveSpeedDialListener -import com.simplemobiletools.contacts.pro.models.SpeedDial -import kotlinx.android.synthetic.main.item_speed_dial.view.* -import java.util.* - -class SpeedDialAdapter(activity: SimpleActivity, var speedDialValues: ArrayList, private val removeListener: RemoveSpeedDialListener, - recyclerView: MyRecyclerView, itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, null, itemClick) { - - init { - setupDragListener(true) - } - - override fun getActionMenuId() = R.menu.cab_delete_only - - override fun prepareActionMode(menu: Menu) {} - - override fun actionItemPressed(id: Int) { - if (selectedKeys.isEmpty()) { - return - } - - when (id) { - R.id.cab_delete -> deleteSpeedDial() - } - } - - override fun getSelectableItemCount() = speedDialValues.size - - override fun getIsItemSelectable(position: Int) = speedDialValues[position].isValid() - - override fun getItemSelectionKey(position: Int) = speedDialValues.getOrNull(position)?.hashCode() - - override fun getItemKeyPosition(key: Int) = speedDialValues.indexOfFirst { it.hashCode() == key } - - override fun onActionModeCreated() {} - - override fun onActionModeDestroyed() {} - - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_speed_dial, parent) - - override fun onBindViewHolder(holder: ViewHolder, position: Int) { - val speedDial = speedDialValues[position] - holder.bindView(speedDial, true, true) { itemView, layoutPosition -> - setupView(itemView, speedDial) - } - bindViewHolder(holder) - } - - override fun getItemCount() = speedDialValues.size - - private fun getSelectedItems() = speedDialValues.filter { selectedKeys.contains(it.hashCode()) } as ArrayList - - private fun deleteSpeedDial() { - val ids = getSelectedItems().map { it.id }.toMutableList() as ArrayList - removeListener.removeSpeedDial(ids) - finishActMode() - } - - private fun setupView(view: View, speedDial: SpeedDial) { - view.apply { - var displayName = "${speedDial.id}. " - displayName += if (speedDial.isValid()) speedDial.displayName else "" - - speed_dial_label.apply { - text = displayName - isSelected = selectedKeys.contains(speedDial.hashCode()) - setTextColor(textColor) - } - } - } -} diff --git a/app/src/main/res/layout/activity_manage_speed_dial.xml b/app/src/main/res/layout/activity_manage_speed_dial.xml deleted file mode 100644 index 8f87e71a..00000000 --- a/app/src/main/res/layout/activity_manage_speed_dial.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 86855c88..225ddc55 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -118,27 +118,6 @@ - - - - - - - From 27920116ceb7f7e791e504f1c7b0f88edad74511 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 23 May 2020 20:21:47 +0200 Subject: [PATCH 010/131] removing the Manage Blocked Numbers screen --- app/src/main/AndroidManifest.xml | 5 ----- .../pro/activities/SettingsActivity.kt | 19 ++++------------- app/src/main/res/layout/activity_settings.xml | 21 ------------------- 3 files changed, 4 insertions(+), 41 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 01f03f52..4c20d70b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -225,11 +225,6 @@ android:label="@string/frequently_asked_questions" android:parentActivityName="com.simplemobiletools.commons.activities.AboutActivity"/> - - - - - - - - Date: Sat, 23 May 2020 20:28:11 +0200 Subject: [PATCH 011/131] removing the Show Dialpad Letters settings item --- .../pro/activities/DialpadActivity.kt | 7 +----- .../pro/activities/SettingsActivity.kt | 9 -------- .../pro/fragments/MyViewPagerFragment.kt | 2 -- .../contacts/pro/helpers/Config.kt | 4 ---- .../contacts/pro/helpers/Constants.kt | 1 - app/src/main/res/layout/activity_settings.xml | 23 ------------------- 6 files changed, 1 insertion(+), 45 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/DialpadActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/DialpadActivity.kt index 45562442..dee59a72 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/DialpadActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/DialpadActivity.kt @@ -77,11 +77,6 @@ class DialpadActivity : SimpleActivity() { val callIcon = resources.getColoredDrawableWithColor(R.drawable.ic_phone_vector, if (isBlackAndWhiteTheme()) Color.BLACK else config.primaryColor.getContrastColor()) dialpad_call_button.setImageDrawable(callIcon) dialpad_call_button.background.applyColorFilter(getAdjustedPrimaryColor()) - - val showLetters = config.showDialpadLetters - arrayOf(dialpad_2_letters, dialpad_3_letters, dialpad_4_letters, dialpad_5_letters, dialpad_6_letters, dialpad_7_letters, dialpad_8_letters, dialpad_9_letters).forEach { - it.beVisibleIf(showLetters) - } } override fun onResume() { @@ -171,7 +166,7 @@ class DialpadActivity : SimpleActivity() { return } - val showLetters = config.showDialpadLetters + val showLetters = true (dialpad_list.adapter as? ContactsAdapter)?.finishActMode() val filtered = contacts.filter { val convertedName = PhoneNumberUtils.convertKeypadLettersToDigits(it.getNameToDisplay().normalizeString()) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/SettingsActivity.kt index bf9f5fa4..17bb44bc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/SettingsActivity.kt @@ -41,7 +41,6 @@ class SettingsActivity : SimpleActivity() { setupStartNameWithSurname() setupShowCallConfirmation() setupShowDialpadButton() - setupShowDialpadLetters() setupShowPrivateContacts() setupOnContactClick() updateTextColors(settings_holder) @@ -137,14 +136,6 @@ class SettingsActivity : SimpleActivity() { } } - private fun setupShowDialpadLetters() { - settings_show_dialpad_letters.isChecked = config.showDialpadLetters - settings_show_dialpad_letters_holder.setOnClickListener { - settings_show_dialpad_letters.toggle() - config.showDialpadLetters = settings_show_dialpad_letters.isChecked - } - } - private fun setupShowPrivateContacts() { settings_show_private_contacts.isChecked = config.showPrivateContacts settings_show_private_contacts_holder.setOnClickListener { diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/MyViewPagerFragment.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/MyViewPagerFragment.kt index 25b1b5e5..dc3be44d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/MyViewPagerFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/MyViewPagerFragment.kt @@ -294,11 +294,9 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet) val adapter = fragment_list.adapter if (adapter is ContactsAdapter) { val shouldNormalize = text.normalizeString() == text - val convertLetters = config.showDialpadLetters val filtered = contactsIgnoringSearch.filter { getProperText(it.getNameToDisplay(), shouldNormalize).contains(text, true) || getProperText(it.nickname, shouldNormalize).contains(text, true) || - it.doesContainPhoneNumber(text, convertLetters) || it.emails.any { it.value.contains(text, true) } || it.addresses.any { getProperText(it.value, shouldNormalize).contains(text, true) } || it.IMs.any { it.value.contains(text, true) } || diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt index 98c5bea8..bf46bc92 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt @@ -57,10 +57,6 @@ class Config(context: Context) : BaseConfig(context) { get() = prefs.getBoolean(SHOW_DIALPAD_BUTTON, true) set(showDialpadButton) = prefs.edit().putBoolean(SHOW_DIALPAD_BUTTON, showDialpadButton).apply() - var showDialpadLetters: Boolean - get() = prefs.getBoolean(SHOW_DIALPAD_LETTERS, true) - set(showDialpadLetters) = prefs.edit().putBoolean(SHOW_DIALPAD_LETTERS, showDialpadLetters).apply() - var wasLocalAccountInitialized: Boolean get() = prefs.getBoolean(WAS_LOCAL_ACCOUNT_INITIALIZED, false) set(wasLocalAccountInitialized) = prefs.edit().putBoolean(WAS_LOCAL_ACCOUNT_INITIALIZED, wasLocalAccountInitialized).apply() diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt index 6f61d448..a7020b61 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt @@ -19,7 +19,6 @@ const val SHOW_CONTACT_FIELDS = "show_contact_fields" const val SHOW_TABS = "show_tabs" const val SHOW_CALL_CONFIRMATION = "show_call_confirmation" const val SHOW_DIALPAD_BUTTON = "show_dialpad_button" -const val SHOW_DIALPAD_LETTERS = "show_dialpad_letters" const val SPEED_DIAL = "speed_dial" const val LAST_EXPORT_PATH = "last_export_path" const val WAS_LOCAL_ACCOUNT_INITIALIZED = "was_local_account_initialized" diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index bed3a434..92892c2a 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -267,29 +267,6 @@ - - - - - - Date: Sat, 23 May 2020 20:33:12 +0200 Subject: [PATCH 012/131] removing the DialPad activity, launch DIAL intent on click --- app/src/main/AndroidManifest.xml | 19 -- .../pro/activities/DialpadActivity.kt | 223 ------------------ .../contacts/pro/activities/MainActivity.kt | 27 +-- app/src/main/res/layout/activity_dialpad.xml | 87 ------- 4 files changed, 4 insertions(+), 352 deletions(-) delete mode 100644 app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/DialpadActivity.kt delete mode 100644 app/src/main/res/layout/activity_dialpad.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 4c20d70b..1ed02cc9 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -225,25 +225,6 @@ android:label="@string/frequently_asked_questions" android:parentActivityName="com.simplemobiletools.commons.activities.AboutActivity"/> - - - - - - - - - - - - - - - - () - private var speedDialValues = ArrayList() - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_dialpad) - - if (checkAppSideloading()) { - return - } - - speedDialValues = config.getSpeedDialValues() - - dialpad_0_holder.setOnClickListener { dialpadPressed('0', it) } - dialpad_1.setOnClickListener { dialpadPressed('1', it) } - dialpad_2.setOnClickListener { dialpadPressed('2', it) } - dialpad_3.setOnClickListener { dialpadPressed('3', it) } - dialpad_4.setOnClickListener { dialpadPressed('4', it) } - dialpad_5.setOnClickListener { dialpadPressed('5', it) } - dialpad_6.setOnClickListener { dialpadPressed('6', it) } - dialpad_7.setOnClickListener { dialpadPressed('7', it) } - dialpad_8.setOnClickListener { dialpadPressed('8', it) } - dialpad_9.setOnClickListener { dialpadPressed('9', it) } - - dialpad_1.setOnLongClickListener { speedDial(1); true } - dialpad_2.setOnLongClickListener { speedDial(2); true } - dialpad_3.setOnLongClickListener { speedDial(3); true } - dialpad_4.setOnLongClickListener { speedDial(4); true } - dialpad_5.setOnLongClickListener { speedDial(5); true } - dialpad_6.setOnLongClickListener { speedDial(6); true } - dialpad_7.setOnLongClickListener { speedDial(7); true } - dialpad_8.setOnLongClickListener { speedDial(8); true } - dialpad_9.setOnLongClickListener { speedDial(9); true } - - dialpad_0_holder.setOnLongClickListener { dialpadPressed('+', null); true } - dialpad_asterisk.setOnClickListener { dialpadPressed('*', it) } - dialpad_hashtag.setOnClickListener { dialpadPressed('#', it) } - dialpad_clear_char.setOnClickListener { clearChar(it) } - dialpad_clear_char.setOnLongClickListener { clearInput(); true } - dialpad_call_button.setOnClickListener { initCall() } - dialpad_input.onTextChangeListener { dialpadValueChanged(it) } - ContactsHelper(this).getContacts { gotContacts(it) } - disableKeyboardPopping() - - val callIcon = resources.getColoredDrawableWithColor(R.drawable.ic_phone_vector, if (isBlackAndWhiteTheme()) Color.BLACK else config.primaryColor.getContrastColor()) - dialpad_call_button.setImageDrawable(callIcon) - dialpad_call_button.background.applyColorFilter(getAdjustedPrimaryColor()) - } - - override fun onResume() { - super.onResume() - updateTextColors(dialpad_holder) - dialpad_clear_char.applyColorFilter(config.textColor) - } - - override fun onCreateOptionsMenu(menu: Menu): Boolean { - menuInflater.inflate(R.menu.menu_dialpad, menu) - updateMenuItemColors(menu) - return true - } - - override fun onOptionsItemSelected(item: MenuItem): Boolean { - when (item.itemId) { - R.id.add_number_to_contact -> addNumberToContact() - else -> return super.onOptionsItemSelected(item) - } - return true - } - - private fun checkDialIntent(): Boolean { - return if (intent.action == Intent.ACTION_DIAL && intent.data != null && intent.dataString?.contains("tel:") == true) { - val number = Uri.decode(intent.dataString).substringAfter("tel:") - dialpad_input.setText(number) - dialpad_input.setSelection(number.length) - true - } else { - false - } - } - - private fun addNumberToContact() { - Intent().apply { - action = Intent.ACTION_INSERT_OR_EDIT - type = "vnd.android.cursor.item/contact" - putExtra(KEY_PHONE, dialpad_input.value) - if (resolveActivity(packageManager) != null) { - startActivity(this) - } else { - toast(R.string.no_app_found) - } - } - } - - private fun dialpadPressed(char: Char, view: View?) { - dialpad_input.addCharacter(char) - view?.performHapticFeedback() - } - - private fun clearChar(view: View) { - dialpad_input.dispatchKeyEvent(dialpad_input.getKeyEvent(KeyEvent.KEYCODE_DEL)) - view.performHapticFeedback() - } - - private fun clearInput() { - dialpad_input.setText("") - } - - private fun disableKeyboardPopping() { - dialpad_input.showSoftInputOnFocus = false - } - - private fun gotContacts(newContacts: ArrayList) { - contacts = newContacts - if (!checkDialIntent() && dialpad_input.value.isEmpty()) { - dialpadValueChanged("") - } - } - - @TargetApi(Build.VERSION_CODES.O) - private fun dialpadValueChanged(text: String) { - val len = text.length - if (len > 8 && text.startsWith("*#*#") && text.endsWith("#*#*")) { - val secretCode = text.substring(4, text.length - 4) - if (isOreoPlus()) { - if (isDefaultDialer()) { - getSystemService(TelephonyManager::class.java)?.sendDialerSpecialCode(secretCode) - } else { - launchSetDefaultDialerIntent() - } - } else { - val intent = Intent(SECRET_CODE_ACTION, Uri.parse("android_secret_code://$secretCode")) - sendBroadcast(intent) - } - return - } - - val showLetters = true - (dialpad_list.adapter as? ContactsAdapter)?.finishActMode() - val filtered = contacts.filter { - val convertedName = PhoneNumberUtils.convertKeypadLettersToDigits(it.getNameToDisplay().normalizeString()) - val company = PhoneNumberUtils.convertKeypadLettersToDigits(it.getFullCompany().normalizeString()) - it.doesContainPhoneNumber(text, showLetters) || (showLetters && (convertedName.contains(text, true) || company.contains(text, true))) - }.sortedWith(compareBy { - if (showLetters) { - !it.doesContainPhoneNumber(text, showLetters) - } else { - true - } - }).toMutableList() as ArrayList - - ContactsAdapter(this, filtered, null, LOCATION_DIALPAD, null, dialpad_list, dialpad_fastscroller, text) { - callContact(it as Contact) - }.apply { - dialpad_list.adapter = this - } - - dialpad_fastscroller.setScrollToY(0) - dialpad_fastscroller.setViews(dialpad_list) { - val item = (dialpad_list.adapter as ContactsAdapter).contactItems.getOrNull(it) - dialpad_fastscroller.updateBubbleText(item?.getBubbleText() ?: "") - } - } - - override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) { - super.onActivityResult(requestCode, resultCode, resultData) - if (requestCode == REQUEST_CODE_SET_DEFAULT_DIALER && isDefaultDialer()) { - dialpadValueChanged(dialpad_input.value) - } - } - - private fun initCall(number: String = dialpad_input.value) { - if (number.isNotEmpty()) { - if (config.showCallConfirmation) { - CallConfirmationDialog(this, number) { - startCallIntent(number) - } - } else { - startCallIntent(number) - } - } - } - - private fun speedDial(id: Int) { - if (dialpad_input.value.isEmpty()) { - val speedDial = speedDialValues.firstOrNull { it.id == id } - if (speedDial?.isValid() == true) { - initCall(speedDial.number) - } - } - } -} diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt index 8a8b81dd..197956e9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt @@ -6,7 +6,6 @@ import android.app.SearchManager import android.content.Context import android.content.Intent import android.content.pm.ShortcutInfo -import android.content.pm.ShortcutManager import android.graphics.drawable.ColorDrawable import android.graphics.drawable.Icon import android.graphics.drawable.LayerDrawable @@ -294,35 +293,16 @@ class MainActivity : SimpleActivity(), RefreshContactsListener { private fun checkShortcuts() { val appIconColor = config.appIconColor if (isNougatMR1Plus() && config.lastHandledShortcutColor != appIconColor) { - val launchDialpad = getLaunchDialpadShortcut(appIconColor) val createNewContact = getCreateNewContactShortcut(appIconColor) - val manager = getSystemService(ShortcutManager::class.java) try { - manager.dynamicShortcuts = Arrays.asList(launchDialpad, createNewContact) + shortcutManager.dynamicShortcuts = Arrays.asList(createNewContact) config.lastHandledShortcutColor = appIconColor } catch (ignored: Exception) { } } } - @SuppressLint("NewApi") - private fun getLaunchDialpadShortcut(appIconColor: Int): ShortcutInfo { - val newEvent = getString(R.string.dialpad) - val drawable = resources.getDrawable(R.drawable.shortcut_dialpad) - (drawable as LayerDrawable).findDrawableByLayerId(R.id.shortcut_dialpad_background).applyColorFilter(appIconColor) - val bmp = drawable.convertToBitmap() - - val intent = Intent(this, DialpadActivity::class.java) - intent.action = Intent.ACTION_VIEW - return ShortcutInfo.Builder(this, "launch_dialpad") - .setShortLabel(newEvent) - .setLongLabel(newEvent) - .setIcon(Icon.createWithBitmap(bmp)) - .setIntent(intent) - .build() - } - @SuppressLint("NewApi") private fun getCreateNewContactShortcut(appIconColor: Int): ShortcutInfo { val newEvent = getString(R.string.create_new_contact) @@ -459,8 +439,9 @@ class MainActivity : SimpleActivity(), RefreshContactsListener { } private fun launchDialpad() { - val intent = Intent(applicationContext, DialpadActivity::class.java) - startActivity(intent) + Intent(Intent.ACTION_DIAL).apply { + startActivity(this) + } } private fun tryImportContacts() { diff --git a/app/src/main/res/layout/activity_dialpad.xml b/app/src/main/res/layout/activity_dialpad.xml deleted file mode 100644 index 45da045d..00000000 --- a/app/src/main/res/layout/activity_dialpad.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - From 6d05ee636aff545fd647777a25ca82365f836d2a Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 23 May 2020 20:42:38 +0200 Subject: [PATCH 013/131] removing some more calling related files --- app/src/main/AndroidManifest.xml | 49 --- .../contacts/pro/activities/CallActivity.kt | 407 ------------------ .../contacts/pro/activities/DialerActivity.kt | 71 --- .../contacts/pro/dialogs/SelectSIMDialog.kt | 47 -- .../contacts/pro/extensions/Activity.kt | 41 +- .../contacts/pro/extensions/Context.kt | 20 - .../contacts/pro/helpers/CallManager.kt | 86 ---- .../contacts/pro/helpers/Constants.kt | 4 - .../contacts/pro/models/SIMAccount.kt | 5 - .../pro/receivers/CallActionReceiver.kt | 17 - .../contacts/pro/services/CallService.kt | 22 - app/src/main/res/layout/activity_call.xml | 202 --------- app/src/main/res/layout/call_notification.xml | 58 --- app/src/main/res/layout/dialog_select_sim.xml | 35 -- app/src/main/res/layout/dialpad.xml | 269 ------------ 15 files changed, 1 insertion(+), 1332 deletions(-) delete mode 100644 app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/CallActivity.kt delete mode 100644 app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/DialerActivity.kt delete mode 100644 app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/SelectSIMDialog.kt delete mode 100644 app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/CallManager.kt delete mode 100644 app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/SIMAccount.kt delete mode 100644 app/src/main/kotlin/com/simplemobiletools/contacts/pro/receivers/CallActionReceiver.kt delete mode 100644 app/src/main/kotlin/com/simplemobiletools/contacts/pro/services/CallService.kt delete mode 100644 app/src/main/res/layout/activity_call.xml delete mode 100644 app/src/main/res/layout/call_notification.xml delete mode 100644 app/src/main/res/layout/dialog_select_sim.xml delete mode 100644 app/src/main/res/layout/dialpad.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 1ed02cc9..b14e4553 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -5,18 +5,10 @@ package="com.simplemobiletools.contacts.pro" android:installLocation="auto"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - callContact = contact - callContactAvatar = getCallContactAvatar() - runOnUiThread { - setupNotification() - updateOtherPersonsInfo() - } - } - - addLockScreenFlags() - initProximitySensor() - - CallManager.registerCallback(callCallback) - updateCallState(CallManager.getState()) - } - - override fun onDestroy() { - super.onDestroy() - notificationManager.cancel(CALL_NOTIFICATION_ID) - CallManager.unregisterCallback(callCallback) - callTimer.cancel() - if (proximityWakeLock?.isHeld == true) { - proximityWakeLock!!.release() - } - - if (CallManager.getState() == Call.STATE_DIALING) { - endCall() - } - } - - override fun onBackPressed() { - if (dialpad_wrapper.isVisible()) { - dialpad_wrapper.beGone() - return - } else { - super.onBackPressed() - } - - if (CallManager.getState() == Call.STATE_DIALING) { - endCall() - } - } - - private fun initButtons() { - call_decline.setOnClickListener { - endCall() - } - - call_accept.setOnClickListener { - acceptCall() - } - - call_toggle_microphone.setOnClickListener { - toggleMicrophone() - } - - call_toggle_speaker.setOnClickListener { - toggleSpeaker() - } - - call_dialpad.setOnClickListener { - toggleDialpadVisibility() - } - - dialpad_close.setOnClickListener { - dialpad_wrapper.beGone() - } - - call_end.setOnClickListener { - endCall() - } - - dialpad_0_holder.setOnClickListener { dialpadPressed('0') } - dialpad_1.setOnClickListener { dialpadPressed('1') } - dialpad_2.setOnClickListener { dialpadPressed('2') } - dialpad_3.setOnClickListener { dialpadPressed('3') } - dialpad_4.setOnClickListener { dialpadPressed('4') } - dialpad_5.setOnClickListener { dialpadPressed('5') } - dialpad_6.setOnClickListener { dialpadPressed('6') } - dialpad_7.setOnClickListener { dialpadPressed('7') } - dialpad_8.setOnClickListener { dialpadPressed('8') } - dialpad_9.setOnClickListener { dialpadPressed('9') } - - dialpad_0_holder.setOnLongClickListener { dialpadPressed('+'); true } - dialpad_asterisk.setOnClickListener { dialpadPressed('*') } - dialpad_hashtag.setOnClickListener { dialpadPressed('#') } - - dialpad_wrapper.setBackgroundColor(config.backgroundColor) - arrayOf(call_toggle_microphone, call_toggle_speaker, call_dialpad, dialpad_close).forEach { - it.applyColorFilter(config.textColor) - } - } - - private fun dialpadPressed(char: Char) { - CallManager.keypad(char) - dialpad_input.addCharacter(char) - } - - private fun toggleSpeaker() { - isSpeakerOn = !isSpeakerOn - val drawable = if (isSpeakerOn) R.drawable.ic_speaker_on_vector else R.drawable.ic_speaker_off_vector - call_toggle_speaker.setImageDrawable(getDrawable(drawable)) - audioManager.isSpeakerphoneOn = isSpeakerOn - } - - private fun toggleMicrophone() { - isMicrophoneOn = !isMicrophoneOn - val drawable = if (isMicrophoneOn) R.drawable.ic_microphone_vector else R.drawable.ic_microphone_off_vector - call_toggle_microphone.setImageDrawable(getDrawable(drawable)) - audioManager.isMicrophoneMute = !isMicrophoneOn - } - - private fun toggleDialpadVisibility() { - if (dialpad_wrapper.isVisible()) { - dialpad_wrapper.beGone() - } else { - dialpad_wrapper.beVisible() - } - } - - private fun updateOtherPersonsInfo() { - if (callContact == null) { - return - } - - caller_name_label.text = if (callContact!!.name.isNotEmpty()) callContact!!.name else getString(R.string.unknown_caller) - - if (callContactAvatar != null) { - caller_avatar.setImageBitmap(callContactAvatar) - } - } - - private fun updateCallState(state: Int) { - when (state) { - Call.STATE_RINGING -> callRinging() - Call.STATE_ACTIVE -> callStarted() - Call.STATE_DISCONNECTED -> endCall() - Call.STATE_CONNECTING, Call.STATE_DIALING -> initOutgoingCallUI() - Call.STATE_SELECT_PHONE_ACCOUNT -> showPhoneAccountPicker() - } - - if (state == Call.STATE_DISCONNECTED || state == Call.STATE_DISCONNECTING) { - callTimer.cancel() - } - - val statusTextId = when (state) { - Call.STATE_RINGING -> R.string.is_calling - Call.STATE_DIALING -> R.string.dialing - else -> 0 - } - - if (statusTextId != 0) { - call_status_label.text = getString(statusTextId) - } - - setupNotification() - } - - private fun acceptCall() { - CallManager.accept() - } - - private fun initOutgoingCallUI() { - incoming_call_holder.beGone() - ongoing_call_holder.beVisible() - } - - private fun callRinging() { - incoming_call_holder.beVisible() - } - - private fun callStarted() { - incoming_call_holder.beGone() - ongoing_call_holder.beVisible() - callTimer.scheduleAtFixedRate(getCallTimerUpdateTask(), 1000, 1000) - } - - private fun showPhoneAccountPicker() { - if (callContact == null || callContact!!.number.isEmpty()) { - toast(R.string.unknown_error_occurred) - } else { - startCallIntent(callContact!!.number) - } - } - - private fun endCall() { - CallManager.reject() - if (proximityWakeLock?.isHeld == true) { - proximityWakeLock!!.release() - } - - audioManager.mode = AudioManager.MODE_NORMAL - if (isCallEnded) { - finish() - return - } - - isCallEnded = true - if (callDuration > 0) { - runOnUiThread { - call_status_label.text = "${callDuration.getFormattedDuration()} (${getString(R.string.call_ended)})" - Handler().postDelayed({ - finish() - }, 3000) - } - } else { - call_status_label.text = getString(R.string.call_ended) - finish() - } - } - - private fun getCallTimerUpdateTask() = object : TimerTask() { - override fun run() { - callDuration++ - runOnUiThread { - if (!isCallEnded) { - call_status_label.text = callDuration.getFormattedDuration() - } - } - } - } - - @SuppressLint("NewApi") - private val callCallback = object : Call.Callback() { - override fun onStateChanged(call: Call, state: Int) { - super.onStateChanged(call, state) - updateCallState(state) - } - } - - @SuppressLint("NewApi") - private fun addLockScreenFlags() { - if (isOreoMr1Plus()) { - setShowWhenLocked(true) - setTurnScreenOn(true) - } else { - window.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON) - } - - if (isOreoPlus()) { - (getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager).requestDismissKeyguard(this, null) - } else { - window.addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD) - } - } - - private fun initProximitySensor() { - val powerManager = getSystemService(Context.POWER_SERVICE) as PowerManager - proximityWakeLock = powerManager.newWakeLock(PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK, "com.simplemobiletools.contacts.pro:wake_lock") - proximityWakeLock!!.acquire(10 * MINUTE_SECONDS * 1000L) - } - - @SuppressLint("NewApi") - private fun setupNotification() { - val callState = CallManager.getState() - val channelId = "simple_contacts_call" - if (isOreoPlus()) { - val importance = NotificationManager.IMPORTANCE_DEFAULT - val name = "call_notification_channel" - - NotificationChannel(channelId, name, importance).apply { - setSound(null, null) - notificationManager.createNotificationChannel(this) - } - } - - val openAppIntent = Intent(this, CallActivity::class.java) - openAppIntent.flags = Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT - val openAppPendingIntent = PendingIntent.getActivity(this, 0, openAppIntent, 0) - - val acceptCallIntent = Intent(this, CallActionReceiver::class.java) - acceptCallIntent.action = ACCEPT_CALL - val acceptPendingIntent = PendingIntent.getBroadcast(this, 0, acceptCallIntent, PendingIntent.FLAG_CANCEL_CURRENT) - - val declineCallIntent = Intent(this, CallActionReceiver::class.java) - declineCallIntent.action = DECLINE_CALL - val declinePendingIntent = PendingIntent.getBroadcast(this, 1, declineCallIntent, PendingIntent.FLAG_CANCEL_CURRENT) - - val callerName = if (callContact != null && callContact!!.name.isNotEmpty()) callContact!!.name else getString(R.string.unknown_caller) - val contentTextId = when (callState) { - Call.STATE_RINGING -> R.string.is_calling - Call.STATE_DIALING -> R.string.dialing - Call.STATE_DISCONNECTED -> R.string.call_ended - Call.STATE_DISCONNECTING -> R.string.call_ending - else -> R.string.ongoing_call - } - - val collapsedView = RemoteViews(packageName, R.layout.call_notification).apply { - setText(R.id.notification_caller_name, callerName) - setText(R.id.notification_call_status, getString(contentTextId)) - setVisibleIf(R.id.notification_accept_call, callState == Call.STATE_RINGING) - - setOnClickPendingIntent(R.id.notification_decline_call, declinePendingIntent) - setOnClickPendingIntent(R.id.notification_accept_call, acceptPendingIntent) - - if (callContactAvatar != null) { - setImageViewBitmap(R.id.notification_thumbnail, getCircularBitmap(callContactAvatar!!)) - } - } - - val builder = NotificationCompat.Builder(this, channelId) - .setSmallIcon(R.drawable.ic_phone_vector) - .setContentIntent(openAppPendingIntent) - .setPriority(NotificationCompat.PRIORITY_DEFAULT) - .setCategory(Notification.CATEGORY_CALL) - .setCustomContentView(collapsedView) - .setOngoing(true) - .setSound(null) - .setUsesChronometer(callState == Call.STATE_ACTIVE) - .setChannelId(channelId) - .setStyle(NotificationCompat.DecoratedCustomViewStyle()) - - val notification = builder.build() - notificationManager.notify(CALL_NOTIFICATION_ID, notification) - } - - @SuppressLint("NewApi") - private fun getCallContactAvatar(): Bitmap? { - var bitmap: Bitmap? = null - if (callContact?.photoUri?.isNotEmpty() == true) { - val photoUri = Uri.parse(callContact!!.photoUri) - bitmap = if (isQPlus()) { - val tmbSize = resources.getDimension(R.dimen.contact_icons_size).toInt() - contentResolver.loadThumbnail(photoUri, Size(tmbSize, tmbSize), null) - } else { - MediaStore.Images.Media.getBitmap(contentResolver, photoUri) - } - - bitmap = getCircularBitmap(bitmap!!) - } - - return bitmap - } - - private fun getCircularBitmap(bitmap: Bitmap): Bitmap { - val output = Bitmap.createBitmap(bitmap.width, bitmap.width, Bitmap.Config.ARGB_8888) - val canvas = Canvas(output) - val paint = Paint() - val rect = Rect(0, 0, bitmap.width, bitmap.height) - val radius = bitmap.width / 2.toFloat() - - paint.isAntiAlias = true - canvas.drawARGB(0, 0, 0, 0) - canvas.drawCircle(radius, radius, radius, paint) - paint.xfermode = PorterDuffXfermode(PorterDuff.Mode.SRC_IN) - canvas.drawBitmap(bitmap, rect, rect, paint) - return output - } -} 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 deleted file mode 100644 index 7d3b1a78..00000000 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/DialerActivity.kt +++ /dev/null @@ -1,71 +0,0 @@ -package com.simplemobiletools.contacts.pro.activities - -import android.annotation.SuppressLint -import android.content.Intent -import android.net.Uri -import android.os.Bundle -import android.telecom.TelecomManager -import android.view.Menu -import com.simplemobiletools.commons.extensions.isDefaultDialer -import com.simplemobiletools.commons.extensions.showErrorToast -import com.simplemobiletools.commons.extensions.telecomManager -import com.simplemobiletools.commons.extensions.toast -import com.simplemobiletools.commons.helpers.REQUEST_CODE_SET_DEFAULT_DIALER -import com.simplemobiletools.contacts.pro.R -import com.simplemobiletools.contacts.pro.extensions.getHandleToUse - -class DialerActivity : SimpleActivity() { - private var callNumber: Uri? = null - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - - if (intent.action == Intent.ACTION_CALL && intent.data != null) { - callNumber = intent.data - - // make sure Simple Contacts is the default Phone app before initiating an outgoing call - if (!isDefaultDialer()) { - launchSetDefaultDialerIntent() - } else { - initOutgoingCall() - } - } else { - toast(R.string.unknown_error_occurred) - finish() - } - } - - override fun onCreateOptionsMenu(menu: Menu): Boolean { - updateMenuItemColors(menu) - return super.onCreateOptionsMenu(menu) - } - - @SuppressLint("MissingPermission") - private fun initOutgoingCall() { - try { - getHandleToUse(intent, callNumber.toString()) { handle -> - Bundle().apply { - putParcelable(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE, handle) - putBoolean(TelecomManager.EXTRA_START_CALL_WITH_VIDEO_STATE, false) - putBoolean(TelecomManager.EXTRA_START_CALL_WITH_SPEAKERPHONE, false) - telecomManager.placeCall(callNumber, this) - } - finish() - } - } catch (e: Exception) { - showErrorToast(e) - finish() - } - } - - override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) { - super.onActivityResult(requestCode, resultCode, resultData) - if (requestCode == REQUEST_CODE_SET_DEFAULT_DIALER) { - if (!isDefaultDialer()) { - finish() - } else { - initOutgoingCall() - } - } - } -} diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/SelectSIMDialog.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/SelectSIMDialog.kt deleted file mode 100644 index c621ceae..00000000 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/SelectSIMDialog.kt +++ /dev/null @@ -1,47 +0,0 @@ -package com.simplemobiletools.contacts.pro.dialogs - -import android.annotation.SuppressLint -import android.telecom.PhoneAccountHandle -import android.view.ViewGroup -import android.widget.RadioButton -import android.widget.RadioGroup -import androidx.appcompat.app.AlertDialog -import com.simplemobiletools.commons.activities.BaseSimpleActivity -import com.simplemobiletools.commons.extensions.setupDialogStuff -import com.simplemobiletools.contacts.pro.R -import com.simplemobiletools.contacts.pro.extensions.config -import com.simplemobiletools.contacts.pro.extensions.getAvailableSIMCardLabels -import kotlinx.android.synthetic.main.dialog_select_sim.view.* - -@SuppressLint("MissingPermission") -class SelectSIMDialog(val activity: BaseSimpleActivity, val phoneNumber: String, val callback: (handle: PhoneAccountHandle) -> Unit) { - private var dialog: AlertDialog? = null - private val view = activity.layoutInflater.inflate(R.layout.dialog_select_sim, null) - - init { - val radioGroup = view.select_sim_radio_group - - activity.getAvailableSIMCardLabels().forEachIndexed { index, SIMAccount -> - val radioButton = (activity.layoutInflater.inflate(R.layout.radio_button, null) as RadioButton).apply { - text = SIMAccount.label - id = index - setOnClickListener { selectedSIM(SIMAccount.handle, SIMAccount.label) } - } - radioGroup!!.addView(radioButton, RadioGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)) - } - - dialog = AlertDialog.Builder(activity) - .create().apply { - activity.setupDialogStuff(view, this) - } - } - - private fun selectedSIM(handle: PhoneAccountHandle, label: String) { - if (view.select_sim_remember.isChecked) { - activity.config.saveCustomSIM(phoneNumber, label) - } - - callback(handle) - dialog?.dismiss() - } -} diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Activity.kt index 6c9943ec..95a1155a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Activity.kt @@ -1,32 +1,18 @@ package com.simplemobiletools.contacts.pro.extensions -import android.annotation.SuppressLint -import android.content.Intent -import android.net.Uri -import android.telecom.PhoneAccount -import android.telecom.PhoneAccountHandle -import android.telecom.TelecomManager import com.simplemobiletools.commons.activities.BaseSimpleActivity import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.extensions.* -import com.simplemobiletools.commons.helpers.PERMISSION_READ_PHONE_STATE import com.simplemobiletools.commons.models.RadioItem import com.simplemobiletools.contacts.pro.BuildConfig import com.simplemobiletools.contacts.pro.R import com.simplemobiletools.contacts.pro.activities.SimpleActivity import com.simplemobiletools.contacts.pro.dialogs.CallConfirmationDialog -import com.simplemobiletools.contacts.pro.dialogs.SelectSIMDialog import com.simplemobiletools.contacts.pro.helpers.* import com.simplemobiletools.contacts.pro.models.Contact fun SimpleActivity.startCallIntent(recipient: String) { - if (isDefaultDialer()) { - getHandleToUse(null, recipient) { handle -> - launchCallIntent(recipient, handle) - } - } else { - launchCallIntent(recipient, null) - } + launchCallIntent(recipient, null) } fun SimpleActivity.tryStartCall(contact: Contact) { @@ -110,28 +96,3 @@ fun SimpleActivity.callContact(contact: Contact) { toast(R.string.no_phone_number_found) } } - -// used at devices with multiple SIM cards -@SuppressLint("MissingPermission") -fun SimpleActivity.getHandleToUse(intent: Intent?, phoneNumber: String, callback: (PhoneAccountHandle) -> Unit) { - handlePermission(PERMISSION_READ_PHONE_STATE) { - if (it) { - val defaultHandle = telecomManager.getDefaultOutgoingPhoneAccount(PhoneAccount.SCHEME_TEL) - when { - intent?.hasExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE) == true -> callback(intent.getParcelableExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE)!!) - config.getCustomSIM(phoneNumber)?.isNotEmpty() == true -> { - val storedLabel = Uri.decode(config.getCustomSIM(phoneNumber)) - val availableSIMs = getAvailableSIMCardLabels() - val firstornull = availableSIMs.firstOrNull { it.label == storedLabel }?.handle ?: availableSIMs.first().handle - callback(firstornull) - } - defaultHandle != null -> callback(defaultHandle) - else -> { - SelectSIMDialog(this, phoneNumber) { handle -> - callback(handle) - } - } - } - } - } -} diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Context.kt index edefd50a..adddf766 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Context.kt @@ -1,6 +1,5 @@ package com.simplemobiletools.contacts.pro.extensions -import android.annotation.SuppressLint import android.content.Context import android.content.Context.AUDIO_SERVICE import android.content.Intent @@ -13,7 +12,6 @@ import android.provider.ContactsContract import androidx.core.content.FileProvider import com.simplemobiletools.commons.extensions.getIntValue import com.simplemobiletools.commons.extensions.hasPermission -import com.simplemobiletools.commons.extensions.telecomManager import com.simplemobiletools.commons.extensions.toast import com.simplemobiletools.commons.helpers.PERMISSION_READ_CONTACTS import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_CONTACTS @@ -29,7 +27,6 @@ import com.simplemobiletools.contacts.pro.interfaces.GroupsDao import com.simplemobiletools.contacts.pro.models.Contact import com.simplemobiletools.contacts.pro.models.ContactSource import com.simplemobiletools.contacts.pro.models.Organization -import com.simplemobiletools.contacts.pro.models.SIMAccount import java.io.File val Context.config: Config get() = Config.newInstance(applicationContext) @@ -330,20 +327,3 @@ fun Context.getAllContactSources(): ArrayList { } fun Context.getPrivateContactSource() = ContactSource(SMT_PRIVATE, SMT_PRIVATE, getString(R.string.phone_storage_hidden)) - -@SuppressLint("MissingPermission") -fun Context.getAvailableSIMCardLabels(): ArrayList { - val SIMAccounts = ArrayList() - telecomManager.callCapablePhoneAccounts.forEach { 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 SIM = SIMAccount(phoneAccount.accountHandle, label) - SIMAccounts.add(SIM) - } - return SIMAccounts -} diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/CallManager.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/CallManager.kt deleted file mode 100644 index 5c26710d..00000000 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/CallManager.kt +++ /dev/null @@ -1,86 +0,0 @@ -package com.simplemobiletools.contacts.pro.helpers - -import android.annotation.SuppressLint -import android.content.Context -import android.net.Uri -import android.telecom.Call -import android.telecom.VideoProfile -import com.simplemobiletools.commons.helpers.SimpleContactsHelper -import com.simplemobiletools.commons.helpers.ensureBackgroundThread -import com.simplemobiletools.contacts.pro.extensions.contactsDB -import com.simplemobiletools.contacts.pro.models.CallContact - -// inspired by https://github.com/Chooloo/call_manage -@SuppressLint("NewApi") -class CallManager { - companion object { - var call: Call? = null - - fun accept() { - call?.answer(VideoProfile.STATE_AUDIO_ONLY) - } - - fun reject() { - if (call != null) { - if (call!!.state == Call.STATE_RINGING) { - call!!.reject(false, null) - } else { - call!!.disconnect() - } - } - } - - fun registerCallback(callback: Call.Callback) { - if (call != null) { - call!!.registerCallback(callback) - } - } - - fun unregisterCallback(callback: Call.Callback) { - call?.unregisterCallback(callback) - } - - fun getState() = if (call == null) { - Call.STATE_DISCONNECTED - } else { - call!!.state - } - - fun keypad(c: Char) { - call?.playDtmfTone(c) - call?.stopDtmfTone() - } - - fun getCallContact(context: Context, callback: (CallContact?) -> Unit) { - val callContact = CallContact("", "", "") - if (call == null || call!!.details == null || call!!.details!!.handle == null) { - callback(callContact) - return - } - - val uri = Uri.decode(call!!.details.handle.toString()) - if (uri.startsWith("tel:")) { - val number = uri.substringAfter("tel:") - callContact.number = number - callContact.name = SimpleContactsHelper(context).getNameFromPhoneNumber(number) - callContact.photoUri = SimpleContactsHelper(context).getPhotoUriFromPhoneNumber(number) - - if (callContact.name == callContact.number) { - ensureBackgroundThread { - val localContact = context.contactsDB.getContactWithNumber("%$number%") - if (localContact != null) { - val storedGroups = ContactsHelper(context).getStoredGroupsSync() - val newContact = LocalContactsHelper(context).convertLocalContactToContact(localContact, storedGroups) - callContact.name = newContact!!.getNameToDisplay() - callContact.photoUri = newContact.photoUri - } - - callback(callContact) - } - } else { - callback(callContact) - } - } - } - } -} diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt index a7020b61..358c8d48 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt @@ -35,10 +35,6 @@ const val ADD_NEW_CONTACT_NUMBER = "add_new_contact_number" const val FIRST_CONTACT_ID = 1000000 const val FIRST_GROUP_ID = 10000L -private const val PATH = "com.simplemobiletools.contacts.action." -const val ACCEPT_CALL = PATH + "accept_call" -const val DECLINE_CALL = PATH + "decline_call" - // extras used at third party intents const val KEY_NAME = "name" const val KEY_EMAIL = "email" diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/SIMAccount.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/SIMAccount.kt deleted file mode 100644 index aca810f4..00000000 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/SIMAccount.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.simplemobiletools.contacts.pro.models - -import android.telecom.PhoneAccountHandle - -data class SIMAccount(val handle: PhoneAccountHandle, val label: String) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/receivers/CallActionReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/receivers/CallActionReceiver.kt deleted file mode 100644 index 9ae27eb3..00000000 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/receivers/CallActionReceiver.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.simplemobiletools.contacts.pro.receivers - -import android.content.BroadcastReceiver -import android.content.Context -import android.content.Intent -import com.simplemobiletools.contacts.pro.helpers.ACCEPT_CALL -import com.simplemobiletools.contacts.pro.helpers.CallManager -import com.simplemobiletools.contacts.pro.helpers.DECLINE_CALL - -class CallActionReceiver : BroadcastReceiver() { - override fun onReceive(context: Context, intent: Intent) { - when (intent.action) { - ACCEPT_CALL -> CallManager.accept() - DECLINE_CALL -> CallManager.reject() - } - } -} 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 deleted file mode 100644 index 644628ee..00000000 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/services/CallService.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.simplemobiletools.contacts.pro.services - -import android.content.Intent -import android.telecom.Call -import android.telecom.InCallService -import com.simplemobiletools.contacts.pro.activities.CallActivity -import com.simplemobiletools.contacts.pro.helpers.CallManager - -class CallService : InCallService() { - override fun onCallAdded(call: Call) { - super.onCallAdded(call) - val intent = Intent(this, CallActivity::class.java) - intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) - startActivity(intent) - CallManager.call = call - } - - override fun onCallRemoved(call: Call) { - super.onCallRemoved(call) - CallManager.call = null - } -} diff --git a/app/src/main/res/layout/activity_call.xml b/app/src/main/res/layout/activity_call.xml deleted file mode 100644 index 644dd093..00000000 --- a/app/src/main/res/layout/activity_call.xml +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/call_notification.xml b/app/src/main/res/layout/call_notification.xml deleted file mode 100644 index 94a5b06b..00000000 --- a/app/src/main/res/layout/call_notification.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/dialog_select_sim.xml b/app/src/main/res/layout/dialog_select_sim.xml deleted file mode 100644 index 6c51bb4b..00000000 --- a/app/src/main/res/layout/dialog_select_sim.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - diff --git a/app/src/main/res/layout/dialpad.xml b/app/src/main/res/layout/dialpad.xml deleted file mode 100644 index e6235d65..00000000 --- a/app/src/main/res/layout/dialpad.xml +++ /dev/null @@ -1,269 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From a5e6d23d5f0df4154f97d9f140c0685c33902637 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 23 May 2020 20:48:54 +0200 Subject: [PATCH 014/131] removing a few more unused files --- app/src/main/AndroidManifest.xml | 4 ---- .../contacts/pro/extensions/Context.kt | 2 -- .../main/res/drawable/ic_backspace_vector.xml | 9 --------- app/src/main/res/drawable/ic_call_accept.xml | 16 ---------------- app/src/main/res/drawable/ic_call_decline.xml | 16 ---------------- .../res/drawable/ic_microphone_off_vector.xml | 9 --------- .../res/drawable/ic_phone_down_red_vector.xml | 9 --------- .../main/res/drawable/ic_phone_down_vector.xml | 9 --------- .../main/res/drawable/ic_phone_green_vector.xml | 9 --------- .../main/res/drawable/ic_speaker_off_vector.xml | 9 --------- .../main/res/drawable/ic_speaker_on_vector.xml | 9 --------- app/src/main/res/drawable/ripple_background.xml | 6 ------ app/src/main/res/drawable/shortcut_dialpad.xml | 16 ---------------- app/src/main/res/menu/menu_dialpad.xml | 9 --------- app/src/main/res/values/colors.xml | 4 ---- app/src/main/res/values/dimens.xml | 6 ------ app/src/main/res/values/styles.xml | 16 +--------------- 17 files changed, 1 insertion(+), 157 deletions(-) delete mode 100644 app/src/main/res/drawable/ic_backspace_vector.xml delete mode 100644 app/src/main/res/drawable/ic_call_accept.xml delete mode 100644 app/src/main/res/drawable/ic_call_decline.xml delete mode 100644 app/src/main/res/drawable/ic_microphone_off_vector.xml delete mode 100644 app/src/main/res/drawable/ic_phone_down_red_vector.xml delete mode 100644 app/src/main/res/drawable/ic_phone_down_vector.xml delete mode 100644 app/src/main/res/drawable/ic_phone_green_vector.xml delete mode 100644 app/src/main/res/drawable/ic_speaker_off_vector.xml delete mode 100644 app/src/main/res/drawable/ic_speaker_on_vector.xml delete mode 100644 app/src/main/res/drawable/ripple_background.xml delete mode 100644 app/src/main/res/drawable/shortcut_dialpad.xml delete mode 100644 app/src/main/res/menu/menu_dialpad.xml delete mode 100644 app/src/main/res/values/colors.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b14e4553..3282f915 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -14,10 +14,6 @@ android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28" /> - - diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Context.kt index adddf766..02336abc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Context.kt @@ -35,8 +35,6 @@ val Context.contactsDB: ContactsDao get() = ContactsDatabase.getInstance(applica val Context.groupsDB: GroupsDao get() = ContactsDatabase.getInstance(applicationContext).GroupsDao() -val Context.audioManager: AudioManager get() = getSystemService(AUDIO_SERVICE) as AudioManager - fun Context.getEmptyContact(): Contact { val originalContactSource = if (hasContactPermissions()) config.lastUsedContactSource else SMT_PRIVATE val organization = Organization("", "") diff --git a/app/src/main/res/drawable/ic_backspace_vector.xml b/app/src/main/res/drawable/ic_backspace_vector.xml deleted file mode 100644 index 06dbed70..00000000 --- a/app/src/main/res/drawable/ic_backspace_vector.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_call_accept.xml b/app/src/main/res/drawable/ic_call_accept.xml deleted file mode 100644 index 546b3ac0..00000000 --- a/app/src/main/res/drawable/ic_call_accept.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - diff --git a/app/src/main/res/drawable/ic_call_decline.xml b/app/src/main/res/drawable/ic_call_decline.xml deleted file mode 100644 index 5754ba70..00000000 --- a/app/src/main/res/drawable/ic_call_decline.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - diff --git a/app/src/main/res/drawable/ic_microphone_off_vector.xml b/app/src/main/res/drawable/ic_microphone_off_vector.xml deleted file mode 100644 index c05115e4..00000000 --- a/app/src/main/res/drawable/ic_microphone_off_vector.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_phone_down_red_vector.xml b/app/src/main/res/drawable/ic_phone_down_red_vector.xml deleted file mode 100644 index 763a320e..00000000 --- a/app/src/main/res/drawable/ic_phone_down_red_vector.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_phone_down_vector.xml b/app/src/main/res/drawable/ic_phone_down_vector.xml deleted file mode 100644 index 6487b6a6..00000000 --- a/app/src/main/res/drawable/ic_phone_down_vector.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_phone_green_vector.xml b/app/src/main/res/drawable/ic_phone_green_vector.xml deleted file mode 100644 index 312e1562..00000000 --- a/app/src/main/res/drawable/ic_phone_green_vector.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_speaker_off_vector.xml b/app/src/main/res/drawable/ic_speaker_off_vector.xml deleted file mode 100644 index 17adb3f9..00000000 --- a/app/src/main/res/drawable/ic_speaker_off_vector.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_speaker_on_vector.xml b/app/src/main/res/drawable/ic_speaker_on_vector.xml deleted file mode 100644 index bc7422fc..00000000 --- a/app/src/main/res/drawable/ic_speaker_on_vector.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ripple_background.xml b/app/src/main/res/drawable/ripple_background.xml deleted file mode 100644 index 783c769d..00000000 --- a/app/src/main/res/drawable/ripple_background.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/shortcut_dialpad.xml b/app/src/main/res/drawable/shortcut_dialpad.xml deleted file mode 100644 index e92c7d47..00000000 --- a/app/src/main/res/drawable/shortcut_dialpad.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - diff --git a/app/src/main/res/menu/menu_dialpad.xml b/app/src/main/res/menu/menu_dialpad.xml deleted file mode 100644 index a4a77b30..00000000 --- a/app/src/main/res/menu/menu_dialpad.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml deleted file mode 100644 index 03cc889a..00000000 --- a/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - #33FFFFFF - diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index e4a6c4ad..53ad0eaf 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -4,10 +4,4 @@ 48dp 40dp 60dp - 72dp - 30dp - - 34sp - 20sp - 34sp diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index f9f377e2..9c3b80f3 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,19 +1,5 @@ - - - +