- Move FontRequest from android.graphics.fonts to android.provider since
this is only used by android.provider.FontsContract and never draw
anything.
- FontRequest is no longer being Parcelable.
- Remove FontSpec.aidl which is not necessary.
Bug: 37326126
Test: am instrument -w -e class android.provider.FontsContractTest
com.android.frameworks.coretests/\
android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.provider.cts.FontProviderTest
android.provider.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.provider.cts.FontRequestTest
android.provider.cts/android.support.test.runner.AndroidJUnitRunner
Change-Id: I0eb501844247c2f07eaa1fc7a71f72e404888b5b
Since CancellationSignal is not guaranteed to be handled by remote
process, introduce threaded font loading mechanism.
At the same time, this fixes possible NPE issue in openFont.
Bug: 37552479
Test: am instrument -w -e class android.provider.FontsContractE2ETest
com.android.frameworks.coretests/\
android.support.test.runner.AndroidJUnitRunner
Change-Id: Ie235c5a57bd172b0882da5aa27a990d7c6686ff2
- Remove Columns.STYLE
- Decouple Context from Typeface.
- Make FontsContract constructor private since it is essentially static.
- Removed unused constants.
Bug: 37281200
Bug: 37268410
Test: am instrument -w -e class android.provider.FontsContractE2ETest
com.android.frameworks.coretests/\
android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.provider.FontsContractTest
com.android.frameworks.coretests/\
android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.TypefaceTest
android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Change-Id: Ic46c256141d27ca28f30023bcc40f4e1161d5338
Add support for AnyThread, CallSuper, and UiThread.
Another related CL started documenting @RequiresPermission, so remove
duplicated information in existing APIs.
Suppress auto-doc on a handful of classes that are already
well-documented.
Test: make -j32 offline-sdk-docs
Bug: 37526420
Change-Id: I791437dccec0f11d5349a23b982ba098cb551af8
Resources#getDrawableForDensity now propagates the overridden
density through to AdaptiveIconDrawable so that the density can be
propagated to leaf BitmapDrawables correctly.
This enables AdaptiveIconDrawable to support higher resolution
foreground/background bitmaps for use in Launcher.
Bug: 36039665
Test: bit CtsContentTestCases:android.content.res.cts.ResourcesTest
Change-Id: Iaa9a5592626e38e1ff839a76f7c6cfb9e16e5dc1
As requested by API council, mention that the provider may
return its own error codes within the positive int range.
Bug: 37084803
Test: none
Change-Id: Ia8ee99432cc5025a12d43049e327605095dd2b57
This regression is a fallout from the recent API council feedback
fallout. The default color space used to be always set to null but
it's now the named SRGB instance. This change passes null to native
when the specified color space is known to be sRGB.
Bug: 37496760
Test: runtest managed-provisioning
Change-Id: Ie933c84e429a682a58ee253b57b77bd61b88ee5e
Bug: 37495696
Test: cts-tradefed run singleCommand cts-dev --module CtsGraphicsTestCases --test android.graphics.cts.ComposeShaderTest
Adds back the verify step that discards a stale native ComposeShader if a child
changes.
Change-Id: I44f40c1edfdb7633994a69efb583cf28ee2c26b2
Add comment to Typeface.Builder about the responsibility of closing
file descriptor.
Bug: 37082657
Test: N/A
Change-Id: Id33b15895d75ad6693f3ad6231f1ba0c2cec9f79
Reusing a bitmap with BitmapRegionDecoder would preserve the
previous color space. This change also tweaks color space
matching to make sure we pick Display P3 with parameter d=0.039
or d=0.04045
Bug: 36905374
Test: CtsGraphicsTestCases
Change-Id: I4d2d66e5babebb0b5ce5cbdc7e8244177b4b7f9c
- Update Paint's description to be the same description as TextView.
- Update example code to use more standard axes.
- Check generated reference page and fix some errors.
Bug: 37324923
Test: Checked generated reference page.
Change-Id: Ib6504df3bd149fd47f037f8d03701b2167d10e5a
This allows applications to load bitmap in a preferred
target color space, similar to inPreferredConfig for
configurations.
This change also applies recent changes made to BitmapFactory
to BitmapRegionDecoder: support for outColorSpace, inColorSpace
and outConfig.
Bug: 32984164, 36905374
Test: CtsGraphicsTestCase (BitmapColorSpaceTest/BitmapRegionDecoderTest)
Change-Id: I4eded9190d1aa9c7f3033f9bb78a6854cc48a3ef
The boot loop was seen after I65e220aca823fd815a52437b11c8e6dc952de8e2
but only on Android Wear. On Android Wear, some font files are missing
but are listed in fonts.xml. Before that patch, we created a Typeface
object with an empty FontFamily even if there was no valid font entry
in font-family tag. However, after that patch, FontFamily stopped
creating native objects and holds a null pointer instead. As the
result, SIGSEGV happens.
The right fix is skipping Typeface creation if native code failed to
create the font family object.
Since Typeface.init cannot be called twice, this is hard to test
automatically.
Bug: 37328609
Bug: 37326002
Test: Boot succeeded even after removing CutiveMono.ttf from system.
Change-Id: I125de07343252784986d728c3bbaa46b24ace601
If the developer gives some weight/italic to the Typeface.Builder
the fallback used the metadata in the font file. We should use
provided data instead.
This CL also adjusts upper and lower limits on weight, from 100..900 to
1..1000
Bug: 37257745
Bug: 37251569
Test: android.graphics.cts.TypefaceTest passes
Change-Id: I7cf390d96b49afcce359928373698b0c9a9babd8
Our native code uses floats for transfer parameters, the range
check was too small (using the next representable double instead
of the next representable float).
Bug: 37013532
Test: Manual run of broken app, CtsGraphicsTestCases
Change-Id: Id91a3e62068be0abf13ee75e39c758eb106a5f24
setFallbackTypeface is returned by Builder.build() method when the
provided font is not loaded due to some reasons.
The fallback family is resolved with width/italic passed to Builder.
Bug: 36794225
Test: android.graphics.cts.TypefaceTest passes
Change-Id: I65e220aca823fd815a52437b11c8e6dc952de8e2
Since background fetch should be synchronized with life cycle of
Activities, so should not create new background thread inside this
method. Not to break existing apps, mark as deprecated and will be
removed from public API untile next release.
New API accepts Handler so that the developer can pass their own thread
.
Test: TBD
Bug: 37253785
Change-Id: I87fdc6a354a829db679253824f42489f25698fa0