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
With this change, different languages can have a different minimum
length for suffix and prefixes when hyphenating. Previously, the
defaults used for English, 2 and 3, were used for every language.
Bug: 35712376
Test: Manual: German text can now break after two characters
Change-Id: Ia12d448a42bf2fab7c0bf5e85f8e27a4fb7f77d8
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
Patterns for Bulgarian (bg) and Church Slavonic (cu) are now loaded
too.
Also make changes to fontchain_lint.py, so it knows the script for Bulgarian
and Church Slavonic is Cyrillic.
Test: make -j works and creates .hyb files for bg and cu
Change-Id: I0586f6c49380279ef88fe952b5cfd2d3594c5524
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
Reverts the change which adds a gesture detector in
TextView for detecting clicks on ClickableSpans. A click
is considered MotionEvent.ACTION_UP. Revert needed because
the singleTapUp refactoring has a potential to break
existing apps.
Bug: 23692690
Test: attached in the same topic
Change-Id: Ife47fd0608480130123091bc60a7e9dd1efe8785
The previous implementation assumed ASCII digits, and a fixed set of
separators and signs.
The following classes have been internationalized: DigitsKeyListener,
DateKeyListener, TimeKeyListener, and DateTimeKeyListener.
DialerKeyListener is not modified yet, due to concerns about the
handling of non-ASCII digits by dialing-related parts of Android.
Even with this CL, characters outside BMP and multi-character signs
and decimal separators are still not supported, due to limitations in
android.view.KeyEvent and android.view.KeyCharacterMap.
Test: cts-tradefed run cts-dev --module CtsTextTestCases --test android.text.method.cts.*KeyListenerTest
Bug: https://code.google.com/p/android/issues/detail?id=2626
Bug: https://code.google.com/p/android/issues/detail?id=82993
Bug: 8319249
Bug: 33276673
Bug: 33643035
Bug: 34394455
Change-Id: I1cf87d0d9d1b383f5265c07ecd63b5767f9a68ca
Package change from android.text to android.view.textclassifier.
This change was delayed until the native library code was updated
to reflect this package change.
Test: cts-tradefed run cts-dev -m CtsViewTestCases -t android.view.textclassifier.cts.TextClassificationManagerTest
Bug: 34777495
Change-Id: I723aaf79f8fbed4758bb4ee6727dfb6a8e35bf99
This introduces an API for apps that support companion devices to provide a
more streamlined flow for pairing and setting up the device
Bug: 30932767
Test: Using a toy app, invoke the newly introduced API (CompanionDeviceManager),
and go through the flow. Ensure filtering works, and device is returned to
the calling app. Ensure the calling app can pair to the selected device.
Change-Id: I0aeb653afd65e4adead13ea9c7248ec20971b04a
Previously (post Android N) we decided to introduce
a gesture detector in textView and trigger the onClick()
over a clickable span when onSingleTapConfirmed was
called. The problem is that onSingleTapConfirmed also
waits for double tap timeout to make sure (to confirm).
This has a chance to break some apps so relax the
rule to only look for onSingleTapUp.
* the bug for which the initial change was made is
still fixed
* slightly amended the ClickableSpan JavaDoc to
specify that the onClick gets triggered if the
span is selected when clicked (note that this
behavior is unchanged since ClickableSpan exists,
added just an extra hint to devs)
Bug: 23692690
Test: in the attached CL (same topic)
Change-Id: Iead434aa558301d61879c27edc48dc4148ca187f
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
Rename to TextClassifier
Move to android.view.textclassifier package
Adds getTextClassifierInfo(...)
Changes addLinks(...) to getLinks(...)
This CL also integrates this interface with framework components
and passes a context to TextClassificationManager.
Test: Tests will be added with implementation.
Bug: 34661057
Change-Id: If9e90f034ebb702c1f78e72b6a844f39eebf738f
Add cached int buffers for sorting.
Test: All CtsTextTestCases
Merged-In: Ice0b3c3fffc541b26aca94c93fd01e30e13efe2e
Bug: 33609774
Change-Id: Ib728654a384cfc072d1c190611e4553aa8957fa8
This change creates a new FontManagerService, in charge of providing
font management data. It exposes a public API to retrieve the
information in fonts.xml without accessing it directly. To do this,
it also refactors FontListParser's internal classes into a new public
FontConfig class holding all the font data.
getSystemFonts() returns all the available information in fonts.xml
as well as file descriptors for all the fonts. This allows us to
share the memory consumed by these files between all clients.
Bug: 34190490
Test: See attached CTS change in topic
Change-Id: I0e922f8bcc9a197a1988d04071eb485328d66fb7
- This service provides the TextClassificationManager access to the
classification model file.
See: Icb82b707c9c1b4dcb739f44d888bbc43bc3b03bb
- This service is started at boot time.
See: Ie4a597bc5c6c4140afbcf7feaa9dd237a3fd5fef
Test: Manually tested. Also see: Ic2a5eceeaec4cd2943c6c753084df46d30511fee
Bug: 32503402
Change-Id: Ic428d00f291e268211866b3fc6b7acbc3eb04e1e
At line break, one offset can be mapped to two phisical
position: previous line end and next line start.
Previously, all cursor handles are placed at next line
start.
With this CL, selection end handle is placed at the
previous line end in such cases.
Test: FrameworksCoreTests
Bug: 21305922
Change-Id: I00d9f9a0cd417ca92534e93b3d3f655cd62f25d3
Adds a new get/setJustify API to TextView and StaticLayout.Builder for
justification, and fully justifies text when it's enabled.
This is based on a patch by Raph Levien (raph@google.com).
Bug: 31707212
Test: Manually done and CTS will introduced with
I0f3bbf39d60a66b71b30e1351f7c741208f05dce passes.
Change-Id: Icbfab2faa11a6a0b52e6f0a77a9c9b5ef6e191da
An earlier patch (I4d09576a31df551c96f820242fd2cbc675506dae)
special-cased apostrophe as a character to defer spellchecking on,
since it could cause a word break which could later get removed.
This patch updates that earlier patch to include all characters that
could cause such a behavior according the Unicode word breaking
algorithm defined in UAX #29.
Bug: 17641350
Bug: 17673522
Test: manual
Change-Id: I4029e3d91dfcf96665b003f6fdd30d1208b0ac7c
Previously, AndroidBidi was used instead, whch did a lot of extra work
just to detect a paragraph's direction. TextDirectionHeuristics stops as
soon as the direction is found, and avoids JNI too.
Bug: 21455837
Test: cts-tradefed run cts-dev --module CtsTextTestCases --test android.text.cts.HtmlTest
Change-Id: Iea196fb5ca43dca99e65a367a2da701b1c1b98b8
Previously, we were using native strings. ICU has higher quality and
more comprehensive data.
Also adds parameters for specifying the format width (e.g. "2 hrs" vs
"2 hours").
Bug: 31526474
Test: adb shell am instrument -w -e class android.text.format.DateUtilsTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I754f6c761c2ed3853046796c57ff2d86a6ccd43e