Commit Graph

1261 Commits

Author SHA1 Message Date
Joachim Sauer
0d25e75d92 Merge "Remove use of MeasureUnit.internalGetInstance" 2017-09-18 10:37:47 +00:00
Joachim Sauer
aa5629e608 Remove use of MeasureUnit.internalGetInstance
MeasureUnit.internalGetUnit() is a method on ICU MeasureUnit which is
used to construct and register MeasureUnits. Calling it from non-ICU
code makes future calls to MeasureUnit.getAvailable(type) return the
newly-created MeasureUnit, but that MeasureUnit will not be fully
supported by ICU (no translations, ...).

This code creates a MeasureUnit by calling a constructor reflectively to
avoid the registration, which is a workaround.

The correct long-term fix is for ICU/CLDR to support petabyte correctly
(http://bugs.icu-project.org/trac/ticket/13355) and for us to just use
that instead.

Bug: 65632959
Test: bit CtsIcuTestCases:android.icu.dev.test.format.MeasureUnitTest
Test: coretests android.text.format.FormatterTest
Change-Id: I494fb59a3b3742f35cbdf6b8705817f404a2c6b0
2017-09-15 18:07:17 +01:00
Yohei Yukawa
1e88a603c9 Merge "Fix conflicting JavaDoc of TYPE_TEXT_FLAG_NO_SUGGESTIONS" into oc-mr1-dev am: 7bbe06231f
am: c6e9e15b4f

Change-Id: I92dd5fd0d4771d99fd0932cfa2e709ac6e9ec8cb
2017-09-15 14:10:09 +00:00
Yohei Yukawa
71803994a3 Fix conflicting JavaDoc of TYPE_TEXT_FLAG_NO_SUGGESTIONS
TYPE_TEXT_FLAG_NO_SUGGESTIONS is just a hint and does not mean
IME should never show a UI to display suggestions.

This CL makes that point clear in JavaDoc.

Test: checkbuild
Bug: 35875399
Bug: 38139781
Bug: 38184682
Fixes: 65693181
Change-Id: Id0c3b6bc05689a5f1c8b52637664f59d45850a60
2017-09-14 23:59:18 +00:00
Petar Šegina
8f1f74e239 Move consumer call outside of the branch
Test: bit FrameworksCoreTests:android.text.LayoutTest
Change-Id: I4fae9d2b16c22e7ab3856959edc5a57f4276f22f
2017-09-08 14:22:33 +01:00
Petar Šegina
3a92fb632b Move IntDef constant definitions outside of the annotation
Constant definitions do not currently work in bat_land - they are not
reachable from the test, thus breaking the build.

Test: lunch bat_land && make tests
Test: bit FrameworksCoreTests:android.text.LayoutTest
Bug: 65449093
Change-Id: I6c71fe13fc86a8e2a17e49b16fd558c6714c6f5b
2017-09-08 11:33:28 +00:00
Petar Šegina
b92c539232 Emit text direction with selection rectangle
In order to properly perform the smart select animation on right-to-left
and mixed text, we need the information about the direction of the text
that is present below the selection rectangle.

Test: manual - verify selection still works and that the generated
directions match the directions of the text on the screen
Test: bit FrameworksCoreTests:android.text.LayoutTest

Change-Id: I564ee2db59ab583c9bff807ad0d0dfeacaf1386f
2017-09-06 15:58:38 +01:00
Seigo Nonaka
749e57e5c3 Implement LineBreaker callback and fix indent repeating.
The last indent should be repeated, so we need to pass an int array
instead of null even if the indent offset is out of array length.

Bug: 65024629
Test: bit CtsTextTestCases:android.text.cts.StaticLayoutTest
Test: bit CtsTextTestCases:android.text.cts.DynamicLayoutTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Bug: 65024629

Change-Id: Ic1274d797db27ae1921135a27bab55e475369710
2017-08-30 14:57:50 -07:00
TreeHugger Robot
bb680861b9 Merge "Clean Up: remove nSetIndents" 2017-08-29 03:20:06 +00:00
Seigo Nonaka
bafe197678 Clean Up: remove nSetIndents
The motivation of this clean up is:
- Use the precomputed indents for all paragraphs.
- Pass the indents as a part of setup paragraph since indents are a
  per-paragraph parameter.
- Remove the nSetIndents call from Builder.setIndents since indents will
  be overwritten in generate() function.

Bug: 65024629
Test: bit CtsTextTestCases:android.text.cts.StaticLayoutTest
Test: bit CtsTextTestCases:android.text.cts.DynamicLayoutTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: Ie49d14a38654280bdae8d0e40441cc877c5185b2
2017-08-28 11:51:46 -07:00
Roozbeh Pournader
53aba29e42 Correct missed use of work paint for hyphenation
The change in I0b95a10c05711350950d6c8d6501f6af9414d413 copied the
Paint to a work paint to make sure we don't modify it, but missed
actually using that Paint, resulting in hyphenation basically getting
ignored in getLineExtent().

Now we correctly pass the work paint to the TextLine used.

Change-Id: Ida89ba2b11d35d93012abb0adf9bb29d1b09c2d2
Fixes: 64998667
Bug: 33388205
Bug: 64452136
Test: bit FrameworksCoreTests:android.widget.TextViewTest
Test: bit FrameworksCoreTests:android.text.
Test: bit CtsTextTestCases:android.text.cts.
2017-08-25 15:53:33 -07:00
Roozbeh Pournader
c4c3a0f5a9 Merge "Support fallback linespacing in DynamicLayout" 2017-08-24 18:38:00 +00:00
Roozbeh Pournader
612e67323f Merge "Add a builder for DynamicLayout and switch TextView to it" 2017-08-24 17:39:14 +00:00
Roozbeh Pournader
15b213d556 Support fallback linespacing in DynamicLayout
Bug: 28963299
Test: bit FrameworksCoreTests:android.text.
Change-Id: I132499d5927b26fb45522ffee99bac12aca3721f
2017-08-23 16:34:25 -07:00
Roozbeh Pournader
22a167cac8 Add a builder for DynamicLayout and switch TextView to it
The builder mostly copies the structure and the logic of
StaticLayout.

We also improve various parts of code and documentation in
StaticLayout's builder.

Bug: 28963299
Test: bit FrameworksCoreTests:android.text.
Test: bit FrameworksCoreTests:android.widget.TextViewTest
Test: bit CtsTextTestCases:*
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.EditTextTest
Change-Id: I5c4a6e031bd0f41f765a3d85e0b9b7e9be42ad4b
2017-08-23 15:05:06 -07:00
Siyamed Sinir
261118009d StaticLayout capped height should be 0 when maxLines=0
Previously we added mMaxLineHeight to track the line height at the
maxLines value. However when maxLines is set to zero, mMaxLineHeight is
not calculated and remains 0. When maxLines is set to zero, the capped
height of the layout should be 0.

Test: Added a test case to coretests/StaticLayoutTest
Test: bit FrameworksCoreTests:android.text.StaticLayoutTest
Test: bit FrameworksCoreTests:android.text.DynamicLayoutTest
Test: bit FrameworksCoreTests:android.text.StaticLayoutLineBreakingTest
Test: bit FrameworksCoreTests:android.text.StaticLayoutBidiTest
Test: bit FrameworksCoreTests:android.text.StaticLayoutTextMeasuringTest
Test: bit FrameworksCoreTests:android.text.StaticLayoutDirectionsTest
Test: bit CtsTextTestCases:android.text.cts.StaticLayoutTest
Test: bit CtsTextTestCases:android.text.cts.DynamicLayoutTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest

Bug: 64822158
Change-Id: Id9240ee7b893f8af9cd0d91329617c24da80c7d2
Merged-In: a8d982d6c8
(cherry picked from commit a8d982d6c8)
2017-08-21 19:22:58 -07:00
Siyamed Sinir
72093af5c2 Reset StaticLayout.mEllipsized during generate()
StaticLayout.mEllipsized and mMaxLineHeight was set for proper
calculation of static ellipsized text height. However, since
DynamicLayout uses a static instance of StaticLayout, and nobody reset
the mEllipsized, this caused configuration discrepancies for different
DynamicLayout instances.

Test: bit -t CtsTextTestCases:android.text.cts.DynamicLayoutTest
Test: bit -t CtsTextTestCases:android.text.cts.StaticLayoutTest
Bug: 64372088
Change-Id: I8ea6697d29da2ccbb433b64f17b4d1d6f254e8e1
Merged-In: a19cd51d2c
(cherry picked from commit a19cd51d2c)
2017-08-21 19:20:50 -07:00
Siyamed Sinir
a8d982d6c8 StaticLayout capped height should be 0 when maxLines=0
Previously we added mMaxLineHeight to track the line height at the
maxLines value. However when maxLines is set to zero, mMaxLineHeight is
not calculated and remains 0. When maxLines is set to zero, the capped
height of the layout should be 0.

Test: Added a test case to coretests/StaticLayoutTest
Test: bit FrameworksCoreTests:android.text.StaticLayoutTest
Test: bit FrameworksCoreTests:android.text.DynamicLayoutTest
Test: bit FrameworksCoreTests:android.text.StaticLayoutLineBreakingTest
Test: bit FrameworksCoreTests:android.text.StaticLayoutBidiTest
Test: bit FrameworksCoreTests:android.text.StaticLayoutTextMeasuringTest
Test: bit FrameworksCoreTests:android.text.StaticLayoutDirectionsTest
Test: bit CtsTextTestCases:android.text.cts.StaticLayoutTest
Test: bit CtsTextTestCases:android.text.cts.DynamicLayoutTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest

Bug: 64822158
Change-Id: I5a2a40661501b5778ef8687b342f3e790c6f716a
2017-08-21 15:50:54 -07:00
Roozbeh Pournader
737dfead64 Support extra linespacing based on fallback fonts
* Increase the ascent and descent of individual lines in StaticLayout
  as needed, if any fallback fonts that end up getting used call for
  it. For backward compatibility, this is hidden behind a builder
  flag.
* Document in Paint.java that the returned parameters are only for
  the default font, and a layout may need more space based on
  fallbacks used.

Also update for changes in minikin API:

* MinikinFont now requires a method for getting vertical extents
  (ascent, descent, and line gap).
* minikin API now allows asking for vertical extents of laid out
  text.
* minikin API's LineBreaker now returns ascents and descents for each
  line.

Finally, added performances test for creating a StaticLayout.
Follwing are the numbers on a marlin with a stable clock before and
after this CL.

For fixed text almost always hitting the cache:
Before: mean=260684 median=260188 min=258532 standardDeviation=1897
After:  mean=262432 median=261509 min=260429 standardDeviation=2185

For random text almost never hitting the cache:
Before: mean=5971827 median=5991126 min=5886871 standardDeviation=83724
After:  mean=6337093 median=6317010 min=6311222 standardDeviation=40213

Bug: 28963299
Bug: 29063863
Bug: 32057121
Bug: 37756858
Test: bit FrameworksCoreTests:android.text.
Test: bit CtsTextTestCases:*
Change-Id: I482a98ff8f472e8bab4f0ba9d1d7b368858038ff
2017-08-17 12:10:31 -07:00
Roozbeh Pournader
c9c6ee667f Merge "Support multiple languages per font in fonts.xml" 2017-08-11 23:27:50 +00:00
Roozbeh Pournader
99975a3e25 Support multiple languages per font in fonts.xml
Minikin already supports multiple languages specified per font in
I7f13b51464c9b01982bb573251d77052b9ddbd70. This CL adds a couple of
such cases into fonts.xml and clarifies in the method and the
variable names and parameters that the frameworks is handling a
multi-language string when it is.

Fixes: 26687969
Test: make -j checkbuild
Test: bit FrameworksCoreTests:android.graphics.TypefaceSystemFallbackTest
Change-Id: Ifa540a95f87921983f9069330d1dd0892538a8df
2017-08-11 12:34:26 -07:00
Petar Šegina
01f05dd3d1 Merge "Add getSelection(..., RectangleConsumer) to Layout" 2017-08-10 10:49:45 +00:00
Petar Šegina
fb748b357c Add getSelection(..., RectangleConsumer) to Layout
In order to generate the Smart Select animation, we need a list of
rectangles which represent a given selection. The current
getSelectionPath code can only fill out a Path, which loses the
rectangle information in the process.

Instead of working directly with a Path, a RectangleConsumer is
introduced, which is an abstraction over an element that can accept
rectangles (for example, a Path or a List<Rect>).

getSelectionPath is now implemented with this new method using a simple
consumer which takes the rectangles and feeds them to the path.

Test: cts-tradefed run cts-dev -m CtsWidgetTestCases -d -t android.widget.cts.TextViewTest#testGetFocusedRect
Test: manual - verify text selection still works
Change-Id: I32a24f237a4b1b89df23c982fe06566f30fec464
2017-08-09 21:14:37 +01:00
TreeHugger Robot
f54f1f06a1 Merge "Make sure Layout doesn't modify the paint" 2017-08-09 19:40:49 +00:00
TreeHugger Robot
b5380b0066 Merge changes from topic 'time_format_settings'
* changes:
  Extract is24HourLocale method.
  Allow null value for TIME_12_24 setting.
2017-08-09 19:06:47 +00:00
Joachim Sauer
20c5ef73ca Extract is24HourLocale method.
This method is needed in settings to avoid code duplication.

Add a test to verify that is24HourLocale does not take the 12/24h clock
system setting into account.

Bug: 32761619
Test: bit CtsTextTestCases:android.text.format.cts.DateFormatTest
Test: adb shell am instrument -w -e class android.text.format.DateFormatTest \
        com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I21a871c11149550c7cf91aea299724a8b4fbff78
2017-08-09 20:04:44 +01:00
Makoto Onuki
43af9beff3 Merge "Intern process names." into oc-mr1-dev am: a530d79209
am: 3debaa72d4

Change-Id: Iaa2fe2ca2d7680b99f170f2486b3018704e45432
2017-08-09 01:51:41 +00:00
Roozbeh Pournader
b1f0365dc4 Make sure Layout doesn't modify the paint
Previously, Layout would modify the HyphenEdit of the Paint passed to it
for its internal operations, potentially leaving the Paint in a different status than when
it was created. Now we use an internal copy of the Paint to modify.

Fixes: 64452136
Test: bit CtsTextTestCases:android.text.cts.
Test: bit FrameworksCoreTests:android.text.
Change-Id: I0b95a10c05711350950d6c8d6501f6af9414d413
2017-08-08 16:21:46 -07:00
Makoto Onuki
812d188afb Intern process names.
Bug: 62144301
Test: Boot and start random apps on a secondary user
Change-Id: I8a9b475410c52e1063cff5519b0297ad69dd7925
2017-08-08 14:58:48 -07:00
TreeHugger Robot
891f481ef8 Merge "Refactoring: Deprecate Paint.mNativeTypeface." 2017-08-08 19:48:05 +00:00
Seigo Nonaka
318ca04079 Refactoring: Deprecate Paint.mNativeTypeface.
Bug: 64269689
Test: m checkbuild
Test: bit CtsGraphicsTestCases:*
Test: bit CtsViewTestCases:*
Test: bit CtsTextTestCases:*
Change-Id: Idc9f2b4612741be949204cd06efc41e1738d6587
2017-08-08 18:07:28 +00:00
Roozbeh Pournader
e88b5df5b7 Make ellipsize retry if text doesn't fit
This fixes the cases where the replacement of parts of text with
ellipsis may result in more-than-expected width of text due to
contextual width changes in the font, such as kerning or Arabic
shaping.

The calculations in TextUtils.ellipsize() and StaticLayout are fixed
to recalculate the new width and reduce it further until the text
actuall fits. BoringLayout and DynamicLayout get fixed too since
they use the other two implementations indirectly.

Also reverse a recently-introduced incorrect check for
multi-character ellipsis in Layout.java.

Fixes: 31537595
Fixes: 64156587
Test: Manual (Arabic edge cases ellipsize correctly)
Test: bit CtsTextTestCases:*
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.EditTextTest
Test: bit CtsWidgetTestCases:android.widget.cts.CheckedTextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.AutoCompleteTextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.MultiAutoCompleteTextViewTest
Test: bit FrameworksCoreTests:android.text.
Test: adb shell am instrument -w com.android.documentsui.tests/android.support.test.runner.AndroidJUnitRunner
Change-Id: Iaddcc8b01c78d477e2c29b339d321c9631426f34
2017-08-07 16:22:00 -07:00
Siyamed Sinir
a19cd51d2c Reset StaticLayout.mEllipsized during generate()
StaticLayout.mEllipsized and mMaxLineHeight was set for proper
calculation of static ellipsized text height. However, since
DynamicLayout uses a static instance of StaticLayout, and nobody reset
the mEllipsized, this caused configuration discrepancies for different
DynamicLayout instances.

Test: bit -t CtsTextTestCases:android.text.cts.DynamicLayoutTest
Test: bit -t CtsTextTestCases:android.text.cts.StaticLayoutTest
Fixes: 64372088
Bug: 64312574
Change-Id: I8ea6697d29da2ccbb433b64f17b4d1d6f254e8e1
2017-08-07 15:35:06 -07:00
TreeHugger Robot
b186823314 Merge "Improve TextView.onMeasure() for multiline text." 2017-08-04 19:24:01 +00:00
Seigo Nonaka
917748ef50 Improve TextView.onMeasure() for multiline text.
Previously, measures all paragraph for deciding view width.
However, in case AT_MOST measurment, we can stop calculating measure if
the measured paragraph already exceeds the upper limit.

Bug: 64389125
Test: bit CtsWidgetTestCases:*
Test: CorePerfTest. Here is a result before and after this patch.

Before:
INSTRUMENTATION_STATUS: measure_AtMost_median=50332114
INSTRUMENTATION_STATUS: measure_Exactly_median=28276317
INSTRUMENTATION_STATUS: measure_Unspecified_median=50193036

After:
INSTRUMENTATION_STATUS: measure_AtMost_median=28475187
INSTRUMENTATION_STATUS: measure_Exactly_median=26944710
INSTRUMENTATION_STATUS: measure_Unspecified_median=50880088

Change-Id: I2a39eb39817a8f845c4fa2e174a905a2d057096e
2017-08-04 17:21:06 +00:00
Roozbeh Pournader
55fd45b273 Reverse check for multi-character ellipsis
Reverse a recently-introduced incorrect check for multi-character
ellipsis in Layout.java. The check was introduced in
Id1dfdc503f87fabed2447d55ab2107eee0eccd08.

Test: bit CtsTextTestCases:*
Test: bit FrameworksCoreTests:android.text.
Change-Id: I79198be0bd202a303f8db02a235c2af3b76abf32
2017-08-03 14:01:09 -07:00
TreeHugger Robot
8eee5e31fe Merge "Revert "Make ellipsize retry if text doesn't fit"" 2017-08-03 02:22:09 +00:00
Roozbeh Pournader
7f0ebc944d Revert "Make ellipsize retry if text doesn't fit"
This reverts commit 1051bbe325.

Bug: 64312574
Change-Id: I6a3456172e22e94df30dcbe90988db8592886a78
2017-08-02 22:47:14 +00:00
Roozbeh Pournader
b8eccd82e1 Merge "Make InputFilter.AllCaps constructor reject null locales" into oc-mr1-dev am: 6e8e322ea1
am: 6359944a19

Change-Id: Ib5064f4be5fd73c76ad99547746bb1cb6534c2bd
2017-08-02 21:32:44 +00:00
Roozbeh Pournader
4e5e15a6ea Make InputFilter.AllCaps constructor reject null locales
In I021ff2a97a60396fb1b6e4940d91d3cd6ccb6196, new API for
InputFilter.AllCaps was added. It accepted null as input. This CL
changes that so null locales would be rejected.

Test: bit CtsTextTestCases:android.text.cts.InputFilter_AllCapsTest
Fixes: 64261334
Bug: 37222101

Change-Id: Ic87942c3f341f71bc3c1c833b52ea3e751461e47
2017-08-02 10:37:07 -07:00
Roozbeh Pournader
1051bbe325 Make ellipsize retry if text doesn't fit
This fixes the cases where the replacement of parts of text with
ellipsis may result in more-than-expected width of text due to
contextual width changes in the font, such as kerning or Arabic
shaping.

The calculations in TextUtils.ellipsize() and StaticLayout are fixed
to recalculate the new width and reduce it further until the text
actuall fits. BoringLayout and DynamicLayout get fixed too since
they use the other two implementations indirectly.

Also reverse a recently-introduced incorrect check for
multi-character ellipsis in Layout.java.

Fixes: 31537595
Fixes: 64156587
Test: Manual (Arabic edge cases ellipsize correctly)
Test: bit CtsTextTestCases:*
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.EditTextTest
Test: bit CtsWidgetTestCases:android.widget.cts.CheckedTextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.AutoCompleteTextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.MultiAutoCompleteTextViewTest
Test: bit FrameworksCoreTests:android.text.
Test: adb shell am instrument -w com.android.documentsui.tests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I74fdaa9bf32dc2064eeb702f7f9b78b2bb856c26
2017-08-01 17:58:30 -07:00
Siyamed Sinir
8b7053dd45 Merge "Fix EditText cursor when line spacing is set" 2017-08-01 22:37:55 +00:00
TreeHugger Robot
1c34ba15b5 Merge "Revert "Implement family fallback." DO NOT MERGE" into oc-mr1-dev 2017-08-01 17:29:35 +00:00
Roozbeh Pournader
200ae37936 Merge "Revert "Make ellipsize retry if text doesn't fit"" 2017-07-31 20:19:32 +00:00
Seigo Nonaka
296fc2e5c9 Merge "Stop font loading with restricted context." into oc-mr1-dev am: 06ba486a74
am: 0494dc5d17

Change-Id: I6b4c3c5aa52c0619967fedae5862dbf30bcfca43
2017-07-31 18:46:06 +00:00
Roozbeh Pournader
7f8dcaaac1 Revert "Make ellipsize retry if text doesn't fit"
This reverts commit 287c8d6fe9.

Bug: 64156587
Bug: 31537595
Change-Id: Ifbab89df78e79fe01881e9d203f46e656985518c
2017-07-28 21:59:29 +00:00
Siyamed Sinir
5494361c59 Merge changes from topic 'edit_text_linespacing'
* changes:
  Fix DynamicLayout last line spacing
  Fix EditText line spacing
2017-07-28 17:06:22 +00:00
Siyamed Sinir
fb0b2dc754 Fix DynamicLayout last line spacing
StaticLayout did not work as expected when there is a line ending with
'\n'. For those cases it would calculate 2 lines, but would
discard line spacing for both of them. This CL fixed that issue. Also
DynamicLayout asks StaticLayout not to add line spacing for the last
line of the text.

Test: Manual/Visual test
Test: bit -t FrameworksCoreTests:android.text.StaticLayoutTest
Test: bit -t FrameworksCoreTests:android.text.StaticLayoutTextMeasuringTest
Test: bit -t FrameworksCoreTests:android.text.StaticLayoutLineBreakingTest
Test: bit -t FrameworksCoreTests:android.text.DynamicLayoutTest
Test: bit -t FrameworksCoreTests:android.text.DynamicLayoutBlocksTest
Test: bit -t FrameworksCoreTests:android.widget.TextViewTest
Test: bit -t FrameworksCoreTests:android.widget.EditorCursorTest
Test: bit -t CtsTextTestCases:android.text.cts.StaticLayoutTest
Test: bit -t CtsTextTestCases:android.text.cts.DynamicLayoutTest
Test: bit -t CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit -t CtsWidgetTestCases:android.widget.cts.EditTextTest

Bug: 25194907
Change-Id: I0d901ecf768b25faea156b73097541da4b93d6d0
2017-07-27 14:43:25 -07:00
Seigo Nonaka
9b58ad6ce0 Stop font loading with restricted context.
Resources.getFont may load other package's font. Stop loading font
resources unless the developer allowed to do so.

Bug: 64115349
Bug: 35763094
Bug: 62813533
Test: bit CtsTextTestCases:android.text.style.cts.TextAppearanceSpanTest
Change-Id: Ifa1b57a70650ba086b38407c0ed5b4048983e7e5
2017-07-27 13:09:46 -07:00
TreeHugger Robot
f3b382150f Merge "Make ellipsize retry if text doesn't fit" 2017-07-27 03:24:35 +00:00