/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | SystemPalette.java | 61 assertColor(context.getColor(leftmostColors[0]), Color.WHITE); in testShades0and1000() 64 assertColor(context.getColor(rightmostColors[0]), Color.BLACK); in testShades0and1000() 192 colors[0] = context.getColor(R.color.system_accent1_0); in getAllAccent1Colors() 193 colors[1] = context.getColor(R.color.system_accent1_10); in getAllAccent1Colors() 194 colors[2] = context.getColor(R.color.system_accent1_50); in getAllAccent1Colors() 195 colors[3] = context.getColor(R.color.system_accent1_100); in getAllAccent1Colors() 196 colors[4] = context.getColor(R.color.system_accent1_200); in getAllAccent1Colors() 197 colors[5] = context.getColor(R.color.system_accent1_300); in getAllAccent1Colors() 198 colors[6] = context.getColor(R.color.system_accent1_400); in getAllAccent1Colors() 199 colors[7] = context.getColor(R.color.system_accent1_500); in getAllAccent1Colors() [all …]
|
D | LinearGradientTest.java | 97 convert.apply(blue), b.getColor(0, 0), 0.09f); 100 convert.apply(green), b.getColor(0, 20), 0.09f); 103 convert.apply(red), b.getColor(0, 39), 0.08f); 106 b.getColor(10, 10), b.getColor(20, 10), 0f); 108 assertTrue(b.getColor(10, 0).blue() > b.getColor(10, 5).blue()); 109 assertTrue(b.getColor(10, 5).blue() > b.getColor(10, 10).blue()); 110 assertTrue(b.getColor(10, 0).green() < b.getColor(10, 5).green()); 111 assertTrue(b.getColor(10, 5).green() < b.getColor(10, 10).green()); 113 assertTrue(b.getColor(10, 20).green() > b.getColor(10, 30).green()); 114 assertTrue(b.getColor(10, 30).green() > b.getColor(10, 35).green()); [all …]
|
D | RadialGradientTest.java | 88 final Color centerColor = bitmap.getColor(50, 50); in testColorLong() 96 bitmap.getColor(p.x, p.y), .001f); in testColorLong() 114 Color c = bitmap.getColor(x, y); in testColorLong()
|
/cts/tests/tests/hardware/src/android/hardware/lights/cts/ |
D | LightsManagerTest.java | 99 assertThat(mManager.getLightState(mLights.get(0)).getColor()).isEqualTo(ON_RED); in testControlSingleLight() 109 initialColors[i] = mManager.getLightState(mLights.get(i)).getColor(); in testControlMultipleLights() 120 assertThat(mManager.getLightState(mLights.get(0)).getColor()).isEqualTo(0xffaaaaff); in testControlMultipleLights() 121 assertThat(mManager.getLightState(mLights.get(1)).getColor()).isEqualTo(0xffbbbbff); in testControlMultipleLights() 125 assertThat(mManager.getLightState(mLights.get(i)).getColor()).isEqualTo( in testControlMultipleLights() 135 int initialColor = mManager.getLightState(mLights.get(0)).getColor(); in testControlLights_onlyEffectiveForLifetimeOfClient() 141 assertThat(mManager.getLightState(mLights.get(0)).getColor()).isEqualTo(ON_TAN); in testControlLights_onlyEffectiveForLifetimeOfClient() 146 assertThat(mManager.getLightState(mLights.get(0)).getColor()).isEqualTo(initialColor); in testControlLights_onlyEffectiveForLifetimeOfClient() 154 int initialColor = mManager.getLightState(mLights.get(0)).getColor(); in testControlLights_firstCallerWinsContention() 163 assertThat(mManager.getLightState(mLights.get(0)).getColor()).isEqualTo(ON_TAN); in testControlLights_firstCallerWinsContention() [all …]
|
/cts/hostsidetests/appsecurity/test-apps/SplitApp/src/com/android/cts/splitapp/ |
D | TestThemeHelper.java | 93 mCustomColor = getColor(theme, R.attr.customColor); in TestThemeHelper() 94 mColorBackground = getColor(theme, android.R.attr.colorBackground); in TestThemeHelper() 95 mNavigationBarColor = getColor(theme, android.R.attr.navigationBarColor); in TestThemeHelper() 96 mStatusBarColor = getColor(theme, android.R.attr.statusBarColor); in TestThemeHelper() 134 private int getColor(Resources.Theme theme, int resourceId) { in getColor() method in TestThemeHelper 136 final int color = ta.getColor(0, 0); in getColor() 148 return ((ColorDrawable) color).getColor(); in getDrawableColor() 160 color = ((ColorDrawable) drawable).getColor(); in assertDrawableColor()
|
/cts/tests/tests/text/src/android/text/style/cts/ |
D | QuoteSpanTest.java | 42 assertTrue(span.getColor() != 0); in testDefaultConstructor() 52 assertEquals(Color.RED, span.getColor()); in testConstructorFromColor() 61 assertEquals(Color.RED, span.getColor()); in testConstructorFromColorStripeWidthGapWidth() 76 assertEquals(Color.RED, span.getColor()); in testConstructorFromParcel() 95 assertEquals(Color.BLACK, quoteSpan.getColor()); in testGetColor() 98 assertEquals(Color.BLUE, quoteSpan.getColor()); in testGetColor() 137 assertEquals(Color.RED, q.getColor()); in testWriteToParcel() 149 assertEquals(Color.MAGENTA, q.getColor()); in testWriteToParcel()
|
D | BulletSpanTest.java | 45 assertEquals(0, bulletSpan.getColor()); in testDefaultConstructor() 55 assertEquals(0, bulletSpan.getColor()); in testConstructorFromGapWidth() 65 assertEquals(Color.RED, bulletSpan.getColor()); in testConstructorFromGapWidthColor() 74 assertEquals(Color.RED, bulletSpan.getColor()); in testConstructorFromGapWidthColorBulletRadius() 143 assertEquals(Color.RED, b.getColor()); in testWriteToParcel() 158 assertEquals(0, bulletSpan.getColor()); in testWriteToParcel()
|
D | ForegroundColorSpanTest.java | 64 assertEquals(0, tp.getColor()); in testUpdateDrawState() 66 assertEquals(Color.CYAN, tp.getColor()); in testUpdateDrawState() 70 assertEquals(Color.DKGRAY, tp.getColor()); in testUpdateDrawState()
|
D | ClickableSpanTest.java | 47 assertEquals(Color.RED, tp.getColor()); in testUpdateDrawState() 52 assertEquals(Color.BLUE, tp.getColor()); in testUpdateDrawState()
|
D | DynamicDrawableSpanTest.java | 114 assertThat(bitmap.getColor(0, i).toArgb()).isEqualTo(Color.RED); in testCenterAligned() 118 assertThat(bitmap.getColor(0, top + i + padding / 2).toArgb()).isNotEqualTo(Color.RED); in testCenterAligned() 122 assertThat(bitmap.getColor(0, top + i + DRAWABLE_SIZE + padding / 2).toArgb()) in testCenterAligned()
|
D | LineBackgroundSpan_StandardTest.java | 43 assertEquals(COLOR, span.getColor()); in testGetColor() 55 assertEquals(COLOR, parcelSpan.getColor()); in testWriteToParcel()
|
/cts/tests/tests/view/src/android/view/cts/ |
D | ContextThemeWrapperTest.java | 166 assertEquals(expectedTa.getColor(R.styleable.TextAppearance_textColor, defValue), in verifyIdenticalTextAppearanceStyle() 167 ta.getColor(R.styleable.TextAppearance_textColor, defValue)); in verifyIdenticalTextAppearanceStyle() 168 assertEquals(expectedTa.getColor(R.styleable.TextAppearance_textColorHint, defValue), in verifyIdenticalTextAppearanceStyle() 169 ta.getColor(R.styleable.TextAppearance_textColorHint, defValue)); in verifyIdenticalTextAppearanceStyle() 170 assertEquals(expectedTa.getColor(R.styleable.TextAppearance_textColorLink, defValue), in verifyIdenticalTextAppearanceStyle() 171 ta.getColor(R.styleable.TextAppearance_textColorLink, defValue)); in verifyIdenticalTextAppearanceStyle() 172 assertEquals(expectedTa.getColor(R.styleable.TextAppearance_textColorHighlight, defValue), in verifyIdenticalTextAppearanceStyle() 173 ta.getColor(R.styleable.TextAppearance_textColorHighlight, defValue)); in verifyIdenticalTextAppearanceStyle()
|
/cts/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/src/com/android/cts/isolatedsplitapp/ |
D | TestTheme.java | 200 mBaseColor = getColor(theme, R.attr.themeBaseColor); in setTheme() 201 mPrimaryColor = getColor(theme, resolveResourceId(context, ATTR_THEME_PRIMARY_COLOR)); in setTheme() 202 mSecondaryColor = getColor(theme, resolveResourceId(context, ATTR_THEME_SECONDARY_COLOR)); in setTheme() 203 mTertiaryColor = getColor(theme, resolveResourceId(context, ATTR_THEME_TERTIARY_COLOR)); in setTheme() 204 mColorBackground = getColor(theme, android.R.attr.colorBackground); in setTheme() 205 mNavigationBarColor = getColor(theme, android.R.attr.navigationBarColor); in setTheme() 206 mStatusBarColor = getColor(theme, android.R.attr.statusBarColor); in setTheme() 221 private int getColor(Resources.Theme theme, int resourceId) { in getColor() method in TestTheme 226 final int color = ta.getColor(0, 0); in getColor() 238 return ((ColorDrawable) color).getColor(); in getDrawableColor()
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | RemoteViewsThemeColorsTest.java | 78 assertEquals(mContext.getColor(color), resultContext.getColor(color)); in apply_setNoThemeColors_shouldNotChangeColors() 93 assertEquals(0xffffff00 + i, resultContext.getColor(ALL_COLORS.get(i))); in apply_setAllColorsInTheme_shouldAllChange() 111 assertEquals(theme.get(color), resultContext.getColor(color)); in apply_setSomeColorsInTheme_shouldChangeThoseColorsOnly() 113 assertEquals(mContext.getColor(color), resultContext.getColor(color)); in apply_setSomeColorsInTheme_shouldChangeThoseColorsOnly() 133 assertEquals(res.getColor(android.R.color.darker_gray), in apply_setNonThemeColors_shouldNotChangeContext() 134 resultRes.getColor(android.R.color.darker_gray)); in apply_setNonThemeColors_shouldNotChangeContext()
|
D | CalendarViewTest.java | 305 assertEquals(mActivity.getColor(R.color.calendarview_week_background), in testAppearanceHolo() 307 assertEquals(mActivity.getColor(R.color.calendarview_focusedmonthdate), in testAppearanceHolo() 309 assertEquals(mActivity.getColor(R.color.calendarview_unfocusedmonthdate), in testAppearanceHolo() 316 mActivity.getColor(R.color.calendarview_week_background_new); in testAppearanceHolo() 318 mActivity.getColor(R.color.calendarview_focusedmonthdate_new); in testAppearanceHolo() 320 mActivity.getColor(R.color.calendarview_unfocusedmonthdate_new); in testAppearanceHolo() 322 mActivity.getColor(R.color.calendarview_week_number_new); in testAppearanceHolo() 324 mActivity.getColor(R.color.calendarview_week_separatorline_new); in testAppearanceHolo()
|
D | SwitchTest.java | 342 assertEquals(ColorStateList.valueOf(Color.BLUE), track.getColor()); in testSetTrackIcon() 362 assertEquals(ColorStateList.valueOf(Color.BLUE), track.getColor()); in testSetTrackIconAsync() 381 assertEquals(ColorStateList.valueOf(Color.BLUE), track.getColor()); in testSetTrackResourceAsync() 401 assertEquals(ColorStateList.valueOf(Color.BLUE), thumb.getColor()); in testSetThumbIcon() 421 assertEquals(ColorStateList.valueOf(Color.BLUE), thumb.getColor()); in testSetThumbIconAsync() 440 assertEquals(ColorStateList.valueOf(Color.BLUE), thumb.getColor()); in testSetThumbResourceAsync()
|
/cts/tests/tests/systemui/src/android/systemui/cts/ |
D | LightBarThemeTest.java | 72 assertEquals(getInstrumentation().getContext().getColor(R.color.navigationBarDividerColor), in testGetNavigationBarDividerColor() 88 instrumentationContext.getColor(R.color.navigationBarDividerColor), in testNavigationBarDividerColor() 89 instrumentationContext.getColor(R.color.navigationBarColor), in testNavigationBarDividerColor()
|
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/ |
D | CustomDrawableTest.java | 52 assertEquals(Color.RED, ((CustomDrawable) dr).getColor()); in testInflation() 72 mColor = ta.getColor(0, Color.BLACK); in inflate() 75 public int getColor() { in getColor() method in CustomDrawableTest.CustomDrawable
|
D | ColorStateListDrawableTest.java | 67 new ColorDrawable().getColor()); in testDefaultConstructor() 148 colorDrawable.getColor(), in testColorStateListAccess() 160 assertEquals(colorDrawable.getColor(), mColorStateList.getDefaultColor()); in testSetState() 162 assertEquals(colorDrawable.getColor(), Color.BLUE); in testSetState() 164 assertEquals(colorDrawable.getColor(), Color.RED); in testSetState()
|
/cts/tests/app/src/android/app/cts/ |
D | NotificationCarExtenderTest.java | 43 assertEquals(Notification.COLOR_DEFAULT, extender.getColor()); in testCarExtender_EmptyConstructor() 52 assertEquals(Notification.COLOR_DEFAULT, extender.getColor()); in testCarExtender_Constructor() 71 assertEquals(testColor, extender.getColor()); in testCarExtender() 98 assertEquals(testColor, receiveCarExtender.getColor()); in testCarExtender_extend()
|
/cts/tests/tests/view/surfacevalidator/src/android/view/cts/surfacevalidator/ |
D | MultiFramePixelChecker.java | 38 private PixelColor getColor(long frameNumber) { in getColor() method in MultiFramePixelChecker 67 mMatchingPixelCount = getNumMatchingPixels(getColor(frameNumber), plane, boundsToCheck); in validatePlane()
|
/cts/tests/leanbackjank/app/src/android/leanbackjank/app/presenter/ |
D | CardPresenter.java | 45 sDefaultBackgroundColor = parent.getResources().getColor(R.color.default_background, null); in onCreateViewHolder() 47 parent.getResources().getColor(R.color.selected_background, null); in onCreateViewHolder()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/audiolib/ |
D | WaveformView.java | 57 mWavePaint.setColor(res.getColor(R.color.waveform_line)); in init() 66 mBackgroundPaint.setColor(res.getColor(R.color.waveform_background)); in init()
|
/cts/tests/tests/content/src/android/content/res/cts/ |
D | ResourcesTest.java | 106 assertEquals(0, testTypedArray.getColor(0, 0)); in testObtainAttributes() 107 assertEquals(128, testTypedArray.getColor(1, 128)); in testObtainAttributes() 216 assertEquals(mResources.getColor(R.color.testcolor1), focusColor); in testGetColorStateList() 231 mResources.getColor(-1); in testGetColor() 237 final int color = mResources.getColor(R.color.testcolor1); in testGetColor() 342 mResources.getColor(R.color.testcolor1, null), in testGetDrawable_ColorResource() 343 ((ColorDrawable) drawable).getColor() in testGetDrawable_ColorResource() 381 mResources.getColor(android.R.color.white, null), in testGetDrawable_ColorStateListConfigurations() 385 mResources.getColor(android.R.color.black, null), in testGetDrawable_ColorStateListConfigurations()
|
/cts/tests/framework/base/windowmanager/app/src/android/server/wm/app/ |
D | SplashScreenReplaceThemeActivity.java | 58 ((ColorDrawable) view.getBackground()).getColor())); in onSplashScreenExit()
|