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

Commit 795946c8 authored by Brandon Maxwell's avatar Brandon Maxwell
Browse files

Changing to use compat classes for getColor calls

Bug: 25776171
Change-Id: I972ae0cc74044b53e178bfd9e4e1f230b2351d24
parent 6a88bd12
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1661,7 +1661,9 @@ public class InCallPresenter implements CallList.Listener,
        final Resources resources = mInCallActivity.getResources();
        final int color;
        if (resources.getBoolean(R.bool.is_layout_landscape)) {
            color = resources.getColor(R.color.statusbar_background_color, null);
            // TODO use ResourcesCompat.getColor(Resources, int, Resources.Theme) when available
            // {@link Resources#getColor(int)} used for compatibility
            color = resources.getColor(R.color.statusbar_background_color);
        } else {
            color = mThemeColors.mSecondaryColor;
        }
+6 −2
Original line number Diff line number Diff line
@@ -44,9 +44,13 @@ public class InCallUIMaterialColorMapUtils extends MaterialColorMapUtils {
        return super.calculatePrimaryAndSecondaryColor(color);
    }

    /**
     * {@link Resources#getColor(int) used for compatibility
     */
    @SuppressWarnings("deprecation")
    public static MaterialPalette getDefaultPrimaryAndSecondaryColors(Resources resources) {
        final int primaryColor = resources.getColor(R.color.dialer_theme_color, null);
        final int secondaryColor = resources.getColor(R.color.dialer_theme_color_dark, null);
        final int primaryColor = resources.getColor(R.color.dialer_theme_color);
        final int secondaryColor = resources.getColor(R.color.dialer_theme_color_dark);
        return new MaterialPalette(primaryColor, secondaryColor);
    }
}
 No newline at end of file