Update monochrome theme icon notification dot color
Bug: 189498337 Test: Hard-coded the notification dots to be visible, and verified they were the correct color. Screenshot: https://screenshot.googleplex.com/AVbbW6P2bm6jYNS Change-Id: I38a78cda056273eb300d458e663f79ccdd28f36a
This commit is contained in:
@@ -55,7 +55,6 @@ import com.android.launcher3.accessibility.BaseAccessibilityDelegate;
|
||||
import com.android.launcher3.dot.DotInfo;
|
||||
import com.android.launcher3.dragndrop.DraggableView;
|
||||
import com.android.launcher3.folder.FolderIcon;
|
||||
import com.android.launcher3.graphics.IconPalette;
|
||||
import com.android.launcher3.graphics.IconShape;
|
||||
import com.android.launcher3.graphics.PreloadIconDrawable;
|
||||
import com.android.launcher3.icons.DotRenderer;
|
||||
@@ -378,8 +377,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
flags |= FLAG_NO_BADGE;
|
||||
}
|
||||
FastBitmapDrawable iconDrawable = info.newIcon(getContext(), flags);
|
||||
mDotParams.color = IconPalette.getMutedColor(iconDrawable.getIconColor(), 0.54f);
|
||||
|
||||
mDotParams.color = iconDrawable.getIconColor();
|
||||
setIcon(iconDrawable);
|
||||
applyLabel(info);
|
||||
}
|
||||
|
||||
@@ -16,18 +16,16 @@
|
||||
|
||||
package com.android.launcher3.graphics;
|
||||
|
||||
import static com.android.launcher3.icons.GraphicsUtils.setColorAlphaBound;
|
||||
|
||||
import android.app.Notification;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.core.graphics.ColorUtils;
|
||||
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.util.Themes;
|
||||
|
||||
import androidx.core.graphics.ColorUtils;
|
||||
|
||||
/**
|
||||
* Contains colors based on the dominant color of an icon.
|
||||
*/
|
||||
@@ -147,9 +145,4 @@ public class IconPalette {
|
||||
}
|
||||
return ColorUtils.LABToColor(low, a, b);
|
||||
}
|
||||
|
||||
public static int getMutedColor(int color, float whiteScrimAlpha) {
|
||||
int whiteScrim = setColorAlphaBound(Color.WHITE, (int) (255 * whiteScrimAlpha));
|
||||
return ColorUtils.compositeColors(whiteScrim, color);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user