Home
last modified time | relevance | path

Searched refs:ContrastColorUtil (Results 1 – 25 of 32) 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/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()
DMessagingLayout.java49 import com.android.internal.util.ContrastColorUtil;
402 double luminance = ContrastColorUtil.calculateLuminance(layoutColor); in findColor()
408 return ContrastColorUtil.getShiftedColor(layoutColor, in findColor()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/
DStatusBarIconViewBinder.kt22 import com.android.internal.util.ContrastColorUtil in <lambda>()
59 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/phone/
DLetterboxAppearanceCalculator.kt28 import com.android.internal.util.ContrastColorUtil in <lambda>()
185 ContrastColorUtil.calculateContrast(darkAppearanceIconColor, backgroundColor) in getOuterAppearance()
187 ContrastColorUtil.calculateContrast(lightAppearanceIconColor, backgroundColor) in getOuterAppearance()
DLegacyNotificationIconAreaControllerImpl.java37 import com.android.internal.util.ContrastColorUtil;
86 private final ContrastColorUtil mContrastColorUtil;
142 mContrastColorUtil = ContrastColorUtil.getInstance(context); in LegacyNotificationIconAreaControllerImpl()
/frameworks/base/core/java/com/android/internal/util/
DContrastColorUtil.java53 public class ContrastColorUtil { class
59 private static ContrastColorUtil sInstance;
67 public static ContrastColorUtil getInstance(Context context) { in getInstance()
70 sInstance = new ContrastColorUtil(context); in getInstance()
76 private ContrastColorUtil(Context context) { in ContrastColorUtil() method in ContrastColorUtil
322 newColors[i] = ContrastColorUtil.ensureLargeTextContrast( in ensureColorSpanContrast()
342 foregroundColor = ContrastColorUtil.ensureLargeTextContrast( in ensureColorSpanContrast()
565 return ContrastColorUtil.resolveContrastColor(context, notificationColor, in resolveContrastColor()
584 color = ContrastColorUtil.ensureTextContrast(color, backgroundColor, isDark); in resolveContrastColor()
592 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;
40 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
111 textColor = ContrastColorUtil.ensureTextContrast(textColor, bgColor, true) in setTextColor()
DBubbleOverflowContainerView.java46 import com.android.internal.util.ContrastColorUtil;
234 textColor = ContrastColorUtil.ensureTextContrast(textColor, bgColor, isNightMode); in updateTheme()
322 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.java81 import com.android.internal.util.ContrastColorUtil;
218 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;
179 backgroundColor = ContrastColorUtil.compositeColors(backgroundColor, parentBackground); in childrenNeedInversion()
DNotificationTemplateViewWrapper.java41 import com.android.internal.util.ContrastColorUtil;
262 return ContrastColorUtil.compositeColors(Color.argb((int) (alpha * 255), in blendColorWithBackground()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/
DNotificationBackgroundView.java35 import com.android.internal.util.ContrastColorUtil;
144 ColorStateList newColor = ContrastColorUtil.isColorDark(mTintColor) in setStatefulColors()
/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/tests/src/com/android/systemui/statusbar/
DStatusBarIconViewTest.java54 import com.android.internal.util.ContrastColorUtil;
129 ContrastColorUtil.satisfiesTextContrast(Color.WHITE, color)); in testGetContrastedStaticDrawableColor()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DStatusBarIconView.java61 import com.android.internal.util.ContrastColorUtil;
830 if (!ContrastColorUtil.satisfiesTextContrast(mCachedContrastBackgroundColor, in updateContrastedStaticColor()
839 boolean isDark = !ContrastColorUtil.isColorLight(mCachedContrastBackgroundColor); in updateContrastedStaticColor()
840 contrastedColor = ContrastColorUtil.resolveContrastColor(mContext, in updateContrastedStaticColor()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/
DLightBarControllerTest.java45 import com.android.internal.util.ContrastColorUtil;
111 colors.setSupportsDarkText(!ContrastColorUtil.isColorDark(bgColor)); in makeColors()
/frameworks/base/core/java/android/app/
DNotification.java116 import com.android.internal.util.ContrastColorUtil;
4372 private ContrastColorUtil mColorUtil;
4480 private ContrastColorUtil getColorUtil() { in getColorUtil()
4482 mColorUtil = ContrastColorUtil.getInstance(mContext); in getColorUtil()
6874 ContrastColorUtil.resolveSecondaryColor( in generateActionButton()
6891 title = ContrastColorUtil.clearColorSpans(title); in generateActionButton()
6903 title = ContrastColorUtil.ensureColorSpanContrast(title, buttonFillColor); in generateActionButton()
6917 int textColor = ContrastColorUtil.resolvePrimaryColor(mContext, in generateActionButton()
6921 ContrastColorUtil.resolveSecondaryColor( in generateActionButton()
7039 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.java59 import com.android.internal.util.ContrastColorUtil;
540 final int contrasted = ContrastColorUtil.resolveContrastColor(context, rawColor, in getContrastedColor()
/frameworks/base/core/tests/coretests/src/android/app/
DNotificationTest.java104 import com.android.internal.util.ContrastColorUtil;
513 assertThat(ContrastColorUtil.calculateLuminance(result)) in testBuilder_ensureButtonFillContrast_adjustsDarker()
514 .isLessThan(ContrastColorUtil.calculateLuminance(background)); in testBuilder_ensureButtonFillContrast_adjustsDarker()
523 assertThat(ContrastColorUtil.calculateLuminance(result)) in testBuilder_ensureButtonFillContrast_adjustsLighter()
524 .isGreaterThan(ContrastColorUtil.calculateLuminance(background)); in testBuilder_ensureButtonFillContrast_adjustsLighter()

12