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

This commit is contained in:
Hyunyoung Song
2019-05-08 05:10:00 +00:00
committed by Android (Google) Code Review
3 changed files with 65 additions and 39 deletions

View File

@@ -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

View File

@@ -19,12 +19,15 @@ Copyright (C) 2016 The Android Open Source Project
android:height="64dp"
android:viewportWidth="64"
android:viewportHeight="64">
<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" />
<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="@string/config_icon_mask" />
</group>
</vector>

View File

@@ -19,31 +19,52 @@ Copyright (C) 2016 The Android Open Source Project
android:height="64dp"
android:viewportWidth="64"
android:viewportHeight="64">
<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" />
<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" />
<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" />
<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" />
<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="@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="@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="@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="@string/config_icon_mask" />
</group>
</vector>