diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2017-04-13 19:54:56 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-04-13 19:54:56 +0000 |
commit | 5474521b759cb2f78f8f44f7c057b2a7e730677c (patch) | |
tree | 46c192537b08cdb3e075fdc0fc3d14476e034407 /src | |
parent | 971ef4568d4381025c18ceeb193ad31ab38d0043 (diff) | |
parent | c66c3e2ba4876c9d383c1d7deddeee474f1c4859 (diff) | |
download | android_packages_apps_Trebuchet-5474521b759cb2f78f8f44f7c057b2a7e730677c.tar.gz android_packages_apps_Trebuchet-5474521b759cb2f78f8f44f7c057b2a7e730677c.tar.bz2 android_packages_apps_Trebuchet-5474521b759cb2f78f8f44f7c057b2a7e730677c.zip |
Merge "Fix build - move system shortcut icon colors to theme" into ub-launcher3-master
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/popup/PopupPopulator.java | 6 | ||||
-rw-r--r-- | src/com/android/launcher3/popup/SystemShortcut.java | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/com/android/launcher3/popup/PopupPopulator.java b/src/com/android/launcher3/popup/PopupPopulator.java index 112889474..3ba4ebafd 100644 --- a/src/com/android/launcher3/popup/PopupPopulator.java +++ b/src/com/android/launcher3/popup/PopupPopulator.java @@ -297,14 +297,12 @@ public class PopupPopulator { if (mSystemShortcutChild instanceof DeepShortcutView) { // Expanded system shortcut, with both icon and text shown on white background. final DeepShortcutView shortcutView = (DeepShortcutView) mSystemShortcutChild; - shortcutView.getIconView().setBackground(mSystemShortcutInfo.getIcon(context, - android.R.attr.textColorTertiary)); + shortcutView.getIconView().setBackground(mSystemShortcutInfo.getIcon(context)); shortcutView.getBubbleText().setText(mSystemShortcutInfo.getLabel(context)); } else if (mSystemShortcutChild instanceof ImageView) { // Only the system shortcut icon shows on a gray background header. final ImageView shortcutIcon = (ImageView) mSystemShortcutChild; - shortcutIcon.setImageDrawable(mSystemShortcutInfo.getIcon(context, - android.R.attr.textColorHint)); + shortcutIcon.setImageDrawable(mSystemShortcutInfo.getIcon(context)); shortcutIcon.setContentDescription(mSystemShortcutInfo.getLabel(context)); } if (!(mSystemShortcutInfo instanceof SystemShortcut.Widgets)) { diff --git a/src/com/android/launcher3/popup/SystemShortcut.java b/src/com/android/launcher3/popup/SystemShortcut.java index d08f876d7..889fc5278 100644 --- a/src/com/android/launcher3/popup/SystemShortcut.java +++ b/src/com/android/launcher3/popup/SystemShortcut.java @@ -30,10 +30,8 @@ public abstract class SystemShortcut { mLabelResId = labelResId; } - public Drawable getIcon(Context context, int colorAttr) { - Drawable icon = context.getResources().getDrawable(mIconResId); - icon.setTint(Themes.getAttrColor(context, colorAttr)); - return icon; + public Drawable getIcon(Context context) { + return context.getResources().getDrawable(mIconResId, context.getTheme()); } public String getLabel(Context context) { |