Home
last modified time | relevance | path

Searched refs:ContrastColorUtil (Results 1 – 25 of 31) sorted by relevance

12

/frameworks/base/core/tests/coretests/src/com/android/internal/util/
DContrastColorUtilTest.java56 int blueContrastColor = ContrastColorUtil.ensureTextContrast(Color.BLUE, darkBg, true); in testEnsureTextContrastAgainstDark()
59 int redContrastColor = ContrastColorUtil.ensureTextContrast(Color.RED, darkBg, true); in testEnsureTextContrastAgainstDark()
63 int greenContrastColor = ContrastColorUtil.ensureTextContrast(darkGreen, darkBg, true); in testEnsureTextContrastAgainstDark()
66 int grayContrastColor = ContrastColorUtil.ensureTextContrast(Color.DKGRAY, darkBg, true); in testEnsureTextContrastAgainstDark()
69 int selfContrastColor = ContrastColorUtil.ensureTextContrast(darkBg, darkBg, true); in testEnsureTextContrastAgainstDark()
79 int blueContrastColor = ContrastColorUtil.ensureTextContrast(lightBlue, lightBg, false); in testEnsureTextContrastAgainstLight()
82 int redContrastColor = ContrastColorUtil.ensureTextContrast(Color.RED, lightBg, false); in testEnsureTextContrastAgainstLight()
85 int greenContrastColor = ContrastColorUtil.ensureTextContrast(Color.GREEN, lightBg, false); in testEnsureTextContrastAgainstLight()
88 int grayContrastColor = ContrastColorUtil.ensureTextContrast(Color.LTGRAY, lightBg, false); in testEnsureTextContrastAgainstLight()
91 int selfContrastColor = ContrastColorUtil.ensureTextContrast(lightBg, lightBg, false); in testEnsureTextContrastAgainstLight()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/shared/
DSkeletonImageTransform.kt22 import com.android.internal.util.ContrastColorUtil
37 private val contrastColorUtil = ContrastColorUtil.getInstance(context)
/frameworks/base/core/java/com/android/internal/widget/
DColoredIconHelper.java26 import com.android.internal.util.ContrastColorUtil;
50 int grey = ContrastColorUtil.resolveColor(ctx, Notification.COLOR_DEFAULT, inNightMode); in applyGrayTint()
DPeopleHelper.java39 import com.android.internal.util.ContrastColorUtil;
135 double luminance = ContrastColorUtil.calculateLuminance(layoutColor); in findColor()
141 return ContrastColorUtil.getShiftedColor(layoutColor, in findColor()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/
DStatusBarIconViewBinder.kt20 import com.android.internal.util.ContrastColorUtil in <lambda>()
55 contrastColorUtil: ContrastColorUtil, in <lambda>()
DNotificationIconContainerViewBinder.kt30 import com.android.internal.util.ContrastColorUtil in <lambda>()
71 val contrastColorUtil = ContrastColorUtil.getInstance(view.context) in <lambda>()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/layout/
DLetterboxAppearanceCalculator.kt28 import com.android.internal.util.ContrastColorUtil in <lambda>()
194 ContrastColorUtil.calculateContrast(darkAppearanceIconColor, backgroundColor) in getOuterAppearance()
196 ContrastColorUtil.calculateContrast(lightAppearanceIconColor, backgroundColor) in getOuterAppearance()
/frameworks/base/core/java/com/android/internal/util/
DContrastColorUtil.java52 public class ContrastColorUtil { class
58 private static ContrastColorUtil sInstance;
66 public static ContrastColorUtil getInstance(Context context) { in getInstance()
69 sInstance = new ContrastColorUtil(context); in getInstance()
75 private ContrastColorUtil(Context context) { in ContrastColorUtil() method in ContrastColorUtil
333 newColors[i] = ContrastColorUtil.ensureLargeTextContrast( in ensureColorSpanContrast()
353 foregroundColor = ContrastColorUtil.ensureLargeTextContrast( in ensureColorSpanContrast()
583 return ContrastColorUtil.resolveContrastColor(context, notificationColor, in resolveContrastColor()
602 color = ContrastColorUtil.ensureTextContrast(color, backgroundColor, isDark); in resolveContrastColor()
610 ContrastColorUtil.contrastChange(resolvedColor, color, backgroundColor), in resolveContrastColor()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
DNotificationUtils.java25 import com.android.internal.util.ContrastColorUtil;
42 public static boolean isGrayscale(ImageView v, ContrastColorUtil colorUtil) { in isGrayscale()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/
DStackEducationView.kt27 import com.android.internal.util.ContrastColorUtil
115 textColor = ContrastColorUtil.ensureTextContrast(textColor, bgColor, true) in setTextColor()
DBubbleOverflowContainerView.java46 import com.android.internal.util.ContrastColorUtil;
325 textColor = ContrastColorUtil.ensureTextContrast(textColor, bgColor, true); in onCreateViewHolder()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DSmartReplyView.java34 import com.android.internal.util.ContrastColorUtil;
117 mMinStrokeContrast = ContrastColorUtil.calculateContrast(mDefaultStrokeColor, in SmartReplyView()
729 final boolean dark = ContrastColorUtil.isColorDark(backgroundColor); in setBackgroundTintColor()
731 mCurrentTextColor = ContrastColorUtil.ensureTextContrast( in setBackgroundTintColor()
734 mCurrentStrokeColor = colorized ? mCurrentTextColor : ContrastColorUtil.ensureContrast( in setBackgroundTintColor()
DRemoteInputView.java80 import com.android.internal.util.ContrastColorUtil;
215 final boolean dark = ContrastColorUtil.isColorDark(backgroundColor); in setBackgroundTintColor()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/
DNotificationViewWrapper.java39 import com.android.internal.util.ContrastColorUtil;
187 backgroundColor = ContrastColorUtil.compositeColors(backgroundColor, parentBackground); in childrenNeedInversion()
DNotificationTemplateViewWrapper.java43 import com.android.internal.util.ContrastColorUtil;
319 return ContrastColorUtil.compositeColors(Color.argb((int) (alpha * 255), in blendColorWithBackground()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DStatusBarIconView.java60 import com.android.internal.util.ContrastColorUtil;
750 if (!ContrastColorUtil.satisfiesTextContrast(mCachedContrastBackgroundColor, in updateContrastedStaticColor()
759 boolean isDark = !ContrastColorUtil.isColorLight(mCachedContrastBackgroundColor); in updateContrastedStaticColor()
760 contrastedColor = ContrastColorUtil.resolveContrastColor(mContext, in updateContrastedStaticColor()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/
DNotificationBackgroundView.java39 import com.android.internal.util.ContrastColorUtil;
256 ColorStateList newColor = ContrastColorUtil.isColorDark(mTintColor) in setStatefulColors()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/
DLightBarControllerTest.java45 import com.android.internal.util.ContrastColorUtil;
111 colors.setSupportsDarkText(!ContrastColorUtil.isColorDark(bgColor)); in makeColors()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/
DSplashscreenWindowCreator.java57 import com.android.internal.util.ContrastColorUtil;
215 ContrastColorUtil.isColorLight( in addSplashScreenStartingWindow()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/
DStatusBarIconViewTest.java60 import com.android.internal.util.ContrastColorUtil;
135 ContrastColorUtil.satisfiesTextContrast(Color.WHITE, color)); in testGetContrastedStaticDrawableColor()
/frameworks/base/core/java/android/app/
DNotification.java120 import com.android.internal.util.ContrastColorUtil;
4542 private ContrastColorUtil mColorUtil;
4650 private ContrastColorUtil getColorUtil() { in getColorUtil()
4652 mColorUtil = ContrastColorUtil.getInstance(mContext); in getColorUtil()
7178 ContrastColorUtil.resolveSecondaryColor( in generateActionButton()
7195 title = ContrastColorUtil.clearColorSpans(title); in generateActionButton()
7207 title = ContrastColorUtil.ensureColorSpanContrast(title, buttonFillColor); in generateActionButton()
7221 int textColor = ContrastColorUtil.resolvePrimaryColor(mContext, in generateActionButton()
7225 ContrastColorUtil.resolveSecondaryColor( in generateActionButton()
7345 return ContrastColorUtil.ensureColorSpanContrast(cs, buttonFillColor); in ensureColorSpanContrastOrStripStyling()
[all …]
DWallpaperColors.java41 import com.android.internal.util.ContrastColorUtil;
583 final boolean satisfiesTextContrast = ContrastColorUtil in calculateDarkHints()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/
DNotificationEntry.java61 import com.android.internal.util.ContrastColorUtil;
560 final int contrasted = ContrastColorUtil.resolveContrastColor(context, rawColor, in getContrastedColor()
/frameworks/base/core/tests/coretests/src/android/app/
DNotificationTest.java107 import com.android.internal.util.ContrastColorUtil;
918 assertThat(ContrastColorUtil.calculateLuminance(result)) in testBuilder_ensureButtonFillContrast_adjustsDarker()
919 .isLessThan(ContrastColorUtil.calculateLuminance(background)); in testBuilder_ensureButtonFillContrast_adjustsDarker()
928 assertThat(ContrastColorUtil.calculateLuminance(result)) in testBuilder_ensureButtonFillContrast_adjustsLighter()
929 .isGreaterThan(ContrastColorUtil.calculateLuminance(background)); in testBuilder_ensureButtonFillContrast_adjustsLighter()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DScrimController.java50 import com.android.internal.util.ContrastColorUtil;
1628 final boolean isBackgroundLight = !ContrastColorUtil.isColorDark(background); in updateThemeColors()

12