Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed

- Compatibility updates for Android 15 & 16
- Calling now works directly without launching dialpad ([#562])

## [1.5.0] - 2025-10-18
Expand Down
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ dependencies {
implementation(libs.mmslib)
implementation(libs.androidx.swiperefreshlayout)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.documentfile)
implementation(libs.androidx.lifecycle.process)
implementation(libs.ez.vcard)
implementation(libs.kotlinx.serialization.json)
Expand Down
9 changes: 1 addition & 8 deletions app/detekt-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@
<ID>MagicNumber:ImageCompressor.kt$ImageCompressor$8</ID>
<ID>MagicNumber:ImageCompressor.kt$ImageCompressor$90f</ID>
<ID>MagicNumber:MainActivity.kt$MainActivity$30</ID>
<ID>MagicNumber:MessagesDatabase.kt$MessagesDatabase.Companion.&lt;no name provided&gt;$3</ID>
<ID>MagicNumber:MessagesDatabase.kt$MessagesDatabase.Companion.&lt;no name provided&gt;$4</ID>
<ID>MagicNumber:MessagesDatabase.kt$MessagesDatabase.Companion.&lt;no name provided&gt;$5</ID>
<ID>MagicNumber:MessagesDatabase.kt$MessagesDatabase.Companion.&lt;no name provided&gt;$6</ID>
<ID>MagicNumber:MessagesDatabase.kt$MessagesDatabase.Companion.&lt;no name provided&gt;$7</ID>
<ID>MagicNumber:MessagesDatabase.kt$MessagesDatabase.Companion.&lt;no name provided&gt;$8</ID>
<ID>MagicNumber:MessagesDatabase.kt$MessagesDatabase.Companion.&lt;no name provided&gt;$9</ID>
<ID>MagicNumber:ScheduleMessageDialog.kt$ScheduleMessageDialog$23</ID>
<ID>MagicNumber:ScheduleMessageDialog.kt$ScheduleMessageDialog$5</ID>
<ID>MagicNumber:ScheduleMessageDialog.kt$ScheduleMessageDialog$59</ID>
Expand Down Expand Up @@ -134,6 +127,7 @@
<ID>MaxLineLength:SmsReceiver.kt$SmsReceiver$val participant = SimpleContact(0, 0, senderName, photoUri, arrayListOf(phoneNumber), ArrayList(), ArrayList())</ID>
<ID>MaxLineLength:SmsSender.kt$SmsSender$val intent = Intent(SendStatusReceiver.SMS_DELIVERED_ACTION, requestUri, app, SmsStatusDeliveredReceiver::class.java)</ID>
<ID>MaxLineLength:SmsStatusDeliveredReceiver.kt$SmsStatusDeliveredReceiver$// TODO: Need to check whether SC still trying to deliver the SMS to destination and will send the report again?</ID>
<ID>MaxLineLength:ThreadActivity.kt$ThreadActivity$// check keyboard height just to be sure, 150 seems like a good middle ground between ime and navigation bar</ID>
<ID>MaxLineLength:ThreadActivity.kt$ThreadActivity$// do not show the date/time above every message, only if the difference between the 2 messages is at least MIN_DATE_TIME_DIFF_SECS,</ID>
<ID>MaxLineLength:ThreadActivity.kt$ThreadActivity$if</ID>
<ID>MaxLineLength:ThreadActivity.kt$ThreadActivity$privateContacts.firstOrNull { it.doesHavePhoneNumber(participant.phoneNumbers.first().normalizedNumber) }</ID>
Expand All @@ -149,7 +143,6 @@
<ID>MaxLineLength:VCard.kt$VCardPropertyWrapper.Companion$is Note -&gt; VCardPropertyWrapper(value, context.getString(org.fossify.commons.R.string.notes), property)</ID>
<ID>MaxLineLength:VCard.kt$VCardPropertyWrapper.Companion$is Telephone -&gt; VCardPropertyWrapper(text.normalizePhoneNumber(), getPropertyTypeString(context), property)</ID>
<ID>MaxLineLength:VCard.kt$VCardWrapper$data</ID>
<ID>MaxLineLength:VCardViewerActivity.kt$VCardViewerActivity$updateMaterialActivityViews(binding.vcardViewerCoordinator, binding.contactsList, useTransparentNavigation = true, useTopSearchMenu = false)</ID>
<ID>MaxLineLength:VCardViewerAdapter.kt$VCardViewerAdapter.VCardPropertyViewHolder$inner</ID>
<ID>NestedBlockDepth:AttachmentUtils.kt$AttachmentUtils$private fun readBody(parser: XmlPullParser): List&lt;String&gt;</ID>
<ID>NestedBlockDepth:Context.kt$fun Context.getThreadParticipants( threadId: Long, contactsMap: HashMap&lt;Int, SimpleContact&gt;?, ): ArrayList&lt;SimpleContact&gt;</ID>
Expand Down
374 changes: 187 additions & 187 deletions app/lint-baseline.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,22 @@ class ArchivedConversationsActivity : SimpleActivity() {

@SuppressLint("InlinedApi")
override fun onCreate(savedInstanceState: Bundle?) {
isMaterialActivity = true
super.onCreate(savedInstanceState)
setContentView(binding.root)
setupOptionsMenu()

updateMaterialActivityViews(
mainCoordinatorLayout = binding.archiveCoordinator,
nestedView = binding.conversationsList,
useTransparentNavigation = true,
useTopSearchMenu = false
setupEdgeToEdge(padBottomImeAndSystem = listOf(binding.conversationsList))
setupMaterialScrollListener(
scrollingView = binding.conversationsList,
topAppBar = binding.archiveAppbar
)
setupMaterialScrollListener(scrollingView = binding.conversationsList, toolbar = binding.archiveToolbar)

loadArchivedConversations()
}

override fun onResume() {
super.onResume()
setupToolbar(binding.archiveToolbar, NavigationIcon.Arrow)
updateMenuColors()

setupTopAppBar(binding.archiveAppbar, NavigationIcon.Arrow)
loadArchivedConversations()
}

Expand All @@ -79,10 +74,6 @@ class ArchivedConversationsActivity : SimpleActivity() {
}
}

private fun updateMenuColors() {
updateStatusbarColor(getProperBackgroundColor())
}

private fun loadArchivedConversations() {
ensureBackgroundThread {
val conversations = try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,13 @@ class ConversationDetailsActivity : SimpleActivity() {
private val binding by viewBinding(ActivityConversationDetailsBinding::inflate)

override fun onCreate(savedInstanceState: Bundle?) {
isMaterialActivity = true
super.onCreate(savedInstanceState)
setContentView(binding.root)

updateMaterialActivityViews(
mainCoordinatorLayout = binding.conversationDetailsCoordinator,
nestedView = binding.participantsRecyclerview,
useTransparentNavigation = true,
useTopSearchMenu = false
)
setupEdgeToEdge(padBottomSystem = listOf(binding.conversationDetailsNestedScrollview))
setupMaterialScrollListener(
scrollingView = binding.conversationDetailsNestedScrollview,
toolbar = binding.conversationDetailsToolbar
topAppBar = binding.conversationDetailsAppbar,
)

threadId = intent.getLongExtra(THREAD_ID, 0L)
Expand All @@ -77,7 +71,7 @@ class ConversationDetailsActivity : SimpleActivity() {

override fun onResume() {
super.onResume()
setupToolbar(binding.conversationDetailsToolbar, NavigationIcon.Arrow)
setupTopAppBar(binding.conversationDetailsAppbar, NavigationIcon.Arrow)
updateTextColors(binding.conversationDetailsHolder)

val primaryColor = getProperPrimaryColor()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import org.fossify.commons.extensions.getProperBackgroundColor
import org.fossify.commons.extensions.getProperPrimaryColor
import org.fossify.commons.extensions.getProperTextColor
import org.fossify.commons.extensions.hideKeyboard
import org.fossify.commons.extensions.navigationBarHeight
import org.fossify.commons.extensions.openNotificationSettings
import org.fossify.commons.extensions.toast
import org.fossify.commons.extensions.underlineText
Expand Down Expand Up @@ -77,6 +76,8 @@ import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode

class MainActivity : SimpleActivity() {
override var isSearchBarEnabled = true

private val MAKE_DEFAULT_APP_REQUEST = 1

private var storedTextColor = 0
Expand All @@ -88,19 +89,13 @@ class MainActivity : SimpleActivity() {

@SuppressLint("InlinedApi")
override fun onCreate(savedInstanceState: Bundle?) {
isMaterialActivity = true
super.onCreate(savedInstanceState)
setContentView(binding.root)
appLaunched(BuildConfig.APPLICATION_ID)
setupOptionsMenu()
refreshMenuItems()

updateMaterialActivityViews(
mainCoordinatorLayout = binding.mainCoordinator,
nestedView = binding.conversationsList,
useTransparentNavigation = true,
useTopSearchMenu = true
)
setupEdgeToEdge(padBottomImeAndSystem = listOf(binding.conversationsList))

checkAndDeleteOldRecycleBinMessages()
clearAllMessagesIfNeeded {
Expand Down Expand Up @@ -139,9 +134,6 @@ class MainActivity : SimpleActivity() {
binding.conversationsProgressBar.setIndicatorColor(properPrimaryColor)
binding.conversationsProgressBar.trackColor = properPrimaryColor.adjustAlpha(LOWER_ALPHA)
checkShortcut()
(binding.conversationsFab.layoutParams as? CoordinatorLayout.LayoutParams)?.bottomMargin =
navigationBarHeight + resources.getDimension(org.fossify.commons.R.dimen.activity_margin)
.toInt()
}

override fun onPause() {
Expand All @@ -154,17 +146,18 @@ class MainActivity : SimpleActivity() {
bus?.unregister(this)
}

override fun onBackPressed() {
if (binding.mainMenu.isSearchOpen) {
override fun onBackPressedCompat(): Boolean {
return if (binding.mainMenu.isSearchOpen) {
binding.mainMenu.closeSearch()
true
} else {
appLockManager.lock()
super.onBackPressed()
false
}
}

private fun setupOptionsMenu() {
binding.mainMenu.getToolbar().inflateMenu(R.menu.menu_main)
binding.mainMenu.requireToolbar().inflateMenu(R.menu.menu_main)
binding.mainMenu.toggleHideOnScroll(true)
binding.mainMenu.setupMenu()

Expand All @@ -183,7 +176,7 @@ class MainActivity : SimpleActivity() {
searchTextChanged(text)
}

binding.mainMenu.getToolbar().setOnMenuItemClickListener { menuItem ->
binding.mainMenu.requireToolbar().setOnMenuItemClickListener { menuItem ->
when (menuItem.itemId) {
R.id.show_recycle_bin -> launchRecycleBin()
R.id.show_archived -> launchArchivedConversations()
Expand All @@ -196,7 +189,7 @@ class MainActivity : SimpleActivity() {
}

private fun refreshMenuItems() {
binding.mainMenu.getToolbar().menu.apply {
binding.mainMenu.requireToolbar().menu.apply {
findItem(R.id.show_recycle_bin).isVisible = config.useRecycleBin
findItem(R.id.show_archived).isVisible = config.isArchiveAvailable
}
Expand All @@ -219,7 +212,6 @@ class MainActivity : SimpleActivity() {
}

private fun updateMenuColors() {
updateStatusbarColor(getProperBackgroundColor())
binding.mainMenu.updateColors()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,15 @@ class ManageBlockedKeywordsActivity : SimpleActivity(), RefreshRecyclerViewListe
private val binding by viewBinding(ActivityManageBlockedKeywordsBinding::inflate)

override fun onCreate(savedInstanceState: Bundle?) {
isMaterialActivity = true
super.onCreate(savedInstanceState)
setContentView(binding.root)
updateBlockedKeywords()
setupOptionsMenu()

updateMaterialActivityViews(
mainCoordinatorLayout = binding.blockKeywordsCoordinator,
nestedView = binding.manageBlockedKeywordsList,
useTransparentNavigation = true,
useTopSearchMenu = false
)
setupEdgeToEdge(padBottomImeAndSystem = listOf(binding.manageBlockedKeywordsList))
setupMaterialScrollListener(
scrollingView = binding.manageBlockedKeywordsList,
toolbar = binding.blockKeywordsToolbar
topAppBar = binding.blockKeywordsAppbar
)
updateTextColors(binding.manageBlockedKeywordsWrapper)

Expand All @@ -63,7 +57,7 @@ class ManageBlockedKeywordsActivity : SimpleActivity(), RefreshRecyclerViewListe

override fun onResume() {
super.onResume()
setupToolbar(binding.blockKeywordsToolbar, NavigationIcon.Arrow)
setupTopAppBar(binding.blockKeywordsAppbar, NavigationIcon.Arrow)
}

private fun setupOptionsMenu() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,15 @@ class NewConversationActivity : SimpleActivity() {
private val binding by viewBinding(ActivityNewConversationBinding::inflate)

override fun onCreate(savedInstanceState: Bundle?) {
isMaterialActivity = true
super.onCreate(savedInstanceState)
setContentView(binding.root)
title = getString(R.string.new_conversation)
updateTextColors(binding.newConversationHolder)

updateMaterialActivityViews(
mainCoordinatorLayout = binding.newConversationCoordinator,
nestedView = binding.contactsList,
useTransparentNavigation = true,
useTopSearchMenu = false
)
setupEdgeToEdge(padBottomImeAndSystem = listOf(binding.contactsList))
setupMaterialScrollListener(
scrollingView = binding.contactsList,
toolbar = binding.newConversationToolbar
topAppBar = binding.newConversationAppbar
)

window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
Expand All @@ -85,7 +79,7 @@ class NewConversationActivity : SimpleActivity() {

override fun onResume() {
super.onResume()
setupToolbar(binding.newConversationToolbar, NavigationIcon.Arrow)
setupTopAppBar(binding.newConversationAppbar, NavigationIcon.Arrow)
binding.noContactsPlaceholder2.setTextColor(getProperPrimaryColor())
binding.noContactsPlaceholder2.underlineText()
binding.suggestionsLabel.setTextColor(getProperPrimaryColor())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import org.fossify.commons.dialogs.ConfirmationDialog
import org.fossify.commons.extensions.areSystemAnimationsEnabled
import org.fossify.commons.extensions.beGoneIf
import org.fossify.commons.extensions.beVisibleIf
import org.fossify.commons.extensions.getProperBackgroundColor
import org.fossify.commons.extensions.hideKeyboard
import org.fossify.commons.extensions.viewBinding
import org.fossify.commons.helpers.NavigationIcon
Expand All @@ -33,30 +32,22 @@ class RecycleBinConversationsActivity : SimpleActivity() {

@SuppressLint("InlinedApi")
override fun onCreate(savedInstanceState: Bundle?) {
isMaterialActivity = true
super.onCreate(savedInstanceState)
setContentView(binding.root)
setupOptionsMenu()

updateMaterialActivityViews(
mainCoordinatorLayout = binding.recycleBinCoordinator,
nestedView = binding.conversationsList,
useTransparentNavigation = true,
useTopSearchMenu = false
)
setupEdgeToEdge(padBottomImeAndSystem = listOf(binding.conversationsList))
setupMaterialScrollListener(
scrollingView = binding.conversationsList,
toolbar = binding.recycleBinToolbar
topAppBar = binding.recycleBinAppbar
)

loadRecycleBinConversations()
}

override fun onResume() {
super.onResume()
setupToolbar(binding.recycleBinToolbar, NavigationIcon.Arrow)
updateMenuColors()

setupTopAppBar(binding.recycleBinAppbar, NavigationIcon.Arrow)
loadRecycleBinConversations()
}

Expand All @@ -82,10 +73,6 @@ class RecycleBinConversationsActivity : SimpleActivity() {
}
}

private fun updateMenuColors() {
updateStatusbarColor(getProperBackgroundColor())
}

private fun loadRecycleBinConversations() {
ensureBackgroundThread {
val conversations = try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,25 +85,19 @@ class SettingsActivity : SimpleActivity() {
private val binding by viewBinding(ActivitySettingsBinding::inflate)

override fun onCreate(savedInstanceState: Bundle?) {
isMaterialActivity = true
super.onCreate(savedInstanceState)
setContentView(binding.root)

updateMaterialActivityViews(
mainCoordinatorLayout = binding.settingsCoordinator,
nestedView = binding.settingsHolder,
useTransparentNavigation = true,
useTopSearchMenu = false
)
setupEdgeToEdge(padBottomImeAndSystem = listOf(binding.settingsNestedScrollview))
setupMaterialScrollListener(
scrollingView = binding.settingsNestedScrollview,
toolbar = binding.settingsToolbar
topAppBar = binding.settingsAppbar
)
}

override fun onResume() {
super.onResume()
setupToolbar(binding.settingsToolbar, NavigationIcon.Arrow)
setupTopAppBar(binding.settingsAppbar, NavigationIcon.Arrow)

setupCustomizeColors()
setupCustomizeNotifications()
Expand Down
Loading
Loading