/aosp14/frameworks/base/core/tests/coretests/src/com/android/internal/util/ |
H A D | ContrastColorUtilTest.java | 56 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() 78 int blueContrastColor = ContrastColorUtil.ensureTextContrast(lightBlue, lightBg, false); in testEnsureTextContrastAgainstLight() 81 int redContrastColor = ContrastColorUtil.ensureTextContrast(Color.RED, lightBg, false); in testEnsureTextContrastAgainstLight() 84 int greenContrastColor = ContrastColorUtil.ensureTextContrast(Color.GREEN, lightBg, false); in testEnsureTextContrastAgainstLight() 87 int grayContrastColor = ContrastColorUtil.ensureTextContrast(Color.LTGRAY, lightBg, false); in testEnsureTextContrastAgainstLight() 90 int selfContrastColor = ContrastColorUtil.ensureTextContrast(lightBg, lightBg, false); in testEnsureTextContrastAgainstLight() [all …]
|
/aosp14/frameworks/base/core/java/com/android/internal/widget/ |
H A D | ColoredIconHelper.java | 26 import com.android.internal.util.ContrastColorUtil; 50 int grey = ContrastColorUtil.resolveColor(ctx, Notification.COLOR_DEFAULT, inNightMode); in applyGrayTint()
|
H A D | PeopleHelper.java | 37 import com.android.internal.util.ContrastColorUtil; 133 double luminance = ContrastColorUtil.calculateLuminance(layoutColor); in findColor() 139 return ContrastColorUtil.getShiftedColor(layoutColor, in findColor()
|
H A D | MessagingLayout.java | 49 import com.android.internal.util.ContrastColorUtil; 365 double luminance = ContrastColorUtil.calculateLuminance(layoutColor); in findColor() 371 return ContrastColorUtil.getShiftedColor(layoutColor, in findColor()
|
/aosp14/frameworks/base/core/java/com/android/internal/util/ |
H A D | ContrastColorUtil.java | 53 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 …]
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/ |
H A D | NotificationUtils.java | 25 import com.android.internal.util.ContrastColorUtil; 40 public static boolean isGrayscale(ImageView v, ContrastColorUtil colorUtil) { in isGrayscale()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
H A D | LetterboxAppearanceCalculator.kt | 27 import com.android.internal.util.ContrastColorUtil 175 ContrastColorUtil.calculateContrast( 178 ContrastColorUtil.calculateContrast(
|
H A D | LegacyNotificationIconAreaControllerImpl.java | 35 import com.android.internal.util.ContrastColorUtil; 86 private final ContrastColorUtil mContrastColorUtil; 145 mContrastColorUtil = ContrastColorUtil.getInstance(context); in LegacyNotificationIconAreaControllerImpl()
|
H A D | ScrimController.java | 45 import com.android.internal.util.ContrastColorUtil; 1498 final boolean isBackgroundLight = !ContrastColorUtil.isColorDark(background); in updateThemeColors()
|
/aosp14/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/ |
H A D | StackEducationView.kt | 28 import com.android.internal.util.ContrastColorUtil 109 textColor = ContrastColorUtil.ensureTextContrast(textColor, bgColor, true)
|
H A D | BubbleOverflowContainerView.java | 46 import com.android.internal.util.ContrastColorUtil; 227 textColor = ContrastColorUtil.ensureTextContrast(textColor, bgColor, isNightMode); in updateTheme() 317 textColor = ContrastColorUtil.ensureTextContrast(textColor, bgColor, true); in onCreateViewHolder()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
H A D | SmartReplyView.java | 34 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()
|
H A D | RemoteInputView.java | 82 import com.android.internal.util.ContrastColorUtil; 225 final boolean dark = ContrastColorUtil.isColorDark(backgroundColor); in setBackgroundTintColor()
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ |
H A D | LightBarControllerTest.java | 43 import com.android.internal.util.ContrastColorUtil; 91 colors.setSupportsDarkText(!ContrastColorUtil.isColorDark(bgColor)); in makeColors()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/ |
H A D | NotificationViewWrapper.java | 39 import com.android.internal.util.ContrastColorUtil; 174 backgroundColor = ContrastColorUtil.compositeColors(backgroundColor, parentBackground); in childrenNeedInversion()
|
H A D | NotificationTemplateViewWrapper.java | 39 import com.android.internal.util.ContrastColorUtil; 230 return ContrastColorUtil.compositeColors(Color.argb((int) (alpha * 255), in blendColorWithBackground()
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/ |
H A D | StatusBarIconViewTest.java | 54 import com.android.internal.util.ContrastColorUtil; 127 ContrastColorUtil.satisfiesTextContrast(Color.WHITE, color)); in testGetContrastedStaticDrawableColor()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/ |
H A D | NotificationIconAreaControllerViewBinderWrapperImpl.kt | 31 import com.android.internal.util.ContrastColorUtil 104 private val contrastColorUtil: ContrastColorUtil = ContrastColorUtil.getInstance(context)
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
H A D | StatusBarIconView.java | 59 import com.android.internal.util.ContrastColorUtil; 811 if (!ContrastColorUtil.satisfiesTextContrast(mCachedContrastBackgroundColor, in updateContrastedStaticColor() 820 boolean isDark = !ContrastColorUtil.isColorLight(mCachedContrastBackgroundColor); in updateContrastedStaticColor() 821 contrastedColor = ContrastColorUtil.resolveContrastColor(mContext, in updateContrastedStaticColor()
|
/aosp14/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/ |
H A D | SplashscreenWindowCreator.java | 59 import com.android.internal.util.ContrastColorUtil; 218 ContrastColorUtil.isColorLight( in addSplashScreenStartingWindow()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ |
H A D | HybridNotificationView.java | 31 import com.android.internal.util.ContrastColorUtil;
|
/aosp14/frameworks/base/core/java/android/app/ |
H A D | Notification.java | 107 import com.android.internal.util.ContrastColorUtil; 3918 private ContrastColorUtil mColorUtil; 4026 private ContrastColorUtil getColorUtil() { in getColorUtil() 4028 mColorUtil = ContrastColorUtil.getInstance(mContext); in getColorUtil() 6297 ContrastColorUtil.resolveSecondaryColor( in generateActionButton() 6302 title = ContrastColorUtil.clearColorSpans(title); in generateActionButton() 6320 ContrastColorUtil.resolveSecondaryColor( in generateActionButton() 12785 mPrimaryTextColor = ContrastColorUtil.findAlphaToMeetContrast( in resolvePalette() 12826 mPrimaryTextColor = ContrastColorUtil.resolvePrimaryColor( in resolvePalette() 12844 ContrastColorUtil.resolvePrimaryColor( in resolvePalette() [all …]
|
H A D | WallpaperColors.java | 41 import com.android.internal.util.ContrastColorUtil; 583 final boolean satisfiesTextContrast = ContrastColorUtil in calculateDarkHints()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/ |
H A D | NotificationEntry.java | 60 import com.android.internal.util.ContrastColorUtil; 522 final int contrasted = ContrastColorUtil.resolveContrastColor(context, rawColor, in getContrastedColor()
|
/aosp14/frameworks/base/core/tests/coretests/src/android/app/ |
H A D | NotificationTest.java | 97 import com.android.internal.util.ContrastColorUtil; 499 assertThat(ContrastColorUtil.calculateLuminance(result)) in testBuilder_ensureButtonFillContrast_adjustsDarker() 500 .isLessThan(ContrastColorUtil.calculateLuminance(background)); in testBuilder_ensureButtonFillContrast_adjustsDarker() 509 assertThat(ContrastColorUtil.calculateLuminance(result)) in testBuilder_ensureButtonFillContrast_adjustsLighter() 510 .isGreaterThan(ContrastColorUtil.calculateLuminance(background)); in testBuilder_ensureButtonFillContrast_adjustsLighter()
|