Bug: 36025103
Test: cts-tradefed run singleCommand cts-dev --module CtsGraphicsTestCases
Test: cts-tradefed run singleCommand cts-dev --module CtsUiRenderingTestCases
Test: manually inspected for leaks via SK_TRACK_SHADER_LIFETIME and forcing a GC after ComposeShaderTest
Change-Id: Ib5d33a80d2f9f468705806b05832e753508143cc
This change also resets the cached color space field in Bitmap.java
when reconfigure() is called or when a bitmap is reused by the
bitmap factory.
Bug: 32072280
Test: CtsGraphicsTestCases.BitmapColorSpaceTest
Change-Id: I232b729b7a29e65bfff21dc749570c3c80adf855
To do this, the developer must specify the set of certificate
hashes that represent the authority's app. This allows us to
verify that the authority we find is indeed the one intended
by the developer.
Bug: 35025705
Test: runtest --path frameworks/base/core/tests/coretests/src/android/provider/FontsContractTest.java
runtest --path frameworks/base/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java
CTS attached to topic
Change-Id: I605f9a93bbca8705936ead08efb4a5b4fdcc4882
This is the first step toward interpreting color spaces at render time.
Bug: 32984164
Test: BitmapColorSpaceTest in CtsGraphicsTestCases
Change-Id: I0164a18f1ed74a745874fe5229168042afe27a04
This adds better support for Arabic script languages, Armenian,
Catalan, Hebrew, Kannada, Malayalam, Polish, Tamil, and Telugu by
adding various hyphenation types and edits appropriate for the
locales.
The actual implementations are in Minikin. This CL takes care of the
changes needed in frameworks, to support different end-of-line and
start-of-line hyphen edits.
Two bugs in TextLine.java are also fixed:
1. Where hyphen edits on non-spanned texts were not eliminated in
handleRun() when they should have. This had manifested itself in
double hyphenation in some bidi paragraphs.
2. Some no op assignments and comparions around the change for the
above bug are removed.
Test: thorough manual testing for various cases
Bug: 19756624
Bug: 19950445
Bug: 19955011
Bug: 25623243
Bug: 26154469
Bug: 26154471
Bug: 33387871
Bug: 33560754
Bug: 33752592
Bug: 33754204
Change-Id: I48c047d1f6a75c39a78a6ea38a0a3282f63326ec
Also cleans up stray white space and fixes docs. Adds getters to ArcShape
properties so that we can write proper CTS tests.
Fixes: 35419960
Test: ArcShapeTest, OvalShape#testClone, ShapeDrawableTest
Change-Id: Icf1bae7f79f9294b2a60c49b85ce8749473ed61e
Ensure that all static initializer code can be executed in the
compiler. Move native field caching into the native method
registration function.
Bug: 34956610
Test: m
Test: Device boots (Pixel)
Change-Id: Icf68c8fbadcaaa133a152942a3a7ba7aba84a1df
Implement support for downloadable font requests in xml. Given the
xml fonts feature in O, this adds support to not only declare
local font files as font resources, but also Downloadable fonts
from a fonts provider.
A provider returns a font family (of one or more files) given a
query, so the new attributes are added to the font-family tag.
Additionally, add support to pre-declare downloadable font resources
in the Android Manifest. These will then be fetched at app startup
time so they are available to use from the Typeface cache asap.
When retrieving downloadable fonts via resources, the cache is
checked to see if the font is already there and is used, otherwise
a request is sent to the provider and the default font is returned
as we need a result synchronously.
To do this, the developer declares an additional fonts xml resource
file with the list of fonts to preload and links it in the manifest
with a meta-data tag.
E.g.:
res/font/mydownloadedfont.xml
<font-family xmlns:android="http://schemas.android.com/apk/res/android"
android:fontProviderAuthority="com.example.test.fontprovider"
android:fontProviderQuery="myrequestedfont">
</font-family>
res/font/preloaded_fonts.xml
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:android="http://schemas.android.com/apk/res/android">
<font android:font="@font/mydownloadedfont" />
</font-family>
and in the AndroidManifest.xml
<meta-data android:name="preloaded_fonts"
android:resource="@font/preloaded_fonts" />
Bug: 34660500, 34658116
Test: WIP, need to add more
Change-Id: I1d92555e115e241bf23b59e6f5c6cca6c7361de7
Test: Unit test on IconTest
$ runtest --path=frameworks/base/graphics/tests/graphicstests/src/android/graphics/drawable/IconTest.java
b/34196580
Change-Id: I321c4b02f17ad9426c053216c4c88616a605aacf
With the introduction of support for 16 bit images, bitmaps returned
by BitmapFactory may be using the RGBA_F16 configuration. Some apps
and libraries assume the returned configuration is always ARGB_8888
and make assumptions based on that to compute cache sizes, etc.
This changes extract the output config when BitmapFactory is invoked
with the inJustDecodeBounds option. Despite its name, this option
is already used (and documented!) to decode more than bounds as it
also decodes the MIME type.
Bug: 35108998
Test: CtsGraphicsTestCases
Change-Id: If71959751458816678e42b21ab26c889aba5dea0
Operations that can expand the clip are difficult to support and
don't fit the parent child model that is used by the view system.
Test: compile
Bug: 14650725
Change-Id: I67e99d3e1a1eb0b231910ee5d277a38e8a953dc4
If the requested Typeface is already loaded into memory, return
from the cache.
Test: none, optimization
Change-Id: I32422c47c68502ba83b7d976f6e05f70dda5daed
This is 2nd attempt of I249d464f8cdaa56017a987588b94ed685aadeb58.
The original CL was reverted due to conflicting with another CL submitted
before.
Nothing has changed except for following class name changes.
Here is the original commit message of reverted change.
This CL enables developers to specify axis values to the underlying
font collection. The specification of the font variation settings is
the same as the CSS font-variation-settings attribute in CSS working
draft as of 2016-11-30.
Code example: Here is an example to set width 100 and weight 1.5.
TextView tv = (TextView) findViewById(R.id.textView);
tv.setFontVariationSettings("'wdth' 100, 'wght' 1.5");
Bug: 33062398
Test: Manually done. Ran FrameworksGraphicsTests, CtsGraphicsTestCases
and CtsWidgetTestCases
Change-Id: I9cdfbdecc87c995d805096883ef2652768c6c21e
This change implements the loading and parsing
of xml type font resources, and makes sure it is
used properly by TextView styles.
Test: run cts -m CtsContentTestCases -t android.content.res.cts.ResourcesTest
run cts -m CtsWidgetTestCases -t android.widget.cts.TextViewTest#testFontResources*
Change-Id: I5a2930b3ba7dad67d9607e9036a5dde6bab0c5a4
Test: manual test ag/1774462, cts tests ag/1813947
Bug: 32063838
Design doc: http://go/layered-icons-eng
- Reads in the mask path from config.
- If <maskable-icon> is dynamically created, clip the drawable using the mask path.
- Instead of using clipPath method, used BitmapShader for performance.
Change-Id: If5b4a24127bf823477c6c5d8a81d5093501d58e7
This change exposes to developers the ability to request fonts
from a provider via Typeface.
Until further security is implemented, only system apps can
provide fonts.
Test: See topic for CTS change
Change-Id: Ic7d5e2648340ee561f4d4c2d73a673748d2af076