Merge "Add themed work badge for themed icons in dragview or floatingiconview" into udc-qpr-dev

This commit is contained in:
Treehugger Robot
2023-06-27 16:42:25 +00:00
committed by Android (Google) Code Review
3 changed files with 14 additions and 9 deletions

View File

@@ -289,12 +289,14 @@ public class FloatingIconView extends FrameLayout implements
int width = (int) pos.width();
int height = (int) pos.height();
Object[] tmpObjArray = new Object[1];
boolean[] outIsIconThemed = new boolean[1];
if (supportsAdaptiveIcons) {
boolean shouldThemeIcon = btvIcon instanceof FastBitmapDrawable
&& ((FastBitmapDrawable) btvIcon).isThemed();
drawable = getFullDrawable(l, info, width, height, shouldThemeIcon, tmpObjArray);
drawable = getFullDrawable(
l, info, width, height, shouldThemeIcon, tmpObjArray, outIsIconThemed);
if (drawable instanceof AdaptiveIconDrawable) {
badge = getBadge(l, info, tmpObjArray[0]);
badge = getBadge(l, info, tmpObjArray[0], outIsIconThemed[0]);
} else {
// The drawable we get back is not an adaptive icon, so we need to use the
// BubbleTextView icon that is already legacy treated.
@@ -306,7 +308,7 @@ public class FloatingIconView extends FrameLayout implements
drawable = btvIcon;
} else {
drawable = getFullDrawable(l, info, width, height, true /* shouldThemeIcon */,
tmpObjArray);
tmpObjArray, outIsIconThemed);
}
}
}