Test: Ide74c2e98d4aadba8bb0a24d132f161dbe64f4db
Previously, BT709 was believed to be SRGB, resulting in errors when we
tried to convert between them. Make isSrgb test several values passed to
OETF and EOTF to verify that it is very close to SRGB. This results in
BT709 no longer being considered SRGB, fixing the conversion.
Update the documentation to reflect the new behavior.
Now that isSrgb is more restrictive, a gamma of 2.2 is no longer
considered to be SRGB, which requires a change to a CTS test.
Change-Id: I7bf8d5e3af2f91e38ca0b0d5d906713a125dd484
and parameters provided by the Theme leading to array size
mismatch exceptions being thrown.
GradientDrawable#updateGradientDrawableGradient is invoked multiple
times during xml inflation, once with the attributes provided in the xml
and another with attributes provided in the Theme. However, if
parameters come from both the xml resources and the theme, when
theme attributes are applied it can partially squash previously applied
values.
In the case of gradients this can lead to a previously initialized
positions array with floating point offsets for color positions
being applied but not overriden with theme attributes that only include
a portion of the attribute values leading to exceptions being thrown
as the colors and positions arrays are not of the same size
Bug: 112122447
Test: Created test of xml inflation of GradientDrawables both with and
without theme attributes
Change-Id: Ie4183e2304677d30b6faef1cdc5c1be27ef9edd4
This CL starts a journey to discover a brave new inset world. The
path to get us there may be rocky, but it's going to be rocky.
One of the main pledges of the new API is that an app can retrieve
what is causing a certain inset easily. For that, we need to
dispatch metadata who is causing what inset, such that we can query
it from the client side.
Furthermore, the client will be able to manipulate insets directly,
but also listen to animation changes. We don't want to go through
window manager for that, thus, there needs to be a local codepath
from (global window state -> WindowInsets).
Because we have these two requirements, we dispatch the relevant
global window state for insets, represented by InsetsState, and
dispatch it to the client. On the client side we take the frame
and the InsetsState and generate WindowInsets out of it.
Bug: 118118435
Test: InsetsSourceTest, InsetsStateTest, InsetsSourceProviderTest,
InsetsStateControllerTest
Change-Id: I2bfe9dda376512916261823fc2ee35cbedeb6731
mFamilies was added for itemize API but it won't happen in this
release, so removing unused member from Typeface.
Bug: 120177351
Test: TreeHugger
Change-Id: Iee0e381b28aa42daba1621084ce5a9d1a8753cd5
Added maxTargetSdk version for Android P for access of mBitmap field
through reflection. The bitmap field is configured by application usages
only already so there is no need for apps to query the Bitmap from the
Canvas and should do so directly. Getters on Canvas is generally seen
as an anti-pattern.
Bug: 117521088
Test: none
Change-Id: Ie2318248f7682fd4e0a46121bc6e9f5c1546dcfb
Modify Drawable public API to no longer mark isProjected
as hidden. This makes the Drawable API consistent with the public
RenderNode API and enables androidx to move away from accessing
this method through reflection
Bug: 120159096 117521142
Test: none
Change-Id: Icdd778bf3d8842eb2d69e5872f704c7e96f915fa
This change adds a public version of ColorSpace.chromaticAdaptation(),
so that chromatic adaptation can be done on independent CIE xyY or XYZ
coordinates without the involvement of ColorSpace.Rgb.
Test: cts-tradefed run singleCommand cts-dev --module CtsGraphicsTestCases --test android.graphics.cts.ColorSpaceTest
Bug 116516917
Change-Id: I73c33750c343301bed4bb018c351d87c5043b59b
Reverted getAlpha implementation to return the
alpha value of the first non-null child drawable
Bug: 119668265
Test: Added test to AdaptiveIconDrawableTest
Change-Id: Ia3384755e8f9a83b88d586881eae80e4c201097f
Applications could be launched on a secondary display that
has lower density than default display. While some applications
may use 1x1 image resource as activity background, the scaled
width/height would be 0 if down scaling the 1x1 image with
scale ratio that is less than 1/2.
Making sure the scaled width/height won’t less than 1 to
prevent application crashed.
Bug: 117749148
Test: Launch app on secondary display
Change-Id: I73567dd237736466d0bc423485359d50073d86c1
Updated documentation on ColorDrawable to clarify that the alpha
value provided is combined with the color's already existing alpha
value instead of overwriting it.
Bug: 119004459
Test: Build and boots
Change-Id: Id62462c4ac7d2f46cdc3236876f7e0711fbc4c16
Deprecated getOpacity method on Drawable as the graphics optimization
is no longer utilized in the framework
Bug: 118841703
Test: Build and boots
Change-Id: Ie21c9379a5e9737ed68c09c2e518732c1578b3cb
Split out the View/ViewRootImpl bits from the
hardware rendering bits.
Create a potential public API surface for
hardware rendering
Bug: 112709971
Test: builds & boots
Change-Id: I9e6f44b07a170574a905f42338282c4bb7e95f56
The custom fallback info is used for determine the priority between
custom fallback and locale fallback. The custom fallback should be
given priority over locale fallback.
Bug: 116512426
Test: minikin_tests
Test: atest TypefaceCustomFallbackBuilderTest
Change-Id: I79cc82fa990d7705ea5c40e9b0be40d062c218dc
API refactoring:
- Replace Font.getWeight()/getSlant() with Font.getStyle().
- Change Typeface.CustomFallbackBuilder.setItalic() to setSlant()
Implementation refactoring:
- Add hidden builder API for asset manager with cookie. The cookie is
internal, so hide the API as well.
- Replace createFromResources with Typeface.Builder
- Reimplement Typeface.Builder with Typeface.CustomFallbackBuilder
Ground work for b/114479228
- Keep list of FontFamily in the Typeface.
Bug: 114479228
Test: atest CtsTestCases
Test: atest CtsGraphicsTestCases
Test: atest CtsWidgetTestCases
Change-Id: Ifaaa58ddea147644a93158aa075394c2f645617c
- Unhide Y8 format as part of MONOCHROME camera support.
- Specify required stream combination for Y8 format.
Test: Camera CTS test
Bug: 70216652
Change-Id: Iab28b7ee3f2d5ec534a517079f14e0ed648ae556