Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2fba8a9 authored by chengzhi.hou's avatar chengzhi.hou Committed by Gerrit Code Review
Browse files

Specify different colors for answered incoming call and outgoing call icons.

Change-Id: I8776ef3e2e20e66ec9524bf5cee76af5e2d4c2e4
parent 0a93dc3b
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
    <color name="dialtacts_secondary_text_color">#737373</color>
    <color name="dialer_red_highlight_color">#ff1744</color>
    <color name="dialer_green_highlight_color">#00c853</color>
    <color name="dialer_blue_highlight_color">#00a8ff</color>

    <color name="setting_background_color">#ffffff</color>
    <color name="setting_button_color">#eee</color>
@@ -91,8 +92,11 @@
    <!-- Color for blacklist call icons. -->
    <color name="blacklisted_call">#ff000000</color>

    <!-- Color for answered or outgoing call icons. -->
    <color name="answered_call">@color/dialer_green_highlight_color</color>
    <!-- Color for answered call icons. -->
    <color name="answered_incoming_call">@color/dialer_blue_highlight_color</color>

    <!-- Color for outgoing call icons. -->
    <color name="answered_outgoing_call">@color/dialer_green_highlight_color</color>

    <!-- Color for icons in the actionbar -->
    <color name="actionbar_icon_color">#ffffff</color>
+2 −2
Original line number Diff line number Diff line
@@ -200,11 +200,11 @@ public class CallTypeIconsView extends View {
            final android.content.res.Resources r = context.getResources();

            incoming = r.getDrawable(R.drawable.ic_call_arrow);
            incoming.setColorFilter(r.getColor(R.color.answered_call), PorterDuff.Mode.MULTIPLY);
            incoming.setColorFilter(r.getColor(R.color.answered_incoming_call), PorterDuff.Mode.MULTIPLY);

            // Create a rotated instance of the call arrow for outgoing calls.
            outgoing = BitmapUtil.getRotatedDrawable(r, R.drawable.ic_call_arrow, 180f);
            outgoing.setColorFilter(r.getColor(R.color.answered_call), PorterDuff.Mode.MULTIPLY);
            outgoing.setColorFilter(r.getColor(R.color.answered_outgoing_call), PorterDuff.Mode.MULTIPLY);

            // Need to make a copy of the arrow drawable, otherwise the same instance colored
            // above will be recolored here.