The CL fixes a crash in Layout.primaryIsTrailingPreviousAllLineOffsets.
The crash was happening when the method was called for a line beginning
with an empty bidi run. This could happen, for example, for empty text -
I was unable to find any other case. The CL improves the existing test
for the method with this case, which was previously crashing.
The CL also fixes a potential crash in getLineHorizontals. However, this
bug could never happen as in the current code path clamped is always
false (and kept as parameter for parity with getHorizontal).
Bug: 135444178
Test: atest FrameworksCoreTests:android.text.LayoutTest\#testPrimaryIsTrailingPrevious
Change-Id: I47157abe1d74675884734e3810628a566e40c1b4
Update the documentation for WebView.findAddress, as well as the related
functionality in Linkify and TextView, to clarify why the method is
deprecated, why it should not be used, and that it can cause unexpected
exceptions to be thrown from several places on older OS versions.
Fixes: 24676033
Test: m offline-sdk-docs
Change-Id: I45d82b9a4c9cf62d9566898dd21cd2139ad98f37
This makes the number presented to the user consistent between
Settings and the notification. Previously the notification used
SI units while Settings used IEC units.
I haven't tested the TYPE_LIMIT_SNOOZED notification as I'm not
sure how to trigger it (though I don't see any reason why it
wouldn't get the same treatment).
Bug: 91635986
Test: manually:
1) set a limit for 10 MB
2) use >10 MB of data
3) verify notification and Settings agree on data use
Change-Id: I31f157332ac273ae260651eb426ab97258180176
This is from API council feedback.
Bug: 124794899
Test: atest CtsTextTestCases
Test: atest CtsGraphicsTestCases
Change-Id: Ifa95f87067239cca9c0791bf079045e4f645c3ad
The hyphen edit is packed into 8bit integer in native library, but this
should not be exposed to public API as API council suggested.
This CL includes:
- Removing packing structure from HyphenEdit and move constants from
Hyphenator to Paint.
- Replace LineBreaker's getLineHyphenEdit with two separate start/end
function.
- Replace Paint's getHyphenEdit with two separate start/end function.
- StaticLayout still relies on this packing mechanism but no longer need
to be the same packing structure as in Minikin.
Bug: 124794844
Test: atest CtsGraphicsTestCases
Test: atest CtsTextTestCases
Change-Id: I8206061f554cf6e119b2b565162f54317eac630a
Here are the list this CL includes:
- Adding missing @NonNull, @Nullable, @IntRange annotations
- Added @Px annotation to Paint.set/getWordSpacing
- Change Builder classes to final.
- Change FileDescriptor to ParcelFileDescriptor as described in guideline.
- With this change, additional error handling is required in old
Typeface.Builder but we can keep the same behavior (silently fallback to
system fallback in error case).
- Fix comment in getLineHyphenEdit in LineBreaker.Result
- Rename setJustified to setJustificationMode in LineBreaker.Builder
Fix: 126702154
Fix: 126701272
Fix: 126701569
Fix: 126701953
Fix: 126701507
Fix: 126701667
Fix: 126700866
Fix: 126701009
Fix: 126700795
Fix: 126700292
Fix: 126699209
Fix: 124795407
Fix: 124795470
Bug: 124794844
Bug: 124794899
Test: m update-api
Test: TreeHugger
Change-Id: If6e8566b0eef9151d35d75b7f258128d7d3df358
If they were null, then the Parcelable would fail to work.
Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
We figured out this non-SDK API is mainly used for a previous
memory workaround. Since the bug was fixed, this API is not
allowed to access.
Bug: 123768439
Test: N/A
Change-Id: Ib04bf7e630aee0896c8432aa9c5b794440ea7a2d
This CL deprecates SuggestionSpan#ACTION_SUGGESTION_PICKED and related
constants [1].
There are multiple security concerns, open questions about
compatibility, and maintainance challanges in this protocol.
IME developers can implement their own suggestion picker UI on top of
CursorAnchorInfo API to achieve safer, should give more flexible UI
options, better security, and better compatibility.
[1]: Ia539de0acf66053e0349daec459d75e36805f6bf
f9f0100862
Fix: 123160396
Test: make -j checkbuild
Change-Id: I6d39e838ae47488055162cd44b5f553f68869b17
Properties accessed across partitions are now schematized and will
become APIs to make explicit interfaces among partitions.
Bug: 117924132
Test: m -j
Change-Id: Id9bbb997669b05b6edb5307d561e766ead19abf1
TextLine is using wordSpcing for justification. And previously,
TextLine will overwrite wordSpcing even justification is not on.
This CL make sure that TextLine only changes wordSpcing when
justification is on.
Bug: 122471618
Test: atest TextLineTest
Change-Id: I6f1e2f6c17b65f92d7a5bb064fdafbf5df9ef8f7
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.
Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.
For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.
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: I020a9c09672ebcae64c5357abc4993e07e744687
The text direction can not be fully determined in detached state.
To improve even in that case, compute PrecomputedText from existing
PrecomputedText with new direction.
Here is the performance difference. According to the perf test result,
up to 80% of computation can be recycled from existing PrecomputedText.
android.text.StaticLayoutPerfTest (u sec):
PrecomputedText Greedy NoHyphenation : 371 -> 371: ( +0, +0.0%)
PrecomputedText Greedy NoHyphenation DirDifferent: 6,923 -> 1,437: (-5486, -79.2%)
RandomText Greedy NoHyphenation : 6,633 -> 6,627: ( -6, -0.1%)
On the other hand, this CL increase the memory usage of the
PrecomputedText up to 10%. Here is an reference memory usage.
android.text.PrecomputedTextMemoryUsageTest (bytes):
MemoryUsage
Arabic Hyphenation : 17,135 -> 18,116: ( +981, +5.7%)
Arabic NoHyphenation : 17,135 -> 18,116: ( +981, +5.7%)
CJK Hyphenation : 29,000 -> 31,584: (+2584, +8.9%)
CJK NoHyphenation : 29,000 -> 31,584: (+2584, +8.9%)
Latin Hyphenation : 16,526 -> 17,185: ( +659, +4.0%)
Latin NoHyphenation : 14,200 -> 14,784: ( +584, +4.1%)
Bug: 119312268
Test: atest CtsWidgetTestCases
Test: atest CtsTextTestCases
Test: atest CtsGraphicsTestCases
Test: minikin_tests
Change-Id: Ia02c201afac5d7d1c086a45f15696f39a6b2a76c
Also don't show smart actions for selections in text with unsupported
characters.
Bug: 116321860
Test: atest android.view.textclassifier.TextClassifierTest \
android.text.util.cts.LinkifyTest \
android.text.util.LinkifyTest \
android.widget.TextViewActivityTest
Change-Id: Id271cab8aef6b9b13ef17f1a8654c7616f75cf13
Some time zone related libcore classes are moving from
libcore.util to libcore.timezone.
Bug: 119026403
Test: build only
Change-Id: Ic807977a85276b888362295d1d305effe33076fc
This reverts commit 321140ad84.
Reason for revert: we thought this CL caused b/119659731 but apparently it is not.
Change-Id: I5b52cc1facec77d6a0d844bcaac53e90c7ecd132
This reverts commit 3c097aa45e.
Reason for revert: we thought this CL caused b/119659731 but apparently it is not.
Change-Id: Id375c4c8f2bffb7c42dc36bc053d536c6ea57a8d