| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| |
| |
| |
| |
| |
| |
| | |
9cf73e369d am: eb897b1d85
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2004810
Change-Id: Ie1a67a1a9fae4dbbc321755f7ec9bde8bb84613f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
| | |
| |
| |
| |
| |
| | |
Test: manual
Bug: 210502588
Change-Id: I5d4ded0cb30151bc567cfedcdb1bbbdb9abdca9b
|
| |/
|
|
|
|
| |
Bug: 199230228
Test: make
Change-Id: I3c0422b588a954a9e32fdcc94ea3946dbccddcd0
|
| |
|
|
|
|
|
|
|
|
|
| |
One of the highest-traffic users of String.format() is in the
notification code, which uses argument widths. To support these
use-cases, this change adds argument width support, with tests.
Bug: 170978902
Test: atest error_prone_android_framework_test
Exempt-From-Owner-Approval: trivial additions
Change-Id: I8e36d4725a6d0cc896dedc5c457eb5f38486d7b6
|
| |\
| |
| |
| |
| |
| | |
* changes:
Recommend efficient String operations.
Simple alternative to String.format().
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This purposefully supports only a small handful of substitutions to
improve execution speed. Benchmarking reveals this optimized
alternative performs 6.5x faster for a typical format string.
Add Preconditions overloads that accept varargs to avoid string
formatting overhead in successful case.
Bug: 170978902
Test: atest FrameworksCoreTests:android.text.TextUtilsTest
Test: ./frameworks/base/libs/hwui/tests/scripts/prep_generic.sh little && atest CorePerfTests:android.text.TextUtilsPerfTest
Change-Id: I3fae4dc95cfc98a61c4a7f07ca0781c4a2ee3be9
|
| |/
|
|
|
|
|
|
| |
Currently, the text paramter is annotated with @Nullable
but passing a null value will cause an NPE.
Test: atest core/tests/coretests/src/android/text/TextUtilsTest.java
Change-Id: I95a71246aa0fe3398f09cb9b4b037ca096900ad4
|
| |
|
|
|
|
|
|
|
| |
* setContentDescription() back to ReplacementSpan when receiving parcel
* extend writeToParcel to handle AccessibilityReplacementSpan
Bug: 155833272
Test: atest AccessibilityNodeInfoTest#testSetTextWithImageSpan_shouldTextSetToInfo
Change-Id: Iab902bdcee53fc09cbba2c7c06858823524a3af9
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An earlier CL with benchmarks has shown that sending strings as UTF-8
is 50% faster for US-ASCII strings, and still 68% faster for complex
strings referencing higher Unicode planes. (So an improvement in
both cases!)
Since code across the OS still makes heavy assumptions about Parcel
strings typically being UTF-16, we need to carefully migrate
Parcelables by hand, which is what this CLs begins doing.
This is a purely mechanical refactoring with no functional changes.
Bug: 154436100
Test: manual
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: Ia9e581efd7c40269342b7528ca07363deb843c0f
|
| |
|
|
|
|
|
|
| |
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
|
| |
|
|
|
|
|
|
| |
Create new API for adding content description into ImageSpan.
Bug: 135497450
Test: Adding CTS tests for new API in linked CL
Change-Id: I6cc58657c1dfbbddf00186aeea1faa0ce876f996
|
| |
|
|
|
|
| |
Test: adb logcat | grep Telecomm - to ensure correct default dialer detected
go to settings-default apps and ensure correct dialer selected in UI
Change-Id: Ib34c07b8259875dfb3c8ea848410436cbeec3796
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
Implement ParcelableSpan interface for LineHeightSpan.
Bug: 112621694
Test: atest LineHeightSpan_StandardTest
Change-Id: I452a2b12310b525555e908e4d04dda7101693319
|
| |
|
|
|
|
| |
Test: typo in comment, no test necessary
Change-Id: I5a56c289e1e29a8eca33d55a77c52e87efa446a2
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Any app loading untrusted strings should make the strings face. Hence make
the method publicly available.
Test: atest CtsTextTestCases:MakeSafeForPresentationTest GtsContentTestCases:PackageItemInfoTests
Change-Id: Ib0679fe892181535339dac77583c427e0d64dd05
Fixes: 113856697
|
| |/
|
|
|
|
| |
Bug: 1526775
Test: atest LineBackgroundSpan_StandardTest
Change-Id: Id97981857a90804387d93e89a1b93c1a74498f47
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For packages:
android.text.util
android.text.style
android.text.method
android.text.format
android.text
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: I9afbd4ca8826c37cb70db43252e39b9a674e5ae0
|
| |\ |
|
| | |
| |
| |
| |
| |
| | |
Test: Generate bug report and confirm that NotificationChannel logs contain redacted name strings.
Change-Id: Iebaf7b165de0276e69ead862aa7ec864ef912282
Fixes: 78326066
|
| |\ \
| |/
|/|
| |
| |
| |
| |
| | |
28." am: b5f35aeaf3 am: 5442964205
am: e4449497ed
Change-Id: I3bbb854c61f476caaef20eeae2bbcc9473c49469
|
| | |\
| | |
| | |
| | |
| | |
| | | |
am: b5f35aeaf3
Change-Id: I55ba23bfae8f578eb75a4cbfeb2ed4ad1492867d
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Another CL in this topic changes the behavior of String.split() and
Pattern.split() to omit a "" generated by a leading zero-width match.
TextUtils.split() is implemented on top of these methods and therefore
adopts the behavior change by default.
The behavior change only affects apps targeting API versions > 28.
Test: cts-tradefed run singleCommand cts-dev -m CtsTextTestCases \
-t android.text.cts.TextUtilsTest
Test: cts-tradefed run singleCommand cts-dev -m CtsLibcoreTestCases
Bug: 109659282
Change-Id: I8abe251353f8eacf1429ac9a8e272d50a0944c29
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Bug: 78245676
Test: atest ParcelNullabilityTest
Change-Id: I7bb844164d4b417445ff2d6f2f99c8a88d7f7f48
|
| |/ /
| |
| |
| |
| |
| |
| | |
This is a simple check that can be done locally.
Test: TextUtilsTest.java
Change-Id: I00f2a4fd087aa98ece2c3aa032e106496663b13f
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit e88b5df5b7aaf5a5f654805eb5e5e4c2f09afaa8.
Test: bit FrameworksCoreTests:android.text.StaticLayoutTest
Test: bit FrameworksCoreTests:android.text.DynamicLayoutTest
Test: bit FrameworksCoreTests:android.text.TextUtilsTest
Test: bit CtsTextTestCases:*
Test: atest FilesActivityUiTest
Bug: 71599479
Bug: 31537595
Bug: 64156587
Change-Id: I1afa77a4b90b9b822b409a3f4721c45d0c0a6664
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is already MeasuredText, so renamed existing MeasuredText to
MeasuredParagraph, then renamed PremeasuredText to MeasuredText.
Bug: 67504091
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsTextTestCases:*
Change-Id: Ie20bea9501b18fabb36f64d388a7851c4643d4c3
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 75492afb1b6566c889025e9ca0a15a0d0fe422aa.
Reason for revert: 70146381
Change-Id: Ibb6433b5e02608326ef51cc16d8d5d8efa86beec
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\|
| |
| |
| |
| |
| | |
am: 3debaa72d4
Change-Id: Iaa2fe2ca2d7680b99f170f2486b3018704e45432
|
| | |
| |
| |
| |
| |
| | |
Bug: 62144301
Test: Boot and start random apps on a secondary user
Change-Id: I8a9b475410c52e1063cff5519b0297ad69dd7925
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| |
| |
| |
| | |
This reverts commit 1051bbe325a2fac9d5b074367d878318e2326485.
Bug: 64312574
Change-Id: I6a3456172e22e94df30dcbe90988db8592886a78
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 287c8d6fe9c794ae2c1ee8fd8f7dc8a0ac31f9d1.
Bug: 64156587
Bug: 31537595
Change-Id: Ifbab89df78e79fe01881e9d203f46e656985518c
|
| |\| | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
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: FrameworksCoreTests:android.text.
Change-Id: I3532820e12ac45a46e28fe2f8bb17dcd0a345916
|
| |\| | |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Mostly changed to avoid repetition of code and remove the assumptions
about ellipsis being one code unit. The code for multi-code unit
ellipsis is not triggered yet, but is done in preparation for
potential future locale-dependent cases.
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: adb shell am instrument -w -e package android.text com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: Id1dfdc503f87fabed2447d55ab2107eee0eccd08
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When TextView or EditText contains text that is larger than the
total parcelable limit, some of the FloatingToolbar operations would
crash.
This CL changes the behavior as follows:
- Show a toast message if cut or copy operation fails because it cannot
set the primary clip.
- Trim the text for share and process_text actions
- A simple app with an EditText and a long text in it, would not open
since Autofill value was being sent over IPC. Trimmed the text that is
sent for Autofill feature.
- Trim the value send to accessibility services
Test: bit CtsWidgetTestCases:.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewTest
Test: bit FrameworksCoreTests:android.text.TextUtilsTest
Test: Manual sample app test
Bug: 8013261
Change-Id: Ia0df6b4eb4c13071a1bf75cedac7241c7239663c
|
| |/
|
|
|
|
|
|
|
|
| |
Added documentation to clarify what happens in the case of null or
empty arguments.
Change-Id: I694dc0f6a6d95ab6ca7ed95b51d81938618eb75f
Fixes: 36861796
Test: bit CtsTextTestCases:*
Test: bit CtsGraphicsTestCases:android.graphics.cts.FontVariationAxisTest
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new code support non-BMP characters, as well as locale-specific
uppercasing and fine-grained span copying.
The modern capitalization code in AllCapsTransformationMethod is
moved to TextUtils now, so InputFilter.AllCaps can share it.
Fixes: 37222101
Test: New CTS and core tests are added.
Test: cts-tradefed run cts-dev --module CtsTextTestCases
Test: adb shell am instrument -w -e package android.text com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I021ff2a97a60396fb1b6e4940d91d3cd6ccb6196
|
| |
|
|
|
| |
Test: Enable debug, and ensure changeTypes are properly displayed
Change-Id: I1bf6a9f56a72e867a0bc967a5e3527eb4dc83952
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This switches TextUtils.concat() to use SpannableStringBuilder
if there are any spans in the input strings. As a result, we can
avoid crashes when concatenating two CharSequences can result in
paragraph spans that now don't happen to be at paragraph boundaries.
Also document the exact behavior of the method for edge cases based
on the previous implementation.
Change-Id: I9caffbe95ed729b9c10d63a9e7d22b1e8c7185a3
Fixes: 28271770
Test: CTS tests added and old CTS tests continue to pass.
Test: cts-tradefed run cts-dev --module CtsTextTestCases --test android.text.cts.TextUtilsTest
|