To fix this issue, update the code as follows:
Correct way to set the text for the accept and decline buttons
val acceptText = data?.getString(EXTRA_CALLKEEP_ACCEPT_TEXT, "Accept")
btnAnswer.setText(acceptText)
val declineText = data?.getString(EXTRA_CALLKEEP_DECLINE_TEXT, "Decline")
btnDecline.setText(declineText) // Use btnDecline to set the decline button text