Skip to content

Commit

Permalink
Implement sim color support in call activity
Browse files Browse the repository at this point in the history
  • Loading branch information
derrohrbach committed Jan 22, 2024
1 parent d8ba4fa commit ec04030
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/src/main/kotlin/org/fossify/phone/activities/CallActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -585,14 +585,15 @@ class CallActivity : SimpleActivity() {
@SuppressLint("MissingPermission")
private fun checkCalledSIMCard() {
try {
val accounts = telecomManager.callCapablePhoneAccounts
if (accounts.size > 1) {
accounts.forEachIndexed { index, account ->
if (account == CallManager.getPrimaryCall()?.details?.accountHandle) {
val simLabels = getAvailableSIMCardLabels()
if (simLabels.size > 1) {
simLabels.forEachIndexed { index, sim ->
if (sim.handle == CallManager.getPrimaryCall()?.details?.accountHandle) {
binding.apply {
callSimId.text = "${index + 1}"
callSimId.text = sim.id.toString()
callSimId.beVisible()
callSimImage.beVisible()
callSimImage.applyColorFilter(sim.color.adjustSimColorForBackground(getProperBackgroundColor()))
}

val acceptDrawableId = when (index) {
Expand Down

0 comments on commit ec04030

Please sign in to comment.