diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/CallActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/CallActivity.kt index 02dbe65b..b4ba46ae 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/CallActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/CallActivity.kt @@ -107,8 +107,6 @@ class CallActivity : SimpleActivity() { val callContact = CallManager.getCallContact(applicationContext) ?: return caller_name_label.text = if (callContact.name.isNotEmpty()) callContact.name else getString(R.string.unknown_caller) - caller_number_label.text = callContact.number - caller_number_label.beVisibleIf(callContact.number.isNotEmpty()) if (callContactAvatar != null) { caller_avatar.setImageBitmap(callContactAvatar) @@ -196,7 +194,7 @@ class CallActivity : SimpleActivity() { 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 contentText = "${getString(R.string.incoming_call)} ${callContact?.number ?: ""}" + val contentText = getString(R.string.incoming_call) val collapsedView = RemoteViews(packageName, R.layout.call_notification).apply { setText(R.id.notification_caller_name, callerName) 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 index 28c5a914..3be9e194 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/CallManager.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/CallManager.kt @@ -46,7 +46,7 @@ class CallManager { } fun getCallContact(context: Context): CallContact? { - val callContact = CallContact("", "", "") + val callContact = CallContact("", "") if (call == null) { return callContact } @@ -54,16 +54,10 @@ class CallManager { val uri = Uri.decode(call!!.details.handle.toString()) if (uri.startsWith("tel:")) { val number = uri.substringAfter("tel:") - callContact.number = number callContact.name = context.getNameFromPhoneNumber(number) callContact.photoUri = context.getPhotoUriFromPhoneNumber(number) } - if (callContact.name.isEmpty() && callContact.number.isNotEmpty()) { - callContact.name = callContact.number - callContact.number = "" - } - return callContact } } diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/CallContact.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/CallContact.kt index d40a4e34..86a3ae69 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/CallContact.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/CallContact.kt @@ -1,4 +1,4 @@ package com.simplemobiletools.contacts.pro.models // a simpler Contact model containing just info needed at the call screen -data class CallContact(var name: String, var number: String, var photoUri: String) +data class CallContact(var name: String, var photoUri: String) diff --git a/app/src/main/res/layout/activity_call.xml b/app/src/main/res/layout/activity_call.xml index 628701f3..5f558130 100644 --- a/app/src/main/res/layout/activity_call.xml +++ b/app/src/main/res/layout/activity_call.xml @@ -29,18 +29,6 @@ app:layout_constraintTop_toBottomOf="@+id/caller_avatar" tools:text="Caller name" /> - - 72dp 30dp - 26sp - 20sp + 28sp 34sp