Commit Graph

1298 Commits

Author SHA1 Message Date
Victor Chang
d990345d8b Revert "Switch file size formatters to use ICU's MeasureFormat"
This reverts commit 4e5b71f084.

Test: cts-tradefed run cts-dev -m CtsTextTestCases
Bug: 70005649
Bug: 36994779
Change-Id: Ie9a2fd786d48e2a6c291e313cbb4072c7306af9f
2018-01-03 14:31:47 +00:00
Victor Chang
3305bce79d Revert "Remove use of MeasureUnit.internalGetInstance"
This reverts commit aa5629e608.

Test: m
Bug: 70005649
Bug: 36994779
Change-Id: I4591870f564567c40fa450866c3050fd5a7a61ae
2018-01-03 14:31:34 +00:00
TreeHugger Robot
df392c9a1d Merge "Deprecate StaticLayout and DynamicLayout constructors" 2017-12-20 11:58:32 +00:00
Siyamed Sinir
f7314652ed Merge "Add OWNERS for text related classes" 2017-12-19 20:08:56 +00:00
Clara Bayarri
81a4f2e89d Deprecate StaticLayout and DynamicLayout constructors
The Builders should be used instead.
Also remove a StaticLayout constructor only used in tests in favor
of the Builder.

Bug: 64985428
Test: adb shell am instrument -w -e class android.text.StaticLayoutTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: Ief6839d2c6bb0969bdeb30359eae00d38a2bdb09
2017-12-19 16:46:56 +00:00
Siyamed Sinir
50b585e20c Fix DynamicLayout block index calculation after edit
DynamicLayout made wrong adjustments to the block indices set to be
redrawn. Every indice after the first change was being added the
diff count in the blocks. However this meant when there are 2 deletes
and an index as 1, it would become -1 (wrong array index). The change
should be applied to indices outside of [firstBlock, lastBlock].

Test: Added android.text.DynamicLayoutTest#testReflow_afterSpannableEdit
Test: bit FrameworksCoreTests:android.text.DynamicLayoutTest
Test: bit FrameworksCoreTests:android.text.DynamicLayoutBlocksTest
Test: bit CtsTextTestCases:android.text.cts.DynamicLayoutTest

Bug: 67405337
Change-Id: Ie5e5658ffca4293f32f7b574d22d307e9e8d52dc
2017-12-18 23:32:50 -08:00
Siyamed Sinir
198e309394 Add OWNERS for text related classes
Test: None
Change-Id: Ieacd6b7e91665c7f17ab7e9308d0533f6dc5663e
2017-12-18 18:04:30 -08:00
Jeff Sharkey
ce8db99114 Add more IntDef prefixes for auto-documenting.
Test: builds, boots
Bug: 70177949
Exempt-From-Owner-Approval: annotation-only changes
Change-Id: I76dde6054e06f52240bd4b1a0f196dcb74623608
2017-12-13 20:05:36 -07:00
Seigo Nonaka
fbe63bddd6 Introduce PremeasuredText
By measuring the character widths beforehand, we can save at least 40%
of the StaticLayout construction time which typically happens on UI
thread.
Also verified this doesn't cause performance regression for not
premeasured text.

Raw performance score (Not premeasured -> premeasured, median, N=100)

No Style,   Greedy, Hyphenation OFF:  7,812,975 ->    503,245 (-93.6%)
No Style, Balanced, Hyphenation OFF:  7,843,254 ->    396,892 (-95.0%)

No Style,   Greedy, Hyphenation ON : 19,134,214 -> 11,658,928 (-39.1%)
No Style, Balanced, Hyphenation ON : 19,348,062 -> 11,634,942 (-39.9%)

Styled,     Greedy, Hyphenation OFF: 14,353,673 ->    572,840 (-96.0%)

Raw performance score (w/o patch -> w/ patch, median, N=100):

No Style,   Greedy, Hyphenation OFF:  7,732,894 ->  7,812,975 (+1.04%)
No Style, Balanced, Hyphenation OFF:  7,884,510 ->  7,843,254 (-0.52%)

No Style,   Greedy, Hyphenation ON : 18,986,958 -> 19,134,214 (+0.78%)
No Style, Balanced, Hyphenation ON : 19,232,791 -> 19,348,062 (+0.60%)

Styled,     Greedy, Hyphenation OFF: 14,319,690 -> 14,353,673 (+0.24%)

Bug: 67504091
Test: bit CtsTextTestCases:*
Test: bit CtsGraphicsTestCases:*
Test: bit CtsWidgetTestCases:*
Test: FrameworksCoreTests:android.text.MeasuredTextTest
Change-Id: I0b46f04b42cc012606a9c722eca0d51147a0dcc7
2017-12-11 18:55:12 -08:00
Seigo Nonaka
4b6bceec36 Fix testCursorIsOnRight test case
This is partial revert of Ie932903845645e50cfa0cb428babb31a44babc47

The root cause is MeasuredText.getParagraphDir respect requsted text
direction even if it is an empty text. Ideally we don't need to create
MeasuredText object for empty string but for safety, reverted to the
original code.

Bug: 70384435
Test: bit FrameworksCoreTests:android.widget.EditorCursorTest
Change-Id: Id24405f476c50fa27743589a640281d96de1c9ce
2017-12-11 12:26:13 -08:00
Seigo Nonaka
6f1868b813 Associate native MeasuredText with Java one.
To measure text beforehand, remove static layout dependency from
MeasuredText. Now MeasuredText can compute native measured text
by itself and StaticLayout use it for line breaking.

This CL introduce one additional JNI method call per paragraph during
line breaking but looks negligible cost.

Here is a raw performance test result on walleye-userdebug.

StaticLayoutPerfTest (median, N=100):
createRandom:          7,879,440 -> 7,964,789 (+1.08%)
createRandom Balanced: 7,835,192 -> 7,848,151 (+0.17%)

TextViewOnMeasurePerfTest (median, N=100):
measure_AtMost:       92,599,175 ->  93,027,121 (+0.47%)
measure_Exactly:      89,949,922 ->  90,439,886 (+0.54%)
measure_Unspecified: 148,645,916 -> 150,047,694 (+0.94%)

Bug: 67504091
Test: bit CtsTextTestCases:*
Test: bit CtsWidgetTestCases:*
Test: bit CtsGraphicsTestCases:*
Test: bit FrameworksCoreTests:android.text.StaticLayoutTest
Change-Id: Ie932903845645e50cfa0cb428babb31a44babc47
2017-12-05 14:56:06 -08:00
Seigo Nonaka
f1644f735d Refactor MeasuredText
This is 2nd attempt of I58d3020a3fa560d05576e18888fbfe46e2975e8f

The root cause of the crash is passing end offset instead of passing
length. This CL contains that fix and also has a test case for that.

This refactoring contains:
- Add lots of comments.
- Mark private the internal fields and introduce accessors and helper
  methods.
- Factor out the auto grow array implementation to another class.
- Use SynchronizedPool for pool implementation.
- Introduce three build methods for each use case.
- Hide addStyleRun and compute all necessary informations in build method.

Locally verified that this doesn't cause performance regressions.
Here is a raw performance test result on walleye-userdebug.

StaticLayoutPerfTest (median, N=100):
createRandom:          7,846,449 -> 8,003,903 (+2.01%)
createRandom Balanced: 7,810,436 -> 7,919,200 (+1.40%)

TextViewOnMeasurePerfTest (median, N=100):
measure_AtMost:       94,276,376 ->  94,124,658 (-0.16%)
measure_Exactly:      91,629,352 ->  91,617,639 (-0.01%)
measure_Unspecified: 151,006,181 -> 150,957,598 (-0.03%)

Test: bit CtsTextTestCases:*
Test: bit CtsGraphicsTestCases:*
Test: bit CtsWidgetTestCases:*
Test: bit FrameworksCoreTests:android.text.StaticLayoutTest
Bug: 65024629
Bug: 70146381
Change-Id: I772f60444d0fe87f59609977af5ef712cab3eb37
2017-12-05 14:49:53 -08:00
Seigo Nonaka
4674e642a5 Revert "Refactor MeasuredText"
This reverts commit 75492afb1b.

Reason for revert: 70146381

Change-Id: Ibb6433b5e02608326ef51cc16d8d5d8efa86beec
2017-12-04 18:25:03 +00:00
Seigo Nonaka
75492afb1b Refactor MeasuredText
This refactoring contains:
- Add lots of comments.
- Mark private the internal fields and introduce accessors and helper
  methods.
- Factor out the auto grow array implementation to another class.
- Use SynchronizedPool for pool implementation.
- Introduce three build methods for each use case.
- Hide addStyleRun and compute all necessary informations in build method.

Locally verified that this doesn't cause performance regressions.
Here is a raw performance test result on walleye-userdebug.

StaticLayoutPerfTest (median, N=100):
createRandom:          7,846,449 -> 8,003,903 (+2.01%)
createRandom Balanced: 7,810,436 -> 7,919,200 (+1.40%)

TextViewOnMeasurePerfTest (median, N=100):
measure_AtMost:       94,276,376 ->  94,124,658 (-0.16%)
measure_Exactly:      91,629,352 ->  91,617,639 (-0.01%)
measure_Unspecified: 151,006,181 -> 150,957,598 (-0.03%)

Test: bit CtsTextTestCases:*
Test: bit CtsGraphicsTestCases:*
Test: bit CtsWidgetTestCases:*
Test: bit FrameworksCoreTests:android.text.StaticLayoutTest
Bug: 65024629

Change-Id: I58d3020a3fa560d05576e18888fbfe46e2975e8f
2017-11-30 10:46:30 -08:00
Roozbeh Pournader
2e97386d9d Drop the second unit from elapsed time if zero
Previously, we could get formatted strings like "1h 0min" which is
unnecessarily complex for users. Replace such cases with "1 h" if
the second unit is zero.

Fixes: 65426298
Test: bit FrameworksCoreTests:android.text.format.FormatterTest
Change-Id: I1d9828ec97f2cbfb7ce27c266a04d4c02b090d6d
2017-11-15 16:19:35 -08:00
TreeHugger Robot
0e364f64da Merge "Fix space counting for justified text" 2017-10-25 02:30:54 +00:00
Seigo Nonaka
b90e08f92e Reorganize JNI in StaticLayout
This CL reorganize the JNI strategy as follows:
- Remove nNewBuilder/nFreeBuilder.
- Make addStyleRun/addReplacementRun CriticalNative.
- Remove nSetupParagraph and pass necessary arguments to
  nComputeLineBreaks instead.

Here is a performance scores: (w/o patch -> w/ patch)

StaticLayoutPerfTest (median):
createRandom:           3,755,090 -> 3,781,394 (+0.70%)
createRandom Balanced:  3,702,837 -> 3,730,435 (+0.74%)

TextViewOnMeasurePerfTest (median):
measure_AtMost:        39,172,360 -> 35,883,014 (-8.4%)
measure_Exactly:       38,005,066 -> 34,585,052 (-9.0%)
measure_Unspecified:   67,191,780 -> 63,100,545 (-6.1%)

Bug: 65024629
Test: bit CtsTextTestCases:*
Test: bit CtsWidgetTestCases:*
Change-Id: If9db1fdd2b03a1cf240f87322c1e852cf8085fff
2017-10-24 17:31:17 -07:00
Roozbeh Pournader
3630d0861b Fix space counting for justified text
Previously, the number of stretchable spaces in a line were
miscounted, always returning one more than the actual number. We now
count them correctly.

Also, disable NBSP as an stretchable space, since in some use cases
it should not stretch and the implementation in Minikin was broken
anyway.

Test: Manual (justified text is now properly aligned on right side)
Test: bit FrameworksCoreTests:android.text.TextLineTest
Fixes: 68009059
Bug: 68204709
Change-Id: I473415a2a51eec75377d6ffc4a9adddc2033d360
2017-10-24 16:21:51 -07:00
Roozbeh Pournader
a5511eb648 Merge "Replace JNI portion of AndroidBidi with calls to ICU4J" 2017-10-19 22:55:57 +00:00
Roozbeh Pournader
a15fd848cb Replace JNI portion of AndroidBidi with calls to ICU4J
We no longer need the native calls to ICU since we have ICU4J.

Fixes: 67786879
Test: bit FrameworksCoreTests:android.text.
Change-Id: Ib2ec93017000b4f0343756814ca388bd31457849
2017-10-19 11:20:46 -07:00
Seigo Nonaka
f90c9b6437 Move hyphenator mapping to native code.
This CL contains the following changes:
- Replace Hyphenator mapping in Java with minikin::HyphenatorMap.
- Remove locale tracking code from StaticLayout.java
- Stop creating Hyphenator pointer array in StaticLayout.

Bug: 65024629
Bug: 67319341
Test: bit CtsTextTestCases:*
Test: bit FrameworksCoreTests:android.text.
Test: bit FrameworksCoreTests:android.widget.TextViewTest
Change-Id: Ib88c8e816c70959057abe296cc434ddb70bc397a
2017-10-13 15:57:48 -07:00
Seigo Nonaka
898a319db3 Fix Catalan and Polish hyphenation.
After I7e2ece979181d12ac1adbede14995ec9b7b87d21, the special hyphenation
logic for Catalan and Policy was not working.

Bug: 65024629
Bug: 67702053
Test: N/A
Change-Id: I985253e24cf0ce4e537c01074e75054381a7816a
2017-10-11 23:21:12 +00:00
Siyamed Sinir
2d729d55aa Merge "Removed unused variables from text layout code" 2017-10-11 02:20:27 +00:00
Seigo Nonaka
2dd1a55b41 Remove nGetWidths and pass the jfloat[] as nComputeLineBreaks argument.
nGetWidths was always called just before nComputeLineBreaks. It would be
an improvement to pass the result array as the argument of
nComputeLineBreaks.

Bug: 65024629
Test: bit FrameworksCoreTests:android.text.StaticLayoutLineBreakingTest
Test: bit CtsTextTestCase:*
Test: Manually checked no regression in TextViewOnMeasurePerfTest
Test: Manually checked no regression in StaticLayoutPerfTest result
Change-Id: I566be66558a22b3a3ff79d502bebbbfec75dd065
2017-10-10 20:44:47 +00:00
Siyamed Sinir
a273a70ecb Removed unused variables from text layout code
Test: None
Change-Id: I890c3d260edd0570259db5089dcb37f79c2e56e9
2017-10-10 12:40:47 -07:00
Seigo Nonaka
5cc9348e9e Stop returning run width of StaticLayout.Builder.addStyleRun.
The return value of addStyleRun is not used.
By no longer returning run width, the LineBreaker can defer the
style and line breaking calculation.

Bug: 65024629
Test: bit CtsTextTestCases:*
Change-Id: I2c835ff1c58657863da12976e71007c29b1bb039
2017-10-03 17:48:52 +00:00
Seigo Nonaka
70091d17e8 Remove unused method setPos from MeasuredText.
Bug: 65024629
Test: Verified with TreeHugger
Change-Id: I023532c9decbc7b798aa4cb2dedc5ca5fb8d96f0
2017-10-02 20:30:53 +00:00
Seigo Nonaka
e9f4ab5de7 Remove StaticLayout.addMeasuredRun
StaticLayout.addMeasuredRun is used if the TextPaint is subclassed.
However, developers can't do almost anything by subclassing TextPaint
since most of default things are done in native code. So we don't need to
support this tricky case anymore.

Bug: 65024629
Bug: 67009717
Test: bit FrameworksCoreTests:android.text.StaticLayoutLineBreakingTest
Change-Id: I290b8b7d3e1fcff7be78e4bd1e620d6c188a10ad
2017-09-29 20:11:19 +00:00
Seigo Nonaka
1bee333526 Fix StaticLayoutLineBreaker tests
StaticLayoutLineBreaker fails due to not passing locales to word
breaker. Also addReplacement needs locale and hyphenators.

In addition, need to update mLocales in StaticLayout, otherwise
always pases the locale to native.

Bug: 67020487
Test: bit FrameworksCoreTests:android.text.StaticLayoutLineBreakingTest
Change-Id: I9ef5f9a8d8beabbb4c341f6203635b649d2efed9
2017-09-28 18:48:41 -07:00
Petar Šegina
69ddece0b0 Merge "Update referenced constant names for Directions" 2017-09-28 16:16:47 +00:00
Seigo Nonaka
44a1df2cf3 Keep locale info in Hyphenator.
Even if the same data file is used, different hyphenation is applied
based on the locale. Now Hyphenator keeps locale and use it for
hyphenation.

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: I7e2ece979181d12ac1adbede14995ec9b7b87d21
2017-09-27 18:54:03 -07:00
Roozbeh Pournader
9a9179d48d Take padding information into StaticLayout
This is useful for figuring out if we should adjust width of text
in case the overhangs are more than available padding.

Bug: 63938206
Test: pending
Change-Id: I04592a7cbce264fe133e17e4df0daee626a99d85
2017-09-27 15:52:05 -07:00
Petar Šegina
7c31d5c80d Update referenced constant names for Directions
The new constants were introduced in [1] 9f7a444, but the comment used the
wrong prefix - DIR_ instead of RUN_ in the actual names.

[1] Change-Id Iea8bb46c678a18820e237c90f76007a084c83051
    Commit hash 9f7a4442b8

Test: comment update, no tests performed
Change-Id: I4e13600b16ebd9be7ac40cf6c6292ea13f0806c2
2017-09-27 20:57:02 +01:00
Seigo Nonaka
5d518dcd5a Remove nSetLocales
nSetLocales needed to be done at the same time of addStyleRun.
So it is natural to be the arguments of addStyleRun.

Since locale change detection take longer time in native, check it
in Java and pass null if not changed.

Here is an example of StaticLayoutPerfTestResult.
Before (median):
 createRandom: 3,422,247
 createRandom(breakBalanced): 3,448,865
 create: 183,642

After:
 createRandom: 3,493,079
 createRandom(breakBalanced): 3,495,381
 create: 193,363

Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsTextTestCases:android.text.cts.DynamicLayoutTest
Test: bit CtsTextTestCases:android.text.cts.StaticLayoutTest
Test: minikin_tests
Bug: 65175766
Bug: 65024629
Change-Id: I4586cef626f631d4736b0db59ba9f3f6abd3d4ff
2017-09-25 13:19:24 -07:00
TreeHugger Robot
5d6cb0f864 Merge "Pass text direction from StaticLayout to Layout" 2017-09-22 14:28:00 +00:00
Roozbeh Pournader
158dfafb39 Pass text direction from StaticLayout to Layout
Previously, the text direction was not passed from StaticLayout to
Layout when a StaticLayout was constructed using a builder, resulting
in inconsistency between the direction of a StaticLayout and the
Layout itself. Now we pass the text direction to Layout.

Fixes: 66463721
Test: bit CtsTextTestCases:android.text.cts.DynamicLayoutTest
Test: bit CtsTextTestCases:android.text.cts.StaticLayoutTest
Test: bit CtsWidgetTestCases:android.widget.cts.EditTextTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.text.DynamicLayoutTest
Test: bit FrameworksCoreTests:android.text.StaticLayoutTest
Test: bit FrameworksCoreTests:android.widget.TextViewTest
Change-Id: Ifaa9d108283292469f0f41c80350162b1d042a93
2017-09-21 13:31:14 -07:00
Roozbeh Pournader
9fc6725428 Pass text direction from DynamicLayout to Layout
Previously, we were calling the wrong constructor for Layout, which
didn't have a text direction.

Bug: 65330510
Test: bit FrameworksCoreTests:android.widget.EditorCursorTest
Test: bit FrameworksCoreTests:android.text.DynamicLayoutTest
Test: bit CtsTextTestCases:android.text.cts.DynamicLayoutTest
Change-Id: Idf0ac781dc8d6641184b7deabe990cd0e451ad26
2017-09-20 16:31:35 -07:00
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