This API is necessary for identifying the cursor locations.
Bug: 112327179
Test: atest android.graphics.cts.PaintTest
Change-Id: Ief6770bd622a296ae356094fe3ce58e9c4371088
This is necessary for getting individual character advances.
The only char[] version of getTextRunAdvances is used, so removing
String/CharSequence versions.
Bug: 112327179
Test: atest android.graphics.cts.PaintTest#testGetTextRunAdvances
Change-Id: Ic49a4742cccb2a5155f6afacef3555e29c7a061c
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.
Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.
Bug: 115609023
Test: m
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
Creating HashSet and LocaleList in Zygote make performance impact
to the boot time. Since this API is not called so frequently and less
application is expected to call this API. So let's make Set and
LocaleList only when it is requested.
Here is a result of boot time perf test:
Before: TOTAL_BOOT_TIME : 16229.5
After : TOTAL_BOOT_TIME : 11704.0
Bug: 114774424
Test: atest android.graphics.fonts
Test: atest TypefaceSystemFallbackTest
Change-Id: I07247a78f6091c8adfaac748fe4a77a4597b1ae2
Now we have Font class. It is good to move max weight constant from
Typeface to Font.
Bug: 112327179
Test: atest FontTest
Change-Id: I3946ac150a02bf0cafa0fc81e61e69c31b45ed1d
These APIs are necessary to implement hyphenation by third party developers.
Bug: 112327179
Test: atest android.graphics.cts.PaintTest#testSetGetHyphenEdit
Change-Id: I692a56d3d1b15100503eb6d8e0f59d6c5c8af81b
To be able to use font file in their apps, provides blob and path to the
font file and locale list as well.
Bug: 26116537
Test: atest CtsWidgetTestCases:EditTextTest
CtsWidgetTestCases:TextViewFadingEdgeTest
FrameworksCoreTests:TextViewFallbackLineSpacingTest
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
CtsTextTestCases FrameworksCoreTests:android.text
CtsWidgetTestCases:TextViewPrecomputedTextTest
CtsGraphicsTestCases:android.graphics.font
Change-Id: I1ae1302c6906b808012e1e91b1e4ab393c887cb6
Following APIs are used by the text stack, and there is no reason for
them to be hidden. Make them public.
- getStrikeThruPosition
- getStrikeThruThickness
- getUnderlinePosition
- getUnderlineThickness
- getWordSpacing
- setWordSpacing
Bug: 112327179
Test: m docs
Test: atest android.graphics.cts.PaintTest
Change-Id: I651a5d620968fedcff2059e0e0694aa4ee770014
Renamed getStateDrawableIndex to findStateDrawableIndex
based on API review feedback.
Change-Id: If07fe279fb02bc8180a28c7f58ea84ca030773ad
Fixes: 113856171
Test: Re-ran CTS
Marked Insets class as final and added nullability
annotations for static factory methods
Change-Id: Id2092704e0e464bf783a5f33a90cad2e37972b57
Fixes: 113855954
Test: re-ran CTS test cases
Typeface.Builder2 is a new builder class for creating Typeface from
FontFamily object.
Bug: 72665240
Test: atest CtsWidgetTestCases:EditTextTest
CtsWidgetTestCases:TextViewFadingEdgeTest
FrameworksCoreTests:TextViewFallbackLineSpacingTest
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
CtsTextTestCases FrameworksCoreTests:android.text
CtsWidgetTestCases:TextViewPrecomputedTextTest
CtsGraphicsTestCases:android.graphics.fonts
Change-Id: Ib6fff07e97e9b3370d1d7e6351f1697fb29a91d5
This is needed as the Permission Controller needs to get the icons for
permissions declared by 3rd party apps.
Bug: 110953302
Test: Built
Change-Id: I3fa643ad46150283c33c8fac918df158ed9b5a30
ColorStateListDrawable did not implement #mutate correctly. This adds an
implementation for it.
Change-Id: I823b2096194ebc4e3424283ad5bad9d0f8df10df
Fixes: 113099852
Test: atest ColorStateListDrawable
Previously, you could not use references to colors in places that
expected a Drawable. This new class, ColorStateListDrawable bridges the
gap by attaching a ColorStateList to a ColorDrawable, and hooks it into
resource loading wherever you might expect a Drawable.
Fixes: 18126411
Test: Unit tests to be added to CTS
Change-Id: I0ff9a089669da96e6b22b214f04d6726bc278152
Previous change I69e21940eaec4427f62abe59ae003b4f60855f22
did not handle the case of missing /system/etc/fonts.xml
This happens on roboletric test and crash with NPE.
Bug: 112843740
Test: N/A
Change-Id: I6d183dab9af66abf777f2e5b1fa633ff979fea55
- Change Font/FontFamily final
- Introduce equals/hashCode to Font class
-- Add equals and hashCode to FontVariationAxis as well
- Rename FontFamily.getFontCount to FontFamily.getSize
- Change Font ctor not to throw IOException and throw that in build()
instead.
Bug: 112303038
Test: atest CtsWidgetTestCases:EditTextTest
CtsWidgetTestCases:TextViewFadingEdgeTest
FrameworksCoreTests:TextViewFallbackLineSpacingTest
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
CtsTextTestCases FrameworksCoreTests:android.text
CtsWidgetTestCases:TextViewPrecomputedTextTest
CtsGraphicsTestCases:android.graphics.fonts
Change-Id: I079c99cfd579d07b6f3643e41415e58dc8b26492
This CL is a ground work of the new Typeface construction API and
nobody uses this class except for CTS now.
I'll add new builder in Typeface to be able to create Typeface
from this FontFamily.
Bug: 72665240
Test: atest FontFamilyTest
Test: CtsWidgetTestCases:EditTextTest
CtsWidgetTestCases:TextViewFadingEdgeTest
FrameworksCoreTests:TextViewFallbackLineSpacingTest
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
CtsTextTestCases FrameworksCoreTests:android.text
CtsWidgetTestCases:TextViewPrecomputedTextTest
Change-Id: I15d412c367037554d911fc9e20c0cfb44aefb89a
For packages:
android.graphics
android.graphics.drawable
android.graphics.drawable.shapes
android.graphics.fonts
android.graphics.pdf
This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 110868826
Test: m
Change-Id: I7fc1162d2c63df8751a4660607e8ce72070efed8
This CL is a ground work of the new Typeface construction API and
nobody uses this class except for CTS.
I'll add FontFamily class to be able to bundle these Font clases
and register to the Typeface.
Bug: 72665240
Test: atest FontTest
Test: atest CtsWidgetTestCases:EditTextTest
CtsWidgetTestCases:TextViewFadingEdgeTest
FrameworksCoreTests:TextViewFallbackLineSpacingTest
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
CtsTextTestCases FrameworksCoreTests:android.text
CtsWidgetTestCases:TextViewPrecomputedTextTest
Change-Id: I68555a8b4bd6dd770ba7baae72d9a3777b2087a5
FontFileUtil provides style analysis of font file.
This CL also introduce a basic test functionality of font families.
Test: atest android.graphics.FontFileUtilTest
Bug: 72665240
Change-Id: I967d56eb37ee0e4c6d59f59c301a4a6f009fad2d