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

Commit df0be357 authored by Hyunyoung Song's avatar Hyunyoung Song Committed by android-build-merger
Browse files

Merge "ic_corp_badge shape change on adaptive icon shape change" into qt-dev

am: e967fe3d

Change-Id: I1303877c07ea567d06b3a46db5ffbc2d9dc5347a
parents 145bf142 e967fe3d
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 */
package android.util;

import android.app.ActivityThread;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
@@ -102,16 +103,17 @@ public final class LauncherIcons {
    }

    public Drawable getBadgedDrawable(Drawable base, int foregroundRes, int backgroundColor) {
        Resources sysRes = Resources.getSystem();
        Resources overlayableRes =
                ActivityThread.currentActivityThread().getApplication().getResources();

        Drawable badgeShadow = sysRes.getDrawable(
        Drawable badgeShadow = overlayableRes.getDrawable(
                com.android.internal.R.drawable.ic_corp_icon_badge_shadow);

        Drawable badgeColor = sysRes.getDrawable(
        Drawable badgeColor = overlayableRes.getDrawable(
                com.android.internal.R.drawable.ic_corp_icon_badge_color)
                .getConstantState().newDrawable().mutate();

        Drawable badgeForeground = sysRes.getDrawable(foregroundRes);
        Drawable badgeForeground = overlayableRes.getDrawable(foregroundRes);
        badgeForeground.setTint(backgroundColor);

        Drawable[] drawables = base == null
+11 −8
Original line number Diff line number Diff line
@@ -19,12 +19,15 @@ Copyright (C) 2016 The Android Open Source Project
        android:height="64dp"
        android:viewportWidth="64"
        android:viewportHeight="64">

    <group
        android:scaleX=".24"
        android:scaleY=".24"
        android:translateX="38"
        android:translateY="38">
        <path
            android:fillColor="#fcfcfc"
            android:strokeColor="#e8eaed"
            android:strokeWidth="0.25"
        android:pathData="M62,50A12,12,0,1,1,50,38,12,12,0,0,1,62,50" />
    <path
        android:pathData="M 0 0 H 64 V 64 H 0 V 0 Z" />
            android:pathData="@string/config_icon_mask" />
    </group>
</vector>
 No newline at end of file
+48 −27
Original line number Diff line number Diff line
@@ -19,31 +19,52 @@ Copyright (C) 2016 The Android Open Source Project
        android:height="64dp"
        android:viewportWidth="64"
        android:viewportHeight="64">

    <group
        android:scaleX=".24"
        android:scaleY=".24"
        android:translateX="38"
        android:translateY="39.25">
        <path
            android:fillColor="#000000"
            android:fillAlpha="0.06"
            android:strokeAlpha="0.06"
            android:strokeWidth="1"
        android:pathData="M62,51.25a12,12,0,1,1-12-12,12,12,0,0,1,12,12" />
    <path
        android:pathData="M 0 0 H 64 V 64 H 0 V 0 Z" />
            android:pathData="@string/config_icon_mask" />
    </group>
    <group
        android:scaleX=".24"
        android:scaleY=".24"
        android:translateX="38"
        android:translateY="39.75">
        <path
            android:fillColor="#000000"
            android:fillAlpha="0.06"
            android:strokeAlpha="0.06"
            android:strokeWidth="1"
        android:pathData="M62,52.28A12,12,0,1,1,50.53,39.76,12,12,0,0,1,62,52.28" />
            android:pathData="@string/config_icon_mask" />
    </group>
    <group
        android:scaleX=".24"
        android:scaleY=".24"
        android:translateX="38"
        android:translateY="38.75">
        <path
            android:fillColor="#000000"
            android:fillAlpha="0.06"
            android:strokeAlpha="0.06"
            android:strokeWidth="1"
        android:pathData="M62,50.75a12,12,0,1,1-12-12,12,12,0,0,1,12,12" />
            android:pathData="@string/config_icon_mask" />
    </group>
    <group
        android:scaleX=".24"
        android:scaleY=".24"
        android:translateX="38"
        android:translateY="38.25">
        <path
            android:fillColor="#000000"
            android:fillAlpha="0.06"
            android:strokeAlpha="0.06"
            android:strokeWidth="1"
        android:pathData="M62,50.25a12,12,0,1,1-12-12,12,12,0,0,1,12,12" />
            android:pathData="@string/config_icon_mask" />
    </group>
</vector>
 No newline at end of file