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

Commit af68739b authored by Mohit Mali's avatar Mohit Mali
Browse files

Change app theme according to system accent color

parent b91835b7
Loading
Loading
Loading
Loading
+15 −10
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (C) 2013 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,8 +16,10 @@

<resources>

    <color name="dialer_color">@*android:color/accent_device_default</color>

    <!-- In-call UI background color. -->
    <color name="incall_background_color">@color/dialer_theme_color</color>
    <color name="incall_background_color">@color/dialer_color</color>
    <color name="incall_accent_color">#ffffff</color>

    <!-- Background color of main banner. -->
@@ -56,16 +57,16 @@
    <color name="incall_dialpad_background_pressed">#ccaaaaaa</color>

    <color name="button_background_color">@color/incall_background_color</color>
    <color name="button_selected_color">@color/dialer_theme_color_dark</color>
    <color name="button_selected_color">@color/dialer_color</color>
    <!-- 70% opacity, white. -->
    <color name="button_default_color">#b3ffffff</color>
    <!-- 20% opacity, white. -->
    <color name="button_disabled_color">#33ffffff</color>

    <!-- Background color of action bars -->
    <color name="actionbar_background_color">@color/dialer_theme_color</color>
    <color name="actionbar_background_color">@color/dialer_color</color>
    <!-- Background color for status bar. For portrait this will be ignored. -->
    <color name="statusbar_background_color">@color/dialer_theme_color</color>
    <color name="statusbar_background_color">@color/dialer_color</color>

    <color name="translucent_shadow">#33999999</color>

@@ -118,10 +119,14 @@
    <color name="ripple_light">#40000000</color>

    <color name="contact_context_title_text_color">@color/incall_call_banner_subtext_color</color>
    <color name="person_contact_context_message_text_color">@color/dialer_theme_color</color>
    <color name="person_contact_context_message_background_color">@color/incall_call_banner_subtext_color</color>
    <color name="person_contact_context_detail_text_color">@color/incall_call_banner_subtext_color</color>
    <color name="business_contact_context_text_color">@color/incall_call_banner_subtext_color</color>
    <color name="person_contact_context_message_text_color">@color/dialer_color</color>
    <color name="person_contact_context_message_background_color">
        @color/incall_call_banner_subtext_color
    </color>
    <color name="person_contact_context_detail_text_color">@color/incall_call_banner_subtext_color
    </color>
    <color name="business_contact_context_text_color">@color/incall_call_banner_subtext_color
    </color>

    <!-- White background for dialer -->
    <color name="background_dialer_white">#ffffff</color>
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@
        <item name="android:windowContentOverlay">@null</item>
        <item name="dialpad_key_button_touch_tint">@color/incall_dialpad_touch_tint</item>
        <item name="android:textColorPrimary">@color/incall_call_banner_text_color</item>
        <item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item>
        <item name="android:colorPrimaryDark">@color/dialer_color</item>
        <item name="android:popupMenuStyle">@style/InCallPopupMenuStyle</item>
        <item name="android:actionBarStyle">@style/InCallActionBarStyle</item>
        <item name="android:buttonStyleToggle">@style/InCallCompoundButton</item>
+2 −2
Original line number Diff line number Diff line
@@ -267,7 +267,7 @@ public class ExternalCallNotifier implements ExternalCallList.ExternalCallListen
        builder.setSmallIcon(R.drawable.ic_call_white_24dp);
        builder.setContentTitle(info.getContentTitle());
        builder.setLargeIcon(info.getLargeIcon());
        builder.setColor(mContext.getResources().getColor(R.color.dialer_theme_color));
        builder.setColor(mContext.getResources().getColor(R.color.dialer_color));
        builder.addPerson(info.getPersonReference());

        // Where the external call supports being transferred to the local device, add an action
@@ -294,7 +294,7 @@ public class ExternalCallNotifier implements ExternalCallList.ExternalCallListen
         */
        Notification.Builder publicBuilder = new Notification.Builder(mContext);
        publicBuilder.setSmallIcon(R.drawable.ic_call_white_24dp);
        publicBuilder.setColor(mContext.getResources().getColor(R.color.dialer_theme_color));
        publicBuilder.setColor(mContext.getResources().getColor(R.color.dialer_color));

        builder.setPublicVersion(publicBuilder.build());
        Notification notification = builder.build();
+2 −2
Original line number Diff line number Diff line
@@ -48,8 +48,8 @@ public class InCallUIMaterialColorMapUtils extends MaterialColorMapUtils {
     */
    @SuppressWarnings("deprecation")
    public static MaterialPalette getDefaultPrimaryAndSecondaryColors(Resources resources) {
        final int primaryColor = resources.getColor(R.color.dialer_theme_color);
        final int secondaryColor = resources.getColor(R.color.dialer_theme_color_dark);
        final int primaryColor = resources.getColor(R.color.dialer_color);
        final int secondaryColor = resources.getColor(R.color.dialer_color);
        return new MaterialPalette(primaryColor, secondaryColor);
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -374,7 +374,7 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener,
         */
        Notification.Builder publicBuilder = new Notification.Builder(mContext);
        publicBuilder.setSmallIcon(iconResId)
                .setColor(mContext.getResources().getColor(R.color.dialer_theme_color))
                .setColor(mContext.getResources().getColor(R.color.dialer_color))
                // Hide work call state for the lock screen notification
                .setContentTitle(getContentString(call, ContactsUtils.USER_TYPE_CURRENT));
        setNotificationWhen(call, callState, publicBuilder);
@@ -404,7 +404,7 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener,
        builder.setSmallIcon(iconResId);
        builder.setContentTitle(contentTitle);
        builder.setLargeIcon(largeIcon);
        builder.setColor(mContext.getResources().getColor(R.color.dialer_theme_color));
        builder.setColor(mContext.getResources().getColor(R.color.dialer_color));

        if (isVideoUpgradeRequest) {
            builder.setUsesChronometer(false);
Loading