/aosp12/packages/apps/Car/Notification/src/com/android/car/notification/ |
H A D | NotificationUtils.java | 148 @ColorInt int notificationColor, @ColorInt int backgroundColor) { in resolveContrastColor() argument 149 return getContrastedForegroundColor(notificationColor, backgroundColor, MIN_CONTRAST_RATIO); in resolveContrastColor() 155 public static boolean isColorLight(int backgroundColor) { in isColorLight() argument 156 return Color.luminance(backgroundColor) > LIGHT_COLOR_LUMINANCE_THRESHOLD; in isColorLight() 198 @ColorInt int foregroundColor, @ColorInt int backgroundColor, double minContrastRatio) { in findContrastColorAgainstLightBackground() argument 199 if (ColorUtils.calculateContrast(foregroundColor, backgroundColor) >= minContrastRatio) { in findContrastColorAgainstLightBackground() 234 if (ColorUtils.calculateContrast(foregroundColor, backgroundColor) >= minContrastRatio) { in findContrastColorAgainstDarkBackground() 247 if (ColorUtils.calculateContrast(foregroundColor, backgroundColor) in findContrastColorAgainstDarkBackground() 268 Color.luminance(foregroundColor) > Color.luminance(backgroundColor); in getContrastedForegroundColor() 271 foregroundColor, backgroundColor, minContrastRatio) in getContrastedForegroundColor() [all …]
|
/aosp12/frameworks/base/core/java/android/view/ |
H A D | TaskTransitionSpec.java | 37 public final int backgroundColor; field in TaskTransitionSpec 52 int backgroundColor, Set<Integer> animationBoundInsets) { in TaskTransitionSpec() argument 53 this.backgroundColor = backgroundColor; in TaskTransitionSpec() 58 this.backgroundColor = in.readInt(); in TaskTransitionSpec() 74 dest.writeInt(backgroundColor); in writeToParcel()
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/ |
H A D | NotificationViewWrapper.java | 114 int backgroundColor = getBackgroundColor(mView); in onReinflated() local 115 if (backgroundColor != Color.TRANSPARENT) { in onReinflated() 116 mBackgroundColor = backgroundColor; in onReinflated() 174 int backgroundColor = getBackgroundColor(viewGroup); in childrenNeedInversion() local 175 if (Color.alpha(backgroundColor) != 255) { in childrenNeedInversion() 176 backgroundColor = ContrastColorUtil.compositeColors(backgroundColor, parentBackground); in childrenNeedInversion() 177 backgroundColor = ColorUtils.setAlphaComponent(backgroundColor, 255); in childrenNeedInversion() 183 if (ColorUtils.calculateContrast(foreground, backgroundColor) < 3) { in childrenNeedInversion() 187 if (childrenNeedInversion(backgroundColor, (ViewGroup) child)) { in childrenNeedInversion()
|
/aosp12/frameworks/native/libs/renderengine/tests/ |
H A D | RenderEngineTest.cpp | 372 expectBufferColor(backgroundRegion, backgroundColor.r, backgroundColor.g, backgroundColor.b, in expectShadowColor() 373 backgroundColor.a); in expectShadowColor() 392 expectBufferColor(backgroundRegion, backgroundColor.r, backgroundColor.g, backgroundColor.b, in expectShadowColorWithoutCaster() 393 backgroundColor.a); in expectShadowColorWithoutCaster() 1235 ColorSourceVariant::fillColor(bgLayer, backgroundColor.r / 255.0f, backgroundColor.g / 255.0f, in drawShadow() 1272 ColorSourceVariant::fillColor(bgLayer, backgroundColor.r / 255.0f, backgroundColor.g / 255.0f, in drawShadowWithoutCaster() 1315 bgLayer.source.solidColor = half3(backgroundColor.r / 255.0f, backgroundColor.g / 255.0f, in TEST_P() 1327 expectBufferColor(Rect(0, 0, 10, 10), 0.f, backgroundColor.g, backgroundColor.b, in TEST_P() 1328 backgroundColor.a); in TEST_P() 1775 expectBufferColor(backgroundRegion, backgroundColor.r, backgroundColor.g, backgroundColor.b, in TEST_P() [all …]
|
/aosp12/frameworks/base/core/java/com/android/internal/util/ |
H A D | ContrastColorUtil.java | 338 int bg = backgroundColor; in findAlphaToMeetContrast() 476 int backgroundColor) { in resolveContrastColor() argument 478 backgroundColor, false /* isDark */); in resolveContrastColor() 492 int backgroundColor, boolean isDark) { in resolveContrastColor() argument 526 public static int resolvePrimaryColor(Context context, int backgroundColor, in resolvePrimaryColor() argument 550 public static int resolveDefaultColor(Context context, int backgroundColor, in resolveDefaultColor() argument 596 if (backgroundColor == Notification.COLOR_DEFAULT) { in shouldUseDark() 604 public static double calculateLuminance(int backgroundColor) { in calculateLuminance() argument 605 return ColorUtilsFromCompat.calculateLuminance(backgroundColor); in calculateLuminance() 624 public static boolean isColorLight(int backgroundColor) { in isColorLight() argument [all …]
|
/aosp12/frameworks/base/core/java/android/view/accessibility/ |
H A D | CaptioningManager.java | 318 public final int backgroundColor; field in CaptioningManager.CaptionStyle 356 private CaptionStyle(int foregroundColor, int backgroundColor, int edgeType, int edgeColor, in CaptionStyle() argument 359 mHasBackgroundColor = hasColor(backgroundColor); in CaptionStyle() 367 this.backgroundColor = mHasBackgroundColor ? backgroundColor : Color.BLACK; in CaptionStyle() 402 overlay.backgroundColor : backgroundColor; in applyStyle() 480 final int backgroundColor = Secure.getInt( in getCustomStyle() local 481 cr, Secure.ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR, defStyle.backgroundColor); in getCustomStyle() 494 return new CaptionStyle(foregroundColor, backgroundColor, edgeType, edgeColor, in getCustomStyle()
|
/aosp12/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/ |
H A D | GlifLayout.java | 127 ColorStateList backgroundColor = in init() local 129 setBackgroundBaseColor(backgroundColor); in init() 289 int backgroundColor = 0; in updateBackground() local 291 backgroundColor = backgroundBaseColor.getDefaultColor(); in updateBackground() 293 backgroundColor = primaryColor.getDefaultColor(); in updateBackground() 297 ? new GlifPatternDrawable(backgroundColor) in updateBackground() 298 : new ColorDrawable(backgroundColor); in updateBackground()
|
/aosp12/frameworks/av/media/libstagefright/renderfright/tests/ |
H A D | RenderEngineTest.cpp | 226 expectBufferColor(backgroundRegion, backgroundColor.r, backgroundColor.g, backgroundColor.b, in expectShadowColor() 227 backgroundColor.a); in expectShadowColor() 363 const ubyte4& backgroundColor); 960 ColorSourceVariant::fillColor(bgLayer, backgroundColor.r / 255.0f, backgroundColor.g / 255.0f, in drawShadow() 962 bgLayer.alpha = backgroundColor.a / 255.0f; in drawShadow() 1310 const ubyte4 backgroundColor(255, 255, 255, 255); in TEST_F() local 1327 const ubyte4 backgroundColor(255, 255, 255, 255); in TEST_F() local 1344 const ubyte4 backgroundColor(255, 255, 255, 255); in TEST_F() local 1362 const ubyte4 backgroundColor(255, 255, 255, 255); in TEST_F() local 1401 expectBufferColor(backgroundRegion, backgroundColor.r, backgroundColor.g, backgroundColor.b, in TEST_F() [all …]
|
/aosp12/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/ |
H A D | SplashscreenIconDrawableFactory.java | 61 static Drawable[] makeIconDrawable(@ColorInt int backgroundColor, @ColorInt int themeColor, in makeIconDrawable() argument 67 backgroundColor != Color.TRANSPARENT && backgroundColor != themeColor; in makeIconDrawable() 85 background = new MaskBackgroundDrawable(backgroundColor); in makeIconDrawable() 169 public MaskBackgroundDrawable(@ColorInt int backgroundColor) { in MaskBackgroundDrawable() argument 175 if (backgroundColor != Color.TRANSPARENT) { in MaskBackgroundDrawable() 178 mBackgroundPaint.setColor(backgroundColor); in MaskBackgroundDrawable()
|
/aosp12/packages/apps/TV/tuner/src/com/android/tv/tuner/data/ |
H A D | Cea708Data.java | 215 public final CaptionColor backgroundColor; field in Cea708Data.CaptionPenColor 220 CaptionColor backgroundColor, in CaptionPenColor() argument 223 this.backgroundColor = backgroundColor; in CaptionPenColor()
|
/aosp12/frameworks/base/core/java/android/util/ |
H A D | LauncherIcons.java | 101 public Drawable getBadgeDrawable(int foregroundRes, int backgroundColor) { in getBadgeDrawable() argument 102 return getBadgedDrawable(null, foregroundRes, backgroundColor); in getBadgeDrawable() 105 public Drawable getBadgedDrawable(Drawable base, int foregroundRes, int backgroundColor) { in getBadgedDrawable() argument 119 badgeForeground.setTint(backgroundColor); in getBadgedDrawable()
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/media/ |
H A D | IlluminationDrawable.kt | 67 private var backgroundColor = Color.TRANSPARENT regex 164 ColorUtils.colorToHSL(backgroundColor, tmpHsl) 182 paint.color = blendARGB(initialBackground, backgroundColor, progress) 198 backgroundColor = tint!!.defaultColor
|
/aosp12/frameworks/base/core/java/android/text/style/ |
H A D | SuggestionRangeSpan.java | 71 public void setBackgroundColor(int backgroundColor) { in setBackgroundColor() argument 72 mBackgroundColor = backgroundColor; in setBackgroundColor()
|
/aosp12/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/emoji/ |
H A D | EmojiCategoryPageIndicatorView.java | 41 public void setColors(final int foregroundColor, final int backgroundColor) { in setColors() argument 43 setBackgroundColor(backgroundColor); in setColors()
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/ |
H A D | DualToneHandler.kt | 57 Utils.getColorAttrDefaultColor(dualToneDarkTheme, R.attr.backgroundColor), 61 Utils.getColorAttrDefaultColor(dualToneLightTheme, R.attr.backgroundColor),
|
/aosp12/packages/apps/Contacts/src/com/android/contacts/list/ |
H A D | ContactListPinnedHeaderView.java | 42 int backgroundColor = a.getColor( in ContactListPinnedHeaderView() local 53 setBackgroundColor(backgroundColor); in ContactListPinnedHeaderView()
|
/aosp12/packages/apps/Messaging/src/com/android/messaging/datamodel/media/ |
H A D | ImageRequest.java | 226 final int backgroundColor = mDescriptor.circleBackgroundColor; in postProcessOnBitmapResourceLoaded() local 229 dest, null, backgroundColor == 0 ? false : true /* fillBackground */, in postProcessOnBitmapResourceLoaded() 230 backgroundColor, strokeColor); in postProcessOnBitmapResourceLoaded()
|
/aosp12/packages/apps/Messaging/src/com/android/messaging/ui/ |
H A D | ViewPagerTabStrip.java | 49 int backgroundColor = res.getColor(R.color.action_bar_background_color); in ViewPagerTabStrip() local 54 setBackgroundColor(backgroundColor); in ViewPagerTabStrip()
|
/aosp12/packages/apps/Dialer/java/com/android/contacts/common/list/ |
H A D | ViewPagerTabStrip.java | 47 int backgroundColor = ThemeComponent.get(context).theme().getColorPrimary(); in ViewPagerTabStrip() local 52 setBackgroundColor(backgroundColor); in ViewPagerTabStrip()
|
/aosp12/frameworks/base/apct-tests/perftests/core/src/android/graphics/perftests/ |
H A D | VectorDrawablePerfTest.java | 78 int backgroundColor = bmp.getPixel(w / 4, h / 2); in testBitmapDrawPerf() local 81 assertTrue("The background should be white", backgroundColor == Color.WHITE); in testBitmapDrawPerf()
|
/aosp12/packages/apps/TvSettings/Settings/src/com/android/tv/settings/dialog/old/ |
H A D | BaseContentFragment.java | 54 int backgroundColor) { in buildArgs() argument 56 backgroundColor); in buildArgs() 60 int backgroundColor) { in buildArgs() argument 61 return buildArgs(title, breadcrumb, description, 0, iconUri, null, backgroundColor); in buildArgs()
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/globalactions/ |
H A D | GlobalActionsLayout.java | 65 protected HardwareBgDrawable getBackgroundDrawable(int backgroundColor) { in getBackgroundDrawable() argument 67 background.setTint(backgroundColor); in getBackgroundDrawable()
|
/aosp12/packages/apps/Launcher3/src/com/android/launcher3/popup/ |
H A D | ArrowPopup.java | 238 protected void assignMarginsAndBackgrounds(ViewGroup viewGroup, int backgroundColor) { in assignMarginsAndBackgrounds() argument 240 if (backgroundColor == Color.TRANSPARENT) { in assignMarginsAndBackgrounds() 271 backgroundColor = colors[numVisibleChild % colors.length]; in assignMarginsAndBackgrounds() 277 mArrowColor = backgroundColor; in assignMarginsAndBackgrounds() 279 mArrowColor = backgroundColor; in assignMarginsAndBackgrounds() 284 assignMarginsAndBackgrounds((ViewGroup) view, backgroundColor); in assignMarginsAndBackgrounds() 305 setChildColor(view, backgroundColor, colorAnimator); in assignMarginsAndBackgrounds()
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
H A D | SmartReplyView.java | 707 public void setBackgroundTintColor(int backgroundColor, boolean colorized) { in setBackgroundTintColor() argument 708 if (backgroundColor == mCurrentBackgroundColor && colorized == mCurrentColorized) { in setBackgroundTintColor() 712 mCurrentBackgroundColor = backgroundColor; in setBackgroundTintColor() 715 final boolean dark = Notification.Builder.isColorDark(backgroundColor); in setBackgroundTintColor() 719 backgroundColor | 0xff000000, dark); in setBackgroundTintColor() 721 mDefaultStrokeColor, backgroundColor | 0xff000000, dark, mMinStrokeContrast); in setBackgroundTintColor()
|
/aosp12/frameworks/opt/bitmap/src/com/android/bitmap/drawable/ |
H A D | ExtendedBitmapDrawable.java | 739 public int backgroundColor = 0; field in ExtendedBitmapDrawable.ExtendedOptions 813 if (backgroundColor == 0 in validate() 824 if (backgroundColor != 0 && Color.alpha(backgroundColor) != 255) { in validate()
|