diff --git a/CHANGELOG.md b/CHANGELOG.md
index 60a748cc..46dbed96 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,14 @@
Changelog
==========
+Version 6.2.0 *(2019-01-06)*
+----------------------------
+
+ * Removed the Recents tab due to Googles' latest security policies
+ * Allow showing letters on the dialpad
+ * Fixed some contact filtering issues
+ * Couple other smaller improvements
+
Version 6.1.2 *(2018-12-28)*
----------------------------
diff --git a/app/build.gradle b/app/build.gradle
index 556bf398..6d2f8dba 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -15,8 +15,8 @@ android {
applicationId "com.simplemobiletools.contacts.pro"
minSdkVersion 21
targetSdkVersion 28
- versionCode 39
- versionName "6.1.2"
+ versionCode 40
+ versionName "6.2.0"
setProperty("archivesBaseName", "contacts")
}
@@ -51,10 +51,10 @@ android {
}
dependencies {
- implementation 'com.simplemobiletools:commons:5.6.2'
+ implementation 'com.simplemobiletools:commons:5.6.5'
implementation 'joda-time:joda-time:2.10.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
- implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.4'
+ implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5'
kapt "androidx.room:room-compiler:2.0.0"
implementation "androidx.room:room-runtime:2.0.0"
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index c965a109..fd10164a 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -12,10 +12,7 @@
-
-
-
@@ -59,15 +56,6 @@
-
-
-
-
-
-
-
-
-
+ val filtered = contacts.filter {
+ val convertedName = PhoneNumberUtils.convertKeypadLettersToDigits(it.getNameToDisplay())
+ it.doesContainPhoneNumber(text, showLetters) || (showLetters && convertedName.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)
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 9740e609..e2d67b20 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
@@ -37,10 +37,8 @@ import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.fragment_contacts.*
import kotlinx.android.synthetic.main.fragment_favorites.*
import kotlinx.android.synthetic.main.fragment_groups.*
-import kotlinx.android.synthetic.main.fragment_recents.*
import java.io.FileOutputStream
-
class MainActivity : SimpleActivity(), RefreshContactsListener {
private var isSearchOpen = false
private var searchMenuItem: MenuItem? = null
@@ -64,16 +62,7 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
appLaunched(BuildConfig.APPLICATION_ID)
setupTabColors()
- handlePermission(PERMISSION_READ_CALL_LOG) {
- if (it) {
- handlePermission(PERMISSION_WRITE_CALL_LOG) {
- checkContactPermissions()
- }
- } else {
- checkContactPermissions()
- }
- }
-
+ checkContactPermissions()
storeStateVariables()
checkWhatsNewDialog()
}
@@ -84,12 +73,10 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
if (it) {
handlePermission(PERMISSION_WRITE_CONTACTS) {
handlePermission(PERMISSION_GET_ACCOUNTS) {
- storeLocalAccountData()
initFragments()
}
}
} else {
- storeLocalAccountData()
initFragments()
}
}
@@ -189,9 +176,9 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
val currentFragment = getCurrentFragment()
menu.apply {
- findItem(R.id.search).isVisible = currentFragment != groups_fragment && currentFragment != recents_fragment
- findItem(R.id.sort).isVisible = currentFragment != groups_fragment && currentFragment != recents_fragment
- findItem(R.id.filter).isVisible = currentFragment != groups_fragment && currentFragment != recents_fragment
+ findItem(R.id.search).isVisible = currentFragment != groups_fragment
+ findItem(R.id.sort).isVisible = currentFragment != groups_fragment
+ findItem(R.id.filter).isVisible = currentFragment != groups_fragment
}
setupSearch(menu)
return true
@@ -268,10 +255,6 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
fragments.add(favorites_fragment)
}
- if (showTabs and RECENTS_TAB_MASK != 0) {
- fragments.add(recents_fragment)
- }
-
if (showTabs and GROUPS_TAB_MASK != 0) {
fragments.add(groups_fragment)
}
@@ -294,24 +277,6 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
}
}
- private fun storeLocalAccountData() {
- if (config.localAccountType == "-1") {
- ContactsHelper(this).getContactSources { sources ->
- var localAccountType = ""
- var localAccountName = ""
- sources.forEach {
- if (localAccountTypes.contains(it.type)) {
- localAccountType = it.type
- localAccountName = it.name
- }
- }
-
- config.localAccountType = localAccountType
- config.localAccountName = localAccountName
- }
- }
- }
-
private fun getInactiveTabIndexes(activeIndex: Int) = (0 until tabsList.size).filter { it != activeIndex }
private fun initFragments() {
@@ -371,11 +336,7 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
// selecting the proper tab sometimes glitches, add an extra selector to make sure we have it right
main_tabs_holder.onGlobalLayout {
Handler().postDelayed({
- if (intent?.action == Intent.ACTION_VIEW && intent.type == "vnd.android.cursor.dir/calls") {
- main_tabs_holder.getTabAt(getRecentsTabIndex())?.select()
- } else {
- main_tabs_holder.getTabAt(config.lastUsedViewPagerPage)?.select()
- }
+ main_tabs_holder.getTabAt(config.lastUsedViewPagerPage)?.select()
invalidateOptionsMenu()
}, 100L)
}
@@ -392,7 +353,6 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
val drawableId = when (position) {
LOCATION_CONTACTS_TAB -> R.drawable.ic_person
LOCATION_FAVORITES_TAB -> R.drawable.ic_star_on
- LOCATION_RECENTS_TAB -> R.drawable.ic_clock
else -> R.drawable.ic_group
}
@@ -529,52 +489,16 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
favorites_fragment?.refreshContacts(contacts)
}
- if (refreshTabsMask and RECENTS_TAB_MASK != 0) {
- recents_fragment?.refreshContacts(contacts)
- }
-
if (refreshTabsMask and GROUPS_TAB_MASK != 0) {
if (refreshTabsMask == GROUPS_TAB_MASK) {
groups_fragment.skipHashComparing = true
}
groups_fragment?.refreshContacts(contacts)
}
-
- if (refreshTabsMask and RECENTS_TAB_MASK != 0) {
- ContactsHelper(this).getRecents {
- it.filter { it.name == null }.forEach {
- val namelessCall = it
- val contact = contacts.firstOrNull { it.doesContainPhoneNumber(namelessCall.number) }
- if (contact != null) {
- it.name = contact.getNameToDisplay()
- }
- }
-
- runOnUiThread {
- recents_fragment?.updateRecentCalls(it)
- }
- }
- }
}
}
- private fun getAllFragments() = arrayListOf(contacts_fragment, favorites_fragment, recents_fragment, groups_fragment)
-
- private fun getRecentsTabIndex(): Int {
- var index = 0
- if (config.showTabs and RECENTS_TAB_MASK == 0) {
- return index
- }
-
- if (config.showTabs and CONTACTS_TAB_MASK != 0) {
- index++
- }
-
- if (config.showTabs and FAVORITES_TAB_MASK != 0) {
- index++
- }
- return index
- }
+ private fun getAllFragments() = arrayListOf(contacts_fragment, favorites_fragment, groups_fragment)
private fun checkWhatsNewDialog() {
arrayListOf().apply {
@@ -587,6 +511,7 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
add(Release(32, R.string.release_32))
add(Release(34, R.string.release_34))
add(Release(39, R.string.release_39))
+ add(Release(40, R.string.release_40))
checkWhatsNew(this, BuildConfig.VERSION_CODE)
}
}
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 db351714..de068e3d 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
@@ -38,10 +38,10 @@ class SettingsActivity : SimpleActivity() {
setupShowPhoneNumbers()
setupShowContactsWithNumbers()
setupStartNameWithSurname()
- setupUse24HourTimeFormat()
setupFilterDuplicates()
setupShowCallConfirmation()
setupShowDialpadButton()
+ setupShowDialpadLetters()
setupOnContactClick()
updateTextColors(settings_holder)
}
@@ -123,14 +123,6 @@ class SettingsActivity : SimpleActivity() {
}
}
- private fun setupUse24HourTimeFormat() {
- settings_use_24_hour_time_format.isChecked = config.use24HourFormat
- settings_use_24_hour_time_format_holder.setOnClickListener {
- settings_use_24_hour_time_format.toggle()
- config.use24HourFormat = settings_use_24_hour_time_format.isChecked
- }
- }
-
private fun setupFilterDuplicates() {
settings_filter_duplicates.isChecked = config.filterDuplicates
settings_filter_duplicates_holder.setOnClickListener {
@@ -147,6 +139,14 @@ 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 setupOnContactClick() {
settings_on_contact_click.text = getOnContactClickText()
settings_on_contact_click_holder.setOnClickListener {
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 3ab8b592..4b3de60a 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
@@ -1,6 +1,10 @@
package com.simplemobiletools.contacts.pro.adapters
import android.graphics.drawable.Drawable
+import android.telephony.PhoneNumberUtils
+import android.text.Spannable
+import android.text.SpannableString
+import android.text.style.ForegroundColorSpan
import android.view.Menu
import android.view.View
import android.view.ViewGroup
@@ -255,7 +259,14 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList, val refreshListener: RefreshContactsListener?, recyclerView: MyRecyclerView,
- fastScroller: FastScroller, itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, fastScroller, itemClick) {
- private val showPhoneNumbers = activity.config.showPhoneNumbers
-
- init {
- setupDragListener(true)
- }
-
- override fun getActionMenuId() = R.menu.cab_recent_calls
-
- override fun prepareActionMode(menu: Menu) {
- val selectedItems = getSelectedItems()
- if (selectedItems.isEmpty()) {
- return
- }
-
- menu.apply {
- findItem(R.id.cab_block_number).isVisible = isNougatPlus()
- findItem(R.id.cab_block_number).title = activity.getString(if (isOneItemSelected()) R.string.block_number else R.string.block_numbers)
- findItem(R.id.cab_call_number).isVisible = isOneItemSelected() && selectedItems.first().name == null
- }
- }
-
- override fun actionItemPressed(id: Int) {
- if (selectedKeys.isEmpty()) {
- return
- }
-
- when (id) {
- R.id.cab_call_number -> callNumber()
- R.id.cab_select_all -> selectAll()
- R.id.cab_delete -> askConfirmDelete()
- R.id.cab_block_number -> blockNumber()
- }
- }
-
- override fun getSelectableItemCount() = recentCalls.size
-
- override fun getIsItemSelectable(position: Int) = true
-
- override fun getItemSelectionKey(position: Int) = recentCalls.getOrNull(position)?.id
-
- override fun getItemKeyPosition(key: Int) = recentCalls.indexOfFirst { it.id == key }
-
- override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_recent_call, parent)
-
- override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) {
- val recentCall = recentCalls[position]
- holder.bindView(recentCall, true, true) { itemView, layoutPosition ->
- setupView(itemView, recentCall)
- }
- bindViewHolder(holder)
- }
-
- override fun getItemCount() = recentCalls.size
-
- fun updateItems(newItems: ArrayList) {
- recentCalls = newItems
- notifyDataSetChanged()
- finishActMode()
- fastScroller?.measureRecyclerView()
- }
-
- private fun callNumber() {
- (activity as SimpleActivity).startCallIntent(getSelectedItems().first().number)
- }
-
- private fun askConfirmDelete() {
- ConfirmationDialog(activity) {
- deleteRecentCalls()
- }
- }
-
- private fun deleteRecentCalls() {
- if (selectedKeys.isEmpty()) {
- return
- }
-
- val callsToRemove = getSelectedItems()
- val positions = getSelectedItemPositions()
- ContactsHelper(activity).removeRecentCalls(callsToRemove.map { it.id } as ArrayList)
- recentCalls.removeAll(callsToRemove)
-
- if (recentCalls.isEmpty()) {
- refreshListener?.refreshContacts(RECENTS_TAB_MASK)
- finishActMode()
- } else {
- removeSelectedItems(positions)
- }
- }
-
- private fun blockNumber() {
- Thread {
- getSelectedItems().forEach {
- activity.addBlockedNumber(it.number)
- }
-
- refreshListener?.refreshContacts(RECENTS_TAB_MASK)
- activity.runOnUiThread {
- finishActMode()
- }
- }.start()
- }
-
- private fun getSelectedItems() = recentCalls.filter { selectedKeys.contains(it.id) } as ArrayList
-
- private fun setupView(view: View, recentCall: RecentCall) {
- view.apply {
- recent_call_frame?.isSelected = selectedKeys.contains(recentCall.id)
- recent_call_name.apply {
- text = recentCall.name ?: recentCall.number
- setTextColor(textColor)
- }
-
- recent_call_number.apply {
- beVisibleIf(showPhoneNumbers && recentCall.name != null)
- text = recentCall.number
- setTextColor(textColor)
- }
-
- recent_call_date_time.apply {
- text = recentCall.dateTime
- setTextColor(textColor)
- }
- }
- }
-}
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 bbc91af0..12d0edb3 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
@@ -7,7 +7,10 @@ import com.simplemobiletools.contacts.pro.R
import com.simplemobiletools.contacts.pro.activities.MainActivity
import com.simplemobiletools.contacts.pro.extensions.config
import com.simplemobiletools.contacts.pro.fragments.MyViewPagerFragment
-import com.simplemobiletools.contacts.pro.helpers.*
+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
+import com.simplemobiletools.contacts.pro.helpers.tabsList
class ViewPagerAdapter(val activity: MainActivity) : PagerAdapter() {
private val showTabs = activity.config.showTabs
@@ -42,10 +45,6 @@ class ViewPagerAdapter(val activity: MainActivity) : PagerAdapter() {
fragments.add(R.layout.fragment_favorites)
}
- if (showTabs and RECENTS_TAB_MASK != 0) {
- fragments.add(R.layout.fragment_recents)
- }
-
if (showTabs and GROUPS_TAB_MASK != 0) {
fragments.add(R.layout.fragment_groups)
}
diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/CreateNewGroupDialog.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/CreateNewGroupDialog.kt
index 2126c3c5..a76f57f3 100644
--- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/CreateNewGroupDialog.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/CreateNewGroupDialog.kt
@@ -10,7 +10,6 @@ import com.simplemobiletools.commons.extensions.toast
import com.simplemobiletools.commons.extensions.value
import com.simplemobiletools.commons.models.RadioItem
import com.simplemobiletools.contacts.pro.R
-import com.simplemobiletools.contacts.pro.extensions.config
import com.simplemobiletools.contacts.pro.helpers.ContactsHelper
import com.simplemobiletools.contacts.pro.helpers.SMT_PRIVATE
import com.simplemobiletools.contacts.pro.models.ContactSource
@@ -35,11 +34,6 @@ class CreateNewGroupDialog(val activity: BaseSimpleActivity, val callback: (newG
}
val contactSources = ArrayList()
- if (activity.config.localAccountName.isNotEmpty()) {
- val localAccountName = activity.config.localAccountName
- contactSources.add(ContactSource(localAccountName, activity.config.localAccountType, localAccountName))
- }
-
ContactsHelper(activity).getContactSources {
it.filter { it.type.contains("google", true) }.mapTo(contactSources) { ContactSource(it.name, it.type, it.name) }
val phoneSecret = activity.getString(R.string.phone_storage_hidden)
diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/FilterContactSourcesDialog.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/FilterContactSourcesDialog.kt
index 3e1b7d4d..1090c7d3 100644
--- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/FilterContactSourcesDialog.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/FilterContactSourcesDialog.kt
@@ -30,7 +30,7 @@ class FilterContactSourcesDialog(val activity: SimpleActivity, private val callb
view.filter_contact_sources_list.adapter = FilterContactSourcesAdapter(activity, it, selectedSources)
dialog = AlertDialog.Builder(activity)
- .setPositiveButton(R.string.ok) { dialogInterface, i -> confirmEventTypes() }
+ .setPositiveButton(R.string.ok) { dialogInterface, i -> confirmContactSources() }
.setNegativeButton(R.string.cancel, null)
.create().apply {
activity.setupDialogStuff(view, this)
@@ -39,7 +39,7 @@ class FilterContactSourcesDialog(val activity: SimpleActivity, private val callb
}
}
- private fun confirmEventTypes() {
+ private fun confirmContactSources() {
val selectedContactSources = (view.filter_contact_sources_list.adapter as FilterContactSourcesAdapter).getSelectedContactSources()
val ignoredContactSources = contactSources.filter { !selectedContactSources.contains(it) }.map {
if (it.type == SMT_PRIVATE) SMT_PRIVATE else it.getFullIdentifier()
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 076c1be7..0ecc7271 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
@@ -6,7 +6,10 @@ import com.simplemobiletools.commons.extensions.setupDialogStuff
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.*
+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)
@@ -16,7 +19,6 @@ class ManageVisibleTabsDialog(val activity: BaseSimpleActivity) {
tabs.apply {
put(CONTACTS_TAB_MASK, R.id.manage_visible_tabs_contacts)
put(FAVORITES_TAB_MASK, R.id.manage_visible_tabs_favorites)
- put(RECENTS_TAB_MASK, R.id.manage_visible_tabs_recents)
put(GROUPS_TAB_MASK, R.id.manage_visible_tabs_groups)
}
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 8f416c21..c032c720 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
@@ -71,12 +71,7 @@ fun SimpleActivity.showContactSourcePicker(currentSource: String, callback: (new
sources = filteredSources.map { it.publicName }
sources.forEachIndexed { index, account ->
- var publicAccount = account
- if (account == config.localAccountName) {
- publicAccount = getString(R.string.phone_storage)
- }
-
- items.add(RadioItem(index, publicAccount))
+ items.add(RadioItem(index, account))
if (currentSource == SMT_PRIVATE && account == getString(R.string.phone_storage_hidden)) {
currentSourceIndex = index
}
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 7cd82aad..1b307d40 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
@@ -197,7 +197,6 @@ fun Context.hasContactPermissions() = hasPermission(PERMISSION_READ_CONTACTS) &&
fun Context.getPublicContactSource(source: String, callback: (String) -> Unit) {
when (source) {
- config.localAccountName -> callback(getString(R.string.phone_storage))
SMT_PRIVATE -> callback(getString(R.string.phone_storage_hidden))
else -> {
Thread {
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 6421f519..27446be4 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
@@ -15,7 +15,6 @@ import com.simplemobiletools.contacts.pro.activities.MainActivity
import com.simplemobiletools.contacts.pro.activities.SimpleActivity
import com.simplemobiletools.contacts.pro.adapters.ContactsAdapter
import com.simplemobiletools.contacts.pro.adapters.GroupsAdapter
-import com.simplemobiletools.contacts.pro.adapters.RecentCallsAdapter
import com.simplemobiletools.contacts.pro.extensions.config
import com.simplemobiletools.contacts.pro.extensions.contactClicked
import com.simplemobiletools.contacts.pro.extensions.getVisibleContactSources
@@ -59,11 +58,6 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
fragment_placeholder.text = activity.getString(R.string.no_group_created)
fragment_placeholder_2.text = activity.getString(R.string.create_group)
}
- this is RecentsFragment -> {
- fragment_fab.beGone()
- fragment_placeholder.text = activity.getString(R.string.no_recent_calls_found)
- fragment_placeholder_2.text = activity.getString(R.string.request_the_required_permissions)
- }
}
}
}
@@ -71,7 +65,6 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
fun textColorChanged(color: Int) {
when {
this is GroupsFragment -> (fragment_list.adapter as GroupsAdapter).updateTextColor(color)
- this is RecentsFragment -> (fragment_list.adapter as RecentCallsAdapter).updateTextColor(color)
else -> (fragment_list.adapter as ContactsAdapter).apply {
updateTextColor(color)
initDrawables()
@@ -88,7 +81,7 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
}
fun startNameWithSurnameChanged(startNameWithSurname: Boolean) {
- if (this !is GroupsFragment && this !is RecentsFragment) {
+ 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!!.refreshContacts(CONTACTS_TAB_MASK or FAVORITES_TAB_MASK)
@@ -99,7 +92,6 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
fun refreshContacts(contacts: ArrayList) {
if ((config.showTabs and CONTACTS_TAB_MASK == 0 && this is ContactsFragment) ||
(config.showTabs and FAVORITES_TAB_MASK == 0 && this is FavoritesFragment) ||
- (config.showTabs and RECENTS_TAB_MASK == 0 && this is RecentsFragment) ||
(config.showTabs and GROUPS_TAB_MASK == 0 && this is GroupsFragment)) {
return
}
@@ -114,7 +106,6 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
val filtered = when {
this is GroupsFragment -> contacts
this is FavoritesFragment -> contacts.filter { it.starred == 1 } as ArrayList
- this is RecentsFragment -> ArrayList()
else -> {
val contactSources = activity!!.getVisibleContactSources()
contacts.filter { contactSources.contains(it.source) } as ArrayList
@@ -133,7 +124,7 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
private fun setupContacts(contacts: ArrayList) {
if (this is GroupsFragment) {
setupGroupsAdapter(contacts)
- } else if (this !is RecentsFragment) {
+ } else {
setupContactsFavoritesAdapter(contacts)
}
@@ -219,7 +210,7 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
showContactThumbnails = showThumbnails
notifyDataSetChanged()
}
- } else if (this !is RecentsFragment) {
+ } else {
(fragment_list.adapter as? ContactsAdapter)?.apply {
showContactThumbnails = showThumbnails
notifyDataSetChanged()
@@ -237,11 +228,12 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
fun onSearchQueryChanged(text: String) {
val shouldNormalize = text.normalizeString() == text
+ val convertLetters = config.showDialpadLetters
(fragment_list.adapter as? ContactsAdapter)?.apply {
val filtered = contactsIgnoringSearch.filter {
getProperText(it.getNameToDisplay(), shouldNormalize).contains(text, true) ||
getProperText(it.nickname, shouldNormalize).contains(text, true) ||
- it.doesContainPhoneNumber(text) ||
+ 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) } ||
@@ -251,7 +243,10 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
it.websites.any { it.contains(text, true) }
} as ArrayList
- filtered.sortBy { !getProperText(it.getNameToDisplay(), shouldNormalize).startsWith(text, true) }
+ filtered.sortBy {
+ val nameToDisplay = it.getNameToDisplay()
+ !getProperText(nameToDisplay, shouldNormalize).startsWith(text, true) && !nameToDisplay.contains(text, true)
+ }
if (filtered.isEmpty() && this@MyViewPagerFragment is FavoritesFragment) {
fragment_placeholder.text = activity.getString(R.string.no_items_found)
diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/RecentsFragment.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/RecentsFragment.kt
deleted file mode 100644
index a227c7e9..00000000
--- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/RecentsFragment.kt
+++ /dev/null
@@ -1,89 +0,0 @@
-package com.simplemobiletools.contacts.pro.fragments
-
-import android.annotation.TargetApi
-import android.content.Context
-import android.content.Intent
-import android.os.Build
-import android.telecom.TelecomManager
-import android.util.AttributeSet
-import com.simplemobiletools.commons.extensions.beVisibleIf
-import com.simplemobiletools.commons.extensions.hasPermission
-import com.simplemobiletools.commons.helpers.PERMISSION_READ_CALL_LOG
-import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_CALL_LOG
-import com.simplemobiletools.commons.helpers.isMarshmallowPlus
-import com.simplemobiletools.contacts.pro.activities.InsertOrEditContactActivity
-import com.simplemobiletools.contacts.pro.adapters.RecentCallsAdapter
-import com.simplemobiletools.contacts.pro.extensions.contactClicked
-import com.simplemobiletools.contacts.pro.extensions.isDefaultDialer
-import com.simplemobiletools.contacts.pro.extensions.normalizeNumber
-import com.simplemobiletools.contacts.pro.helpers.IS_FROM_SIMPLE_CONTACTS
-import com.simplemobiletools.contacts.pro.helpers.KEY_PHONE
-import com.simplemobiletools.contacts.pro.helpers.RECENTS_TAB_MASK
-import com.simplemobiletools.contacts.pro.models.Contact
-import com.simplemobiletools.contacts.pro.models.RecentCall
-import kotlinx.android.synthetic.main.fragment_layout.view.*
-
-class RecentsFragment(context: Context, attributeSet: AttributeSet) : MyViewPagerFragment(context, attributeSet) {
- override fun fabClicked() {}
-
- @TargetApi(Build.VERSION_CODES.M)
- override fun placeholderClicked() {
- if (!isMarshmallowPlus() || (isMarshmallowPlus() && context.isDefaultDialer())) {
- activity!!.handlePermission(PERMISSION_WRITE_CALL_LOG) {
- if (it) {
- activity!!.handlePermission(PERMISSION_READ_CALL_LOG) {
- activity?.refreshContacts(RECENTS_TAB_MASK)
- }
- }
- }
- } else {
- val intent = Intent(TelecomManager.ACTION_CHANGE_DEFAULT_DIALER).putExtra(TelecomManager.EXTRA_CHANGE_DEFAULT_DIALER_PACKAGE_NAME, context.packageName)
- context.startActivity(intent)
- }
- }
-
- fun updateRecentCalls(recentCalls: ArrayList) {
- if (activity == null || activity!!.isDestroyed) {
- return
- }
-
- fragment_placeholder.beVisibleIf(recentCalls.isEmpty())
- fragment_placeholder_2.beVisibleIf(recentCalls.isEmpty() && !activity!!.hasPermission(PERMISSION_WRITE_CALL_LOG))
- fragment_list.beVisibleIf(recentCalls.isNotEmpty())
-
- val currAdapter = fragment_list.adapter
- if (currAdapter == null) {
- RecentCallsAdapter(activity!!, recentCalls, activity, fragment_list, fragment_fastscroller) {
- val recentCall = (it as RecentCall).number.normalizeNumber()
- var selectedContact: Contact? = null
- for (contact in allContacts) {
- if (contact.doesContainPhoneNumber(recentCall)) {
- selectedContact = contact
- break
- }
- }
-
- if (selectedContact != null) {
- activity?.contactClicked(selectedContact)
- } else {
- Intent(context, InsertOrEditContactActivity::class.java).apply {
- action = Intent.ACTION_INSERT_OR_EDIT
- putExtra(KEY_PHONE, recentCall)
- putExtra(IS_FROM_SIMPLE_CONTACTS, true)
- context.startActivity(this)
- }
- }
- }.apply {
- addVerticalDividers(true)
- fragment_list.adapter = this
- }
-
- fragment_fastscroller.setViews(fragment_list) {
- val item = (fragment_list.adapter as RecentCallsAdapter).recentCalls.getOrNull(it)
- fragment_fastscroller.updateBubbleText(item?.name ?: item?.number ?: "")
- }
- } else {
- (currAdapter as RecentCallsAdapter).updateItems(recentCalls)
- }
- }
-}
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 483ac685..1dd4a759 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
@@ -32,14 +32,6 @@ class Config(context: Context) : BaseConfig(context) {
get() = prefs.getString(LAST_USED_CONTACT_SOURCE, "")
set(lastUsedContactSource) = prefs.edit().putString(LAST_USED_CONTACT_SOURCE, lastUsedContactSource).apply()
- var localAccountName: String
- get() = prefs.getString(LOCAL_ACCOUNT_NAME, "-1")
- set(localAccountName) = prefs.edit().putString(LOCAL_ACCOUNT_NAME, localAccountName).apply()
-
- var localAccountType: String
- get() = prefs.getString(LOCAL_ACCOUNT_TYPE, "-1")
- set(localAccountType) = prefs.edit().putString(LOCAL_ACCOUNT_TYPE, localAccountType).apply()
-
var onContactClick: Int
get() = prefs.getInt(ON_CONTACT_CLICK, ON_CLICK_VIEW_CONTACT)
set(onContactClick) = prefs.edit().putInt(ON_CONTACT_CLICK, onContactClick).apply()
@@ -64,4 +56,8 @@ class Config(context: Context) : BaseConfig(context) {
var showDialpadButton: Boolean
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, false)
+ set(showDialpadLetters) = prefs.edit().putBoolean(SHOW_DIALPAD_LETTERS, showDialpadLetters).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 1e2786de..0fa64cf7 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
@@ -10,14 +10,13 @@ const val SHOW_ONLY_CONTACTS_WITH_NUMBERS = "show_only_contacts_with_numbers"
const val IGNORED_CONTACT_SOURCES = "ignored_contact_sources_2"
const val START_NAME_WITH_SURNAME = "start_name_with_surname"
const val LAST_USED_CONTACT_SOURCE = "last_used_contact_source"
-const val LOCAL_ACCOUNT_NAME = "local_account_name"
-const val LOCAL_ACCOUNT_TYPE = "local_account_type"
const val ON_CONTACT_CLICK = "on_contact_click"
const val SHOW_CONTACT_FIELDS = "show_contact_fields"
const val SHOW_TABS = "show_tabs"
const val FILTER_DUPLICATES = "filter_duplicates"
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 CONTACT_ID = "contact_id"
const val SMT_PRIVATE = "smt_private" // used at the contact source of local contacts hidden from other apps
@@ -35,21 +34,17 @@ const val KEY_NAME = "name"
const val LOCATION_CONTACTS_TAB = 0
const val LOCATION_FAVORITES_TAB = 1
-const val LOCATION_RECENTS_TAB = 2
-const val LOCATION_GROUPS_TAB = 3
-const val LOCATION_GROUP_CONTACTS = 4
-const val LOCATION_DIALPAD = 5
-const val LOCATION_INSERT_OR_EDIT = 6
+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 RECENTS_TAB_MASK = 4
const val GROUPS_TAB_MASK = 8
-const val ALL_TABS_MASK = 15
+const val ALL_TABS_MASK = CONTACTS_TAB_MASK or FAVORITES_TAB_MASK or GROUPS_TAB_MASK
val tabsList = arrayListOf(CONTACTS_TAB_MASK,
FAVORITES_TAB_MASK,
- RECENTS_TAB_MASK,
GROUPS_TAB_MASK
)
@@ -107,17 +102,6 @@ const val DEFAULT_ORGANIZATION_TYPE = CommonDataKinds.Organization.TYPE_WORK
const val DEFAULT_WEBSITE_TYPE = CommonDataKinds.Website.TYPE_HOMEPAGE
const val DEFAULT_IM_TYPE = CommonDataKinds.Im.PROTOCOL_SKYPE
-// some manufacturer contact account types from https://stackoverflow.com/a/44802016/1967672
-val localAccountTypes = arrayListOf("vnd.sec.contact.phone",
- "com.htc.android.pcsc",
- "com.sonyericsson.localcontacts",
- "com.lge.sync",
- "com.lge.phone",
- "vnd.tmobileus.contact.phone",
- "com.android.huawei.phone",
- "Local Phone Account"
-)
-
// apps with special handling
const val TELEGRAM_PACKAGE = "org.telegram.messenger"
const val SIGNAL_PACKAGE = "org.thoughtcrime.securesms"
diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt
index a4e69bf3..e07326b0 100644
--- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt
@@ -2,14 +2,12 @@ package com.simplemobiletools.contacts.pro.helpers
import android.accounts.Account
import android.accounts.AccountManager
-import android.annotation.SuppressLint
import android.content.*
import android.database.Cursor
import android.graphics.Bitmap
import android.net.Uri
import android.os.Handler
import android.os.Looper
-import android.provider.CallLog
import android.provider.ContactsContract
import android.provider.ContactsContract.CommonDataKinds
import android.provider.ContactsContract.CommonDataKinds.Nickname
@@ -23,7 +21,6 @@ import com.simplemobiletools.contacts.pro.R
import com.simplemobiletools.contacts.pro.extensions.*
import com.simplemobiletools.contacts.pro.models.*
import com.simplemobiletools.contacts.pro.overloads.times
-import java.text.SimpleDateFormat
import java.util.*
import kotlin.collections.ArrayList
@@ -673,7 +670,7 @@ class ContactsHelper(val context: Context) {
return groups
}
- fun getDeviceStoredGroups(): ArrayList {
+ private fun getDeviceStoredGroups(): ArrayList {
val groups = ArrayList()
if (!context.hasContactPermissions()) {
return groups
@@ -865,10 +862,6 @@ class ContactsHelper(val context: Context) {
}
sources.addAll(contentResolverAccounts)
- if (sources.isEmpty() && context.config.localAccountName.isEmpty() && context.config.localAccountType.isEmpty()) {
- sources.add(ContactSource("", "", ""))
- }
-
return sources
}
@@ -1246,7 +1239,7 @@ class ContactsHelper(val context: Context) {
ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI).apply {
withValue(ContactsContract.RawContacts.ACCOUNT_NAME, contact.source)
withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, getContactSourceType(contact.source))
- withValue(ContactsContract.RawContacts.DIRTY, false)
+ withValue(ContactsContract.RawContacts.DIRTY, 1)
operations.add(build())
}
@@ -1552,93 +1545,4 @@ class ContactsHelper(val context: Context) {
context.showErrorToast(e)
}
}
-
- @SuppressLint("MissingPermission")
- fun getRecents(callback: (ArrayList) -> Unit) {
- Thread {
- val calls = ArrayList()
- if (!context.hasPermission(PERMISSION_WRITE_CALL_LOG) || !context.hasPermission(PERMISSION_READ_CALL_LOG)) {
- callback(calls)
- return@Thread
- }
-
- val blockedNumbers = context.getBlockedNumbers()
- val uri = CallLog.Calls.CONTENT_URI
- val projection = arrayOf(
- CallLog.Calls._ID,
- CallLog.Calls.NUMBER,
- CallLog.Calls.DATE,
- CallLog.Calls.CACHED_NAME
- )
-
- val sorting = "${CallLog.Calls._ID} DESC LIMIT 100"
- val currentDate = Date(System.currentTimeMillis())
- val currentYear = SimpleDateFormat("yyyy", Locale.getDefault()).format(currentDate)
- val todayDate = SimpleDateFormat("dd MMM yyyy", Locale.getDefault()).format(currentDate)
- val yesterdayDate = SimpleDateFormat("dd MMM yyyy", Locale.getDefault()).format(Date(System.currentTimeMillis() - DAY_SECONDS * 1000))
- val yesterday = context.getString(R.string.yesterday)
- val timeFormat = if (context.config.use24HourFormat) "HH:mm" else "h:mm a"
- var prevNumber = ""
-
- var cursor: Cursor? = null
- try {
- cursor = context.contentResolver.query(uri, projection, null, null, sorting)
- if (cursor?.moveToFirst() == true) {
- do {
- val id = cursor.getIntValue(CallLog.Calls._ID)
- val number = cursor.getStringValue(CallLog.Calls.NUMBER)
- val date = cursor.getLongValue(CallLog.Calls.DATE)
- val name = cursor.getStringValue(CallLog.Calls.CACHED_NAME)
- if (number == prevNumber) {
- continue
- }
-
- if (blockedNumbers.any { it.number == number || it.normalizedNumber == number }) {
- continue
- }
-
- var formattedDate = SimpleDateFormat("dd MMM yyyy, $timeFormat", Locale.getDefault()).format(Date(date))
- val datePart = formattedDate.substring(0, 11)
- when {
- datePart == todayDate -> formattedDate = formattedDate.substring(12)
- datePart == yesterdayDate -> formattedDate = yesterday + formattedDate.substring(11)
- formattedDate.substring(7, 11) == currentYear -> formattedDate = formattedDate.substring(0, 6) + formattedDate.substring(11)
- }
-
- prevNumber = number
- val recentCall = RecentCall(id, number, formattedDate, name)
- calls.add(recentCall)
- } while (cursor.moveToNext())
- }
- } finally {
- cursor?.close()
- }
- callback(calls)
- }.start()
- }
-
- fun removeRecentCalls(ids: ArrayList) {
- Thread {
- try {
- val operations = ArrayList()
- val selection = "${CallLog.Calls._ID} = ?"
- ids.forEach {
- ContentProviderOperation.newDelete(CallLog.Calls.CONTENT_URI).apply {
- val selectionArgs = arrayOf(it.toString())
- withSelection(selection, selectionArgs)
- operations.add(build())
- }
-
- if (operations.size % BATCH_SIZE == 0) {
- context.contentResolver.applyBatch(CallLog.AUTHORITY, operations)
- operations.clear()
- }
- }
-
- context.contentResolver.applyBatch(CallLog.AUTHORITY, operations)
- } catch (e: Exception) {
- context.showErrorToast(e)
- }
- }.start()
- }
}
diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/Contact.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/Contact.kt
index c3851d83..e602c289 100644
--- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/Contact.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/Contact.kt
@@ -127,9 +127,9 @@ data class Contact(var id: Int, var prefix: String, var firstName: String, var m
fun isABusinessContact() = prefix.isEmpty() && firstName.isEmpty() && middleName.isEmpty() && surname.isEmpty() && suffix.isEmpty() && organization.isNotEmpty()
- fun doesContainPhoneNumber(text: String): Boolean {
+ fun doesContainPhoneNumber(text: String, convertLetters: Boolean): Boolean {
return if (text.isNotEmpty()) {
- val normalizedText = text.normalizeNumber()
+ val normalizedText = if (convertLetters) text.normalizeNumber() else text
phoneNumbers.any {
PhoneNumberUtils.compare(it.normalizedNumber, normalizedText) ||
it.value.contains(text) ||
diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/RecentCall.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/RecentCall.kt
deleted file mode 100644
index 536599e8..00000000
--- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/RecentCall.kt
+++ /dev/null
@@ -1,3 +0,0 @@
-package com.simplemobiletools.contacts.pro.models
-
-data class RecentCall(var id: Int, var number: String, var dateTime: String, var name: String?)
diff --git a/app/src/main/res/layout/activity_dialpad.xml b/app/src/main/res/layout/activity_dialpad.xml
index 6d06a8b4..721bab1f 100644
--- a/app/src/main/res/layout/activity_dialpad.xml
+++ b/app/src/main/res/layout/activity_dialpad.xml
@@ -90,6 +90,17 @@
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/dialpad_1"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
diff --git a/app/src/main/res/layout/item_recent_call.xml b/app/src/main/res/layout/item_recent_call.xml
deleted file mode 100644
index da43a6ea..00000000
--- a/app/src/main/res/layout/item_recent_call.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/src/main/res/menu/cab_recent_calls.xml b/app/src/main/res/menu/cab_recent_calls.xml
deleted file mode 100644
index d26f3097..00000000
--- a/app/src/main/res/menu/cab_recent_calls.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml
index acede989..bb898317 100644
--- a/app/src/main/res/values-az/strings.xml
+++ b/app/src/main/res/values-az/strings.xml
@@ -19,13 +19,11 @@
Add to an existing contact
You have to make this app the default dialer app to make use of blocked numbers.
Set to default
- Call number
No contacts found
No contacts with emails have been found
No contacts with phone numbers have been found
- No recent calls found
Yeni kontakt
Redaktə et
@@ -65,9 +63,9 @@
Göstərilən nişanları idarə et
Kontaktlar
Sevimlilər
- Hazırki zənglər
Zəngə başlamazdan əvvəl zəng təsdiq pəncərəsi göstər
Show only contacts with phone numbers
+ Show letters on the dialpad
E-poçt
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 33cc39a4..722bf81a 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -19,13 +19,11 @@
Zu einem existierenden Kontakt hinzufügen
Du musst diese App als Standardtelefonie-App einstellen, um Nummern blockieren zu können.
Als Standard auswählen
- Call number
Keine Kontakte gefunden
Keine Kontakte mit E-Mailadressen gefunden
Keine Kontakte mit Telefonnummern gefunden
- Keine kürzlichen Anrufe gefunden
Neuer Kontakt
Kontakt bearbeiten
@@ -65,9 +63,9 @@
Anzuzeigende Tabs festlegen
Kontakte
Favoriten
- Anrufliste
Bestätigungsdialog zeigen, bevor ein Anruf durchgeführt wird
Nur Kontakte mit Telefonnummern anzeigen
+ Show letters on the dialpad
E-Mail
diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml
index 2a858e7b..5438cf2d 100644
--- a/app/src/main/res/values-el/strings.xml
+++ b/app/src/main/res/values-el/strings.xml
@@ -19,13 +19,11 @@
Προσθήκη σε μια υπάρχουσα Επαφή
You have to make this app the default dialer app to make use of blocked numbers.
Set to default
- Call number
No contacts found
No contacts with emails have been found
No contacts with phone numbers have been found
- No recent calls found
Νέα επαφή
Επεξεργασία επαφής
@@ -65,9 +63,9 @@
Διαχείριση εμφανιζόμενων καρτελών
Επαφές
Αγαπημένες
- Πρόσφατες Κλήσεις
Εμφάνιση διαλόγου επιβεβαίωσης πριν από την έναρξη μιας κλήσης
Show only contacts with phone numbers
+ Show letters on the dialpad
Email
diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml
index a1953388..120df8f9 100644
--- a/app/src/main/res/values-eu/strings.xml
+++ b/app/src/main/res/values-eu/strings.xml
@@ -19,13 +19,11 @@
Add to an existing contact
You have to make this app the default dialer app to make use of blocked numbers.
Set to default
- Call number
No contacts found
No contacts with emails have been found
No contacts with phone numbers have been found
- No recent calls found
Kontaktu berria
Editatu taldea
@@ -65,9 +63,9 @@
Kudeatu erakutsitako fitxak
Kontaktuak
Gogokoak
- Azken deiak
Erakutsi egiaztatze mezua dei bat hasi baino lehen
Show only contacts with phone numbers
+ Show letters on the dialpad
Emaila
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 0c2046fc..09ee4112 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -19,13 +19,11 @@
Ajouter à un contact existant
You have to make this app the default dialer app to make use of blocked numbers.
Set to default
- Call number
Aucun contact n\'a été trouvé
Aucun contact avec une adresse de courriel n\'a été trouvé
Aucun contact avec un numéro de téléphone n\'a été trouvé
- Aucun appel récent n\'a été trouvé
Nouveau contact
Modifier contact
@@ -65,9 +63,9 @@
Gérer les onglets affichés
Contacts
Favoris
- Appels récents
Afficher une demande de confirmation avant de démarrer un appel
Afficher uniquement les contacts avec un numéro de téléphone
+ Show letters on the dialpad
Adresse de courriel
diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml
index 56d48fa1..8cacf87d 100644
--- a/app/src/main/res/values-hr/strings.xml
+++ b/app/src/main/res/values-hr/strings.xml
@@ -15,17 +15,15 @@
Pošalji e-poštu grupi
Nazovi %s
Zatraži potrebna dopuštenja
- Create new contact
- Add to an existing contact
- You have to make this app the default dialer app to make use of blocked numbers.
- Set to default
- Call number
+ Stvori novi kontakt
+ Dodaj postojećem kontaktu
+ Morate napraviti ovu aplikaciju zadanom aplikacijom za biranje da biste bili u mogućnosti koristiti blokirane brojeve.
+ Postavi na zadano
- No contacts found
- No contacts with emails have been found
- No contacts with phone numbers have been found
- No recent calls found
+ Nisu pronađeni kontakti
+ Nije pronađen nijedan kontakt s e-poštom
+ Nisu pronađeni kontakti s telefonskim brojevima
Novi kontakt
Uredi kontakt
@@ -34,7 +32,7 @@
Ime
Srednje ime
Prezime
- Nickname
+ Nadimak
Nema grupa
@@ -65,9 +63,9 @@
Upravljaj prikazanim karticama
Kontakti
Favoriti
- Nedavni pozivi
Pokažite dijaloški okvir za potvrdu poziva prije pokretanja poziva
- Show only contacts with phone numbers
+ Prikaži samo kontakte s telefonskim brojevima
+ Prikaži slova na telefonskoj tipkovnici
E-pošta
@@ -109,18 +107,18 @@
Naziv datoteke (bez .vcf)
- Dialpad
- Add number to contact
+ Telefonska tipkovnica
+ Dodaj broj u kontakt
- Dialer
- Calling
- Incoming call
- Incoming call from…
- Ongoing call
- Disconnected
- Decline
- Answer
+ Birač broja
+ Pozivanje
+ Dolazni poziv
+ Dolazni poziv od...
+ Poziv u tijeku
+ Prekinuto
+ Odbij
+ Odgovori
Odaberi polja za prikaz
@@ -138,12 +136,12 @@
Brzo slanje poruka (IM)
- Manage blocked numbers
- You are not blocking anyone.
- Add a blocked number
- Block number
- Block numbers
- Blocked numbers
+ Upravljanje blokiranim brojevima
+ Ne blokirate nikoga.
+ Dodaj blokirani broj
+ Blokiraj broj
+ Blokiraj brojeve
+ Blokirani brojevi
Želim promijeniti polja koja su vidljiva na kontaktima. Mogu li to napraviti?
@@ -151,7 +149,7 @@
- An app for managing your contacts without ads, respecting your privacy.
+ Aplikacija za upravljanje kontaktima, bez oglasa, poštujući Vašu privatnost.
Jednostavna aplikacija za izradu ili upravljanje kontaktima iz bilo kojeg izvora. Kontakti mogu biti pohranjeni samo na Vašem uređaju, ali i sinkronizirani putem Googlea ili drugih računa. Možete prikazati svoje omiljene kontakte na zasebnom popisu.
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 8e11b78e..bd5eaf2c 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -19,13 +19,11 @@
Aggiungi a un contatto esistente
È necessario impostare quest\'app come predefinita per utilizzare i numeri bloccati.
Imposta come predefinita
- Chiama numero
Nessun contatto trovato
Nessun contatto trovato con un\'email
Nessun contatto trovato con un numero di telefono
- Nessuna chiamata recente trovata
Nuovo contatto
Modifica contatto
@@ -65,9 +63,9 @@
Gestisci le schede mostrate
Contatti
Preferiti
- Chiamate recenti
Mostra un messaggio di conferma prima di iniziare una chiamata
Mostra solamente i contatti con almeno un numero telefonico
+ Show letters on the dialpad
Email
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index c8ba4496..6d2195dc 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -19,13 +19,11 @@
既存の連絡先に追加
You have to make this app the default dialer app to make use of blocked numbers.
Set to default
- Call number
連絡先が見つかりません
メールアドレスが登録された連絡先が見つかりません
電話番号が登録された連絡先が見つかりません
- 通話履歴はありません
新しい連絡先
連絡先を編集
@@ -65,9 +63,9 @@
表示するタブを管理
連絡先
お気に入り
- 通話履歴
発信する前に確認ダイアログを表示する
電話番号が登録された連絡先のみ表示する
+ Show letters on the dialpad
メール
diff --git a/app/src/main/res/values-ko-rKR/strings.xml b/app/src/main/res/values-ko-rKR/strings.xml
index 8a52b90e..2761fc9c 100644
--- a/app/src/main/res/values-ko-rKR/strings.xml
+++ b/app/src/main/res/values-ko-rKR/strings.xml
@@ -19,13 +19,11 @@
Add to an existing contact
You have to make this app the default dialer app to make use of blocked numbers.
Set to default
- Call number
No contacts found
No contacts with emails have been found
No contacts with phone numbers have been found
- No recent calls found
새로운 연락처
연락처 수정
@@ -65,9 +63,9 @@
Manage shown tabs
Contacts
Favorites
- Recent calls
Show a call confirmation dialog before initiating a call
Show only contacts with phone numbers
+ Show letters on the dialpad
이메일
diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml
index 63c8ea85..ba48795d 100644
--- a/app/src/main/res/values-lt/strings.xml
+++ b/app/src/main/res/values-lt/strings.xml
@@ -19,13 +19,11 @@
Add to an existing contact
You have to make this app the default dialer app to make use of blocked numbers.
Set to default
- Call number
No contacts found
No contacts with emails have been found
No contacts with phone numbers have been found
- No recent calls found
Naujas kontaktas
Redaguoti kontaktą
@@ -65,9 +63,9 @@
Manage shown tabs
Contacts
Favorites
- Recent calls
Show a call confirmation dialog before initiating a call
Show only contacts with phone numbers
+ Show letters on the dialpad
Elektroninis paštas
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index c195c4f7..113c0b58 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -19,13 +19,11 @@
Adicionar a contacto existente
Tem que tornar esta a aplicação padrão para poder bloquear números.
Definir como padrão
- Call number
Não existem contactos
Não existem contactos com endereço de e-mail
Não existem contactos com número de telefone
- Não existem chamadas recentes
Novo contacto
Editar contacto
@@ -65,9 +63,9 @@
Gerir separadores a exibir
Contactos
Favoritos
- Chamadas recentes
Mostrar diálogo para confirmar a chamada
Mostrar apenas contactos com número de telefone
+ Show letters on the dialpad
E-mail
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index 793cb16a..822976fc 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -19,13 +19,11 @@
Добавить к существующему контакту
Вы должны сделать \"Simple Contacts\" приложением по умолчанию для набора номера для использования блокировки номеров.
Сделать по умолчанию
- Набрать номер
Контакты не найдены
Контакты с адресами электронной почты не найдены
Контакты с номерами телефонов не найдены
- Недавние вызовы не найдены
Новый контакт
Редактировать контакт
@@ -65,9 +63,9 @@
Управление отображаемыми вкладками
Контакты
Избранное
- Недавние вызовы
Показывать диалог подтверждения вызова
Показывать только контакты с номерами телефонов
+ Show letters on the dialpad
Эл. почта
diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml
index 8f3d6205..c8f008e4 100644
--- a/app/src/main/res/values-sk/strings.xml
+++ b/app/src/main/res/values-sk/strings.xml
@@ -8,7 +8,7 @@
Úložisko mobilu (neviditeľné pre ostatné apky)
Firma
Pracovná pozícia
- Website
+ Webstránka
Poslať kontaktom SMS
Poslať kontaktom email
Poslať skupine SMS
@@ -19,13 +19,11 @@
Pridať k existujúcemu kontaktu
Pre použitie blokovania čísel musíte nastaviť aplikáciu ako predvolenú pre správu hovorov.
Nastaviť ako predvolenú
- Zavolať číslo
Nenašli sa žiadne kontakty
Nenašli sa žiadne kontakty s emailami
Nenašli sa žiadne kontakty s telefónnymi číslami
- Nenašli sa žiadne posledné hovory
Nový kontakt
Upraviť kontakt
@@ -65,9 +63,9 @@
Spravovať zobrazené karty
Kontakty
Obľúbené
- Predošlé hovory
Zobraziť pred spustením hovoru okno na jeho potvrdenie
Zobraziť iba kontakty s telefónnymi číslami
+ Zobraziť na číselníku písmená
Email
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index 869498cd..35b0b3fd 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -17,15 +17,13 @@
Begär de behörigheter som krävs
Skapa ny kontakt
Lägg till i en befintlig kontakt
- You have to make this app the default dialer app to make use of blocked numbers.
- Set to default
- Call number
+ Du måste ställa in den här appen som standardtelefonapp för att kunna använda blockerade nummer.
+ Ange som standard
Inga kontakter hittades
Inga kontakter med e-postadresser hittades
Inga kontakter med telefonnummer hittades
- No recent calls found
Ny kontakt
Redigera kontakt
@@ -56,7 +54,7 @@
Visa efternamn först
Visa telefonnummer i huvudvyn
Visa kontaktminiatyrer
- Show a dialpad button on the main screen
+ Visa en knappsatsknapp i huvudvyn
Vid kontakttryckning
Ring kontakt
Visa kontaktuppgifter
@@ -65,9 +63,9 @@
Hantera visade flikar
Kontakter
Favoriter
- Senaste samtal
Visa en bekräftelsedialogruta före uppringning
Visa bara kontakter med telefonnummer
+ Visa bokstäver på knappsatsen
E-post
@@ -113,14 +111,14 @@
Lägg till nummer i kontakt
- Dialer
- Calling
- Incoming call
- Incoming call from…
- Ongoing call
- Disconnected
- Decline
- Answer
+ Telefon
+ Ringer
+ Inkommande samtal
+ Inkommande samtal från…
+ Pågående samtal
+ Frånkopplad
+ Avvisa
+ Svara
Välj vilka fält som ska visas
@@ -138,12 +136,12 @@
Snabbmeddelanden (IM)
- Manage blocked numbers
- You are not blocking anyone.
- Add a blocked number
- Block number
- Block numbers
- Blocked numbers
+ Hantera blockerade nummer
+ Du blockerar inte någon.
+ Lägg till ett blockerat nummer
+ Blockera nummer
+ Blockera nummer
+ Blockerade nummer
I want to change what fields are visible at contacts. Can I do it?
@@ -151,7 +149,7 @@
- An app for managing your contacts without ads, respecting your privacy.
+ En app för att hantera dina kontakter utan reklam, respekterar din integritet.
En enkel app för att skapa och hantera kontakter från olika källor. Kontakterna kan lagras bara på din enhet, men kan också synkroniseras med ditt Google-konto eller andra konton. Du kan visa dina favoritkontakter i en separat lista.
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index f96f9a28..b254a9c3 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -19,13 +19,11 @@
Mevcut bir kişiye ekle
You have to make this app the default dialer app to make use of blocked numbers.
Set to default
- Call number
Kişi bulunamadı
E-posta ile hiç bağlantı bulunamadı
Telefon numaralarını içeren kişi bulunamadı
- No recent calls found
Yeni kişi
Kişiyi düzenle
@@ -65,9 +63,9 @@
Gösterilen sekmeleri yönet
Kişiler
Favoriler
- Son aramalar
Arama başlatmadan önce arama onayı penceresi göster
Sadece telefon numaralarını içeren kişileri göster
+ Show letters on the dialpad
E-posta
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index d42a3f88..10da0ad2 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -19,13 +19,11 @@
添加至已存在的聯絡人
你必須將這應用程式設為預設的撥號程式來使用黑名單。
設為預設
- 撥打號碼
未發現聯絡人
未發現含有電子信箱的聯絡人
未發現含有電話號碼的聯絡人
- 未發現通話紀錄
新聯絡人
編輯聯絡人
@@ -65,9 +63,9 @@
管理顯示的頁面
聯絡人
我的最愛
- 通話紀錄
開始通話前顯示通話確認框
只顯示含有電話話碼的聯絡人
+ Show letters on the dialpad
電子信箱
diff --git a/app/src/main/res/values/donottranslate.xml b/app/src/main/res/values/donottranslate.xml
index 309ad8d7..f54cf156 100644
--- a/app/src/main/res/values/donottranslate.xml
+++ b/app/src/main/res/values/donottranslate.xml
@@ -13,6 +13,10 @@
Telegram
+
+ Removed the Recents tab due to Googles\' latest security policies being stricter than initiall thought\n
+ Allow showing letters on the dialpad
+
Changed the way contacts are fetched, please reset your filters.
Added new options for toggling 24 hour time format and showing only contacts with phone numbers
Added a simple dialpad, dialer will come soon
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index a7ce2f58..4c4c31dc 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -19,13 +19,11 @@
Add to an existing contact
You have to make this app the default dialer app to make use of blocked numbers.
Set to default
- Call number
No contacts found
No contacts with emails have been found
No contacts with phone numbers have been found
- No recent calls found
New contact
Edit contact
@@ -65,9 +63,9 @@
Manage shown tabs
Contacts
Favorites
- Recent calls
Show a call confirmation dialog before initiating a call
Show only contacts with phone numbers
+ Show letters on the dialpad
Email
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 1c76d77b..f9f377e2 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -4,10 +4,16 @@
+
+