summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/util/LauncherIcons.java10
-rw-r--r--core/res/res/drawable/ic_corp_icon_badge_color.xml19
-rw-r--r--core/res/res/drawable/ic_corp_icon_badge_shadow.xml75
3 files changed, 65 insertions, 39 deletions
diff --git a/core/java/android/util/LauncherIcons.java b/core/java/android/util/LauncherIcons.java
index cc9991a9be20..8501eb5883d5 100644
--- a/core/java/android/util/LauncherIcons.java
+++ b/core/java/android/util/LauncherIcons.java
@@ -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
diff --git a/core/res/res/drawable/ic_corp_icon_badge_color.xml b/core/res/res/drawable/ic_corp_icon_badge_color.xml
index 6dba2779bc53..bb2d11753303 100644
--- a/core/res/res/drawable/ic_corp_icon_badge_color.xml
+++ b/core/res/res/drawable/ic_corp_icon_badge_color.xml
@@ -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> \ No newline at end of file
diff --git a/core/res/res/drawable/ic_corp_icon_badge_shadow.xml b/core/res/res/drawable/ic_corp_icon_badge_shadow.xml
index f33ed1f010be..cb29f6c39be4 100644
--- a/core/res/res/drawable/ic_corp_icon_badge_shadow.xml
+++ b/core/res/res/drawable/ic_corp_icon_badge_shadow.xml
@@ -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> \ No newline at end of file