resolve merge conflicts of 7092db024 to ub-launcher3-dorval-polish

Test: I solemnly swear I tested this conflict resolution.x
Change-Id: I0f9ed3d42fcb04299c3c23d06629f855614c0538
This commit is contained in:
Tony Wickham
2017-06-08 15:49:07 -07:00
7 changed files with 66 additions and 26 deletions

View File

@@ -100,7 +100,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver {
private BadgeInfo mBadgeInfo;
private BadgeRenderer mBadgeRenderer;
private IconPalette mIconPalette;
private IconPalette mBadgePalette;
private float mBadgeScale;
private boolean mForceHideBadge;
private Point mTempSpaceForBadgeOffset = new Point();
@@ -463,7 +463,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver {
final int scrollX = getScrollX();
final int scrollY = getScrollY();
canvas.translate(scrollX, scrollY);
mBadgeRenderer.draw(canvas, mBadgeInfo, mTempIconBounds, mBadgeScale,
mBadgeRenderer.draw(canvas, mBadgePalette, mBadgeInfo, mTempIconBounds, mBadgeScale,
mTempSpaceForBadgeOffset);
canvas.translate(-scrollX, -scrollY);
}
@@ -597,7 +597,10 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver {
float newBadgeScale = isBadged ? 1f : 0;
mBadgeRenderer = mLauncher.getDeviceProfile().mBadgeRenderer;
if (wasBadged || isBadged) {
mIconPalette = ((FastBitmapDrawable) mIcon).getIconPalette();
mBadgePalette = IconPalette.getBadgePalette(getResources());
if (mBadgePalette == null) {
mBadgePalette = ((FastBitmapDrawable) mIcon).getIconPalette();
}
// Animate when a badge is first added or when it is removed.
if (animate && (wasBadged ^ isBadged) && isShown()) {
ObjectAnimator.ofFloat(this, BADGE_SCALE_PROPERTY, newBadgeScale).start();
@@ -609,6 +612,10 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver {
}
}
public IconPalette getBadgePalette() {
return mBadgePalette;
}
/**
* Sets the icon for this view based on the layout direction.
*/