show the Answer call button only while ringing

This commit is contained in:
tibbi 2018-11-27 15:02:06 +01:00
parent 48a7eb3c72
commit ce6f6e7049
1 changed files with 2 additions and 0 deletions

View File

@ -78,6 +78,8 @@ class DialerCallService : Service() {
setImageViewBitmap(R.id.call_decline, resources.getColoredBitmap(R.drawable.ic_phone_down, resources.getColor(R.color.theme_dark_red_primary_color))) setImageViewBitmap(R.id.call_decline, resources.getColoredBitmap(R.drawable.ic_phone_down, resources.getColor(R.color.theme_dark_red_primary_color)))
setImageViewBitmap(R.id.call_answer, resources.getColoredBitmap(R.drawable.ic_phone, resources.getColor(R.color.md_green_700))) setImageViewBitmap(R.id.call_answer, resources.getColoredBitmap(R.drawable.ic_phone, resources.getColor(R.color.md_green_700)))
setVisibleIf(R.id.call_answer, callStatus == Call.STATE_RINGING)
setOnClickPendingIntent(R.id.call_decline, getDeclineCallIntent()) setOnClickPendingIntent(R.id.call_decline, getDeclineCallIntent())
setOnClickPendingIntent(R.id.call_answer, getAnswerCallIntent()) setOnClickPendingIntent(R.id.call_answer, getAnswerCallIntent())
} }