/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/impl/ |
D | ResourceHelperTest.java | 34 assertNumberFormatException(() -> ResourceHelper.getColor("")); in testGetColor() 35 assertNumberFormatException(() -> ResourceHelper.getColor("AFAFAF")); in testGetColor() 36 assertNumberFormatException(() -> ResourceHelper.getColor("AAA")); in testGetColor() 37 assertNumberFormatException(() -> ResourceHelper.getColor("#JFAFAF")); in testGetColor() 38 assertNumberFormatException(() -> ResourceHelper.getColor("#AABBCCDDEE")); in testGetColor() 39 assertNumberFormatException(() -> ResourceHelper.getColor("#JAAA")); in testGetColor() 40 assertNumberFormatException(() -> ResourceHelper.getColor("#AA BBCC")); in testGetColor() 42 assertEquals(0xffaaaaaa, ResourceHelper.getColor("#AAA")); in testGetColor() 43 assertEquals(0xffaaaaaa, ResourceHelper.getColor(" #AAA")); in testGetColor() 44 assertEquals(0xffaaaaaa, ResourceHelper.getColor("#AAA ")); in testGetColor() [all …]
|
/frameworks/base/core/tests/coretests/src/android/graphics/ |
D | ColorStateListTest.java | 40 mFailureColor = mResources.getColor(R.color.failColor); in setUp() 48 assertEquals(mResources.getColor(R.color.testcolor1), focusColor); in testStateIsInList() 56 assertEquals(mResources.getColor(R.color.testcolor2), defaultColor); in testEmptyState() 61 int defaultColor = mResources.getColor(R.color.color1); in testGetColor() 62 assertEquals(mResources.getColor(R.color.testcolor2), defaultColor); in testGetColor() 67 int defaultColor = mResources.getColor(R.color.color_no_default); in testGetColorWhenListHasNoDefault() 68 assertEquals(mResources.getColor(R.color.testcolor1), defaultColor); in testGetColorWhenListHasNoDefault()
|
/frameworks/base/libs/hwui/tests/unit/ |
D | SkiaPipelineTests.cpp | 56 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorBLUE); in RENDERTHREAD_SKIA_PIPELINE_TEST() 59 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorRED); in RENDERTHREAD_SKIA_PIPELINE_TEST() 87 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorBLUE); in RENDERTHREAD_SKIA_PIPELINE_TEST() 92 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorRED); in RENDERTHREAD_SKIA_PIPELINE_TEST() 111 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorBLUE); in RENDERTHREAD_SKIA_PIPELINE_TEST() 114 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorBLUE); in RENDERTHREAD_SKIA_PIPELINE_TEST() 115 ASSERT_EQ(TestUtils::getColor(surface, 0, 1), SK_ColorGREEN); in RENDERTHREAD_SKIA_PIPELINE_TEST() 118 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), (unsigned int)SK_ColorTRANSPARENT); in RENDERTHREAD_SKIA_PIPELINE_TEST() 119 ASSERT_EQ(TestUtils::getColor(surface, 0, 1), SK_ColorGREEN); in RENDERTHREAD_SKIA_PIPELINE_TEST() 135 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorBLUE); in RENDERTHREAD_SKIA_PIPELINE_TEST() [all …]
|
D | RenderNodeDrawableTests.cpp | 96 int expectedOrder = SkColorGetB(paint.getColor()); // extract order from blue channel in onDrawRect() 145 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorBLUE); in TEST() 160 ASSERT_EQ(SK_ColorRED, TestUtils::getColor(surface, 0, 0)); in TEST() 164 ASSERT_EQ(SK_ColorWHITE, TestUtils::getColor(surface, 0, 0)); in TEST() 168 ASSERT_EQ(SK_ColorRED, TestUtils::getColor(surface, 0, 0)); in TEST() 191 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorWHITE); in TEST() 222 ASSERT_EQ(SK_ColorGREEN, TestUtils::getColor(surface, 200, 600)); in TEST() 247 EXPECT_EQ(SK_ColorWHITE, paint.getColor()); in RENDERTHREAD_TEST() 253 EXPECT_EQ(SK_ColorDKGRAY, paint.getColor()); in RENDERTHREAD_TEST() 260 EXPECT_EQ(SK_ColorBLUE, paint.getColor()); in RENDERTHREAD_TEST() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/lights/ |
D | LightsServiceTest.java | 112 assertThat(manager.getLightState(manager.getLights().get(0)).getColor()).isEqualTo(0xf1); in testControlMultipleLights() 113 assertThat(manager.getLightState(manager.getLights().get(1)).getColor()).isEqualTo(0xf2); in testControlMultipleLights() 114 assertThat(manager.getLightState(manager.getLights().get(2)).getColor()).isEqualTo(0xf3); in testControlMultipleLights() 117 assertThat(manager.getLightState(manager.getLights().get(3)).getColor()).isEqualTo(0x00); in testControlMultipleLights() 127 assertThat(manager.getLightState(micLight).getColor()).isEqualTo(0x00000000); in testControlLights_onlyEffectiveForLifetimeOfClient() 133 assertThat(manager.getLightState(micLight).getColor()).isEqualTo(0xff00ff00); in testControlLights_onlyEffectiveForLifetimeOfClient() 138 assertThat(manager.getLightState(micLight).getColor()).isEqualTo(0x00000000); in testControlLights_onlyEffectiveForLifetimeOfClient() 154 assertThat(manager.getLightState(micLight).getColor()).isEqualTo(0xff0000ff); in testControlLights_firstCallerWinsContention() 159 assertThat(manager.getLightState(micLight).getColor()).isEqualTo(0xffffffff); in testControlLights_firstCallerWinsContention() 164 assertThat(manager.getLightState(micLight).getColor()).isEqualTo(0); in testControlLights_firstCallerWinsContention() [all …]
|
/frameworks/base/packages/CarSystemUI/src/com/android/systemui/statusbar/hvac/ |
D | TemperatureColorStore.java | 39 int getColor() { in getColor() method in TemperatureColorStore.TemperatureColorValue 95 return bottomValue.getColor(); in getColorForTemperature() 100 return topValue.getColor(); in getColorForTemperature() 105 return sTemperatureColorValues[index].getColor(); in getColorForTemperature() 114 return lerpColor(fraction, startValue.getColor(), endValue.getColor()); in getColorForTemperature()
|
/frameworks/base/core/java/android/transition/ |
D | Recolor.java | 82 if (startColor.getColor() != endColor.getColor()) { in createAnimator() 83 endColor.setColor(startColor.getColor()); in createAnimator() 85 return ObjectAnimator.ofArgb(endBackground, "color", startColor.getColor(), in createAnimator() 86 endColor.getColor()); in createAnimator()
|
/frameworks/base/tests/testables/tests/src/android/testing/ |
D | TestableResourcesTest.java | 54 mContext.getColor(nonExistentId); in testAddingResource() 60 assertEquals(0xffffff, mContext.getColor(nonExistentId)); in testAddingResource() 68 assertEquals(0xffffff, mContext.getColor(nonExistentId)); in testClearingResource() 71 mContext.getColor(nonExistentId); in testClearingResource()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/external/ |
D | TileColorPickerTest.java | 50 final int color = mTileColorPicker.getColor(Tile.STATE_UNAVAILABLE); in testGetColor_StateUnavailable_ReturnUnavailableColor() 59 final int color = mTileColorPicker.getColor(Tile.STATE_INACTIVE); in testGetColor_StateInactive_ReturnInactiveColor() 68 final int color = mTileColorPicker.getColor(Tile.STATE_ACTIVE); in testGetColor_StateActive_ReturnActiveColor()
|
/frameworks/base/packages/EasterEgg/src/com/android/egg/paint/ |
D | PaintActivity.java | 144 painting.setPaperColor(getColor(R.color.paper_color)); in setupViews() 145 painting.setPaintColor(getColor(R.color.paint_color)); in setupViews() 214 widthButtonDrawable.setFrameColor(getColor(R.color.toolbar_icon_color)); in setupViews() 216 colorButtonDrawable.setFrameColor(getColor(R.color.toolbar_icon_color)); in setupViews() 231 icon.setFrameColor(getColor(R.color.toolbar_icon_color)); in refreshBrushAndColor() 237 icon.setWellColor(getColor(R.color.toolbar_icon_color)); in refreshBrushAndColor() 262 icon.setFrameColor(getColor(R.color.toolbar_icon_color)); in refreshBrushAndColor()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
D | BarTransitions.java | 185 mOpaque = context.getColor(R.color.system_bar_background_opaque); in BarBackgroundDrawable() 186 mSemiTransparent = context.getColor( in BarBackgroundDrawable() 188 mTransparent = context.getColor(R.color.system_bar_background_transparent); in BarBackgroundDrawable() 212 if (mTintFilter == null || mTintFilter.getColor() != color) { in setTint() 220 int targetColor = mTintFilter == null ? 0 : mTintFilter.getColor(); in setTintMode()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/assist/ui/ |
D | EdgeLight.java | 53 mColor = sourceLight.getColor(); in EdgeLight() 60 public int getColor() { in getColor() method in EdgeLight
|
/frameworks/base/core/java/android/content/res/ |
D | CompatResources.java | 56 public int getColor(@ColorRes int id) throws NotFoundException { in getColor() method in CompatResources 57 return getColor(id, getTheme()); in getColor()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/policy/ |
D | PhoneWindowTest.java | 105 assertThat(colorDrawable.getColor(), is(Color.GREEN)); in testWindowBackground_colorLiteral() 119 assertThat(colorDrawable.getColor(), is(Color.BLUE)); in testWindowBackgroundFallback_colorLiteral() 137 assertThat(colorDrawable.getColor(), is(Color.BLUE)); in testWindowBackgroundFallbackWithExplicitBackgroundSet_colorLiteral()
|
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/util/ |
D | FallbackThemeWrapperTest.java | 49 assertEquals(0xffff0000, a.getColor(0, 0)); in testThemeValueOnlyInBase() 57 assertEquals(0xff0000ff, a.getColor(0, 0)); in testThemeValueOnlyInFallback()
|
/frameworks/base/core/java/android/text/style/ |
D | LineBackgroundSpan.java | 118 public final int getColor() { in getColor() method in LineBackgroundSpan.Standard 128 final int originColor = paint.getColor(); in drawBackground()
|
D | QuoteSpan.java | 163 public int getColor() { in getColor() method in QuoteSpan 196 int color = p.getColor(); in drawLeadingMargin()
|
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/util/ |
D | PartnerTest.java | 105 final int color = Partner.getColor(application, R.color.suw_color_accent_dark); in getColor_partnerValuePresent_shouldReturnPartnerValue() 124 int partnerValue = entry.resources.getColor(entry.id); in getResourceEntry_partnerValueNotPresent_shouldReturnDefault() 134 int partnerValue = entry.resources.getColor(entry.id); in getResourceEntry_directBootUnawareNoValueDefined_shouldReturnDefaultValue()
|
/frameworks/base/apct-tests/perftests/core/src/android/app/ |
D | ResourcesPerfTest.java | 80 public void getColor() { in getColor() method in ResourcesPerfTest 83 mRes.getColor(mColorId, null); in getColor()
|
/frameworks/base/tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/ |
D | MainActivity.java | 54 defaultColor = getColor(R.color.none_received); in onCreate() 55 startJobColor = getColor(R.color.start_received); in onCreate() 56 stopJobColor = getColor(R.color.stop_received); in onCreate()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/graph/ |
D | SignalDrawable.java | 101 mTransparentPaint.setColor(context.getColor(android.R.color.transparent)); in SignalDrawable() 141 setTintList(ColorStateList.valueOf(mForegroundPaint.getColor())); in onLevelChange() 163 int colorForeground = mForegroundPaint.getColor(); in setTintList() 165 if (colorForeground != mForegroundPaint.getColor()) invalidateSelf(); in setTintList()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/stackdivider/ |
D | MinimizedDockShadow.java | 54 int startColor = mContext.getResources().getColor( in updatePaint() 56 int endColor = mContext.getResources().getColor( in updatePaint()
|
/frameworks/base/packages/SettingsLib/AdaptiveIcon/src/com/android/settingslib/widget/ |
D | AdaptiveIcon.java | 75 .getColor(colorRes, null /* theme */); in setBackgroundColor() 87 setBackgroundColor(context.getColor(R.color.homepage_generic_icon_background)); in setBackgroundColor()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/globalactions/ |
D | GlobalActionsLayout.java | 45 int gridBackgroundColor = getResources().getColor( in setBackgrounds() 47 int separatedBackgroundColor = getResources().getColor( in setBackgrounds()
|
/frameworks/base/packages/SettingsLib/BarChartPreference/src/com/android/settingslib/widget/ |
D | BarView.java | 56 @ColorInt final int colorAccent = a.getColor(0, 0); in BarView() 60 @ColorInt final int barColor = a.getColor(R.styleable.SettingsBarView_barColor, in BarView()
|