Loading core/java/android/util/LauncherIcons.java +6 −4 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package android.util; import android.app.ActivityThread; import android.content.Context; import android.content.res.Resources; import android.graphics.Bitmap; Loading Loading @@ -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 Loading core/res/res/drawable/ic_corp_icon_badge_color.xml +11 −8 Original line number Diff line number Diff line Loading @@ -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 core/res/res/drawable/ic_corp_icon_badge_shadow.xml +48 −27 Original line number Diff line number Diff line Loading @@ -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 Loading
core/java/android/util/LauncherIcons.java +6 −4 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package android.util; import android.app.ActivityThread; import android.content.Context; import android.content.res.Resources; import android.graphics.Bitmap; Loading Loading @@ -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 Loading
core/res/res/drawable/ic_corp_icon_badge_color.xml +11 −8 Original line number Diff line number Diff line Loading @@ -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
core/res/res/drawable/ic_corp_icon_badge_shadow.xml +48 −27 Original line number Diff line number Diff line Loading @@ -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