Commit Graph

7519 Commits

Author SHA1 Message Date
TreeHugger Robot
24de6a45aa Merge "Initial commit for VideoView2Impl" 2018-01-19 09:57:15 +00:00
Insun Kang
de16c4d357 Initial commit for VideoView2Impl
Test: build
Change-Id: I12b93da01b9c37115cba29b8b50b36cf3d74ddb6
2018-01-19 14:41:39 +09:00
TreeHugger Robot
f5e25a3052 Merge "Add semantics for accessibility headings" 2018-01-19 00:53:49 +00:00
Phil Weaver
6290fb599a Add semantics for accessibility headings
Adding the ability to mark TextView as a heading, and
to provide a heading depth. Plumbing that through to
accessibility services.

Bug: 34687453
Test: Adding CTS tests for new APIs.
Change-Id: I5262e32a2a11b2577802c68e701d2856e28abc21
2018-01-18 14:13:06 -08:00
TreeHugger Robot
b6e7e7531d Merge "Fix crash in EditText#getText" 2018-01-18 21:30:13 +00:00
Clara Bayarri
b102cc2435 Fix crash in EditText#getText
The fact that View's constructor may call other methods before the
TextView constructor has a chance to initialize values means that
getText() may return null in the rare case where it is called
before the constructor.

Protect getText() from running into errors when the text is null,
as it just means the value is not ready yet.

Bug: 71638589
Test: CTS in topic
Change-Id: Ie11233416385353f78e3ee27fb0d3ec9b671512f
2018-01-18 12:36:00 +00:00
TreeHugger Robot
20f29fdaca Merge "Fix extra space in Suggestions Popup" 2018-01-18 12:20:37 +00:00
Abodunrinwa Toki
f317e583e4 Merge "Implement text baseline attributes for TextView." 2018-01-18 01:11:05 +00:00
Clara Bayarri
e0f35eea46 Fix API review javadoc issues in TextView/ExtractedText
Bug: 71555183, 71555182
Test: none, javadoc
Change-Id: I98d5d53f0cd4873d637b454bbc313b50fe2ca811
2018-01-17 12:17:53 +00:00
TreeHugger Robot
2aa64c06d0 Merge "Skeleton for updatable VideoView2" 2018-01-17 02:08:29 +00:00
TreeHugger Robot
b0538e6dac Merge "[Magnifier - 14] Follow finger instead of cursor" 2018-01-16 19:22:36 +00:00
Mihai Popa
1d1ed0cd6e [Magnifier - 14] Follow finger instead of cursor
This CL makes the magnifier follow the finger rather than the cursor in
text editing. Hence, the magnifier's movement becomes horizontally
smooth, rather than only jumping at the same time with the cursor.
Vertically it remains stable relative to the current line.

Bug: 70508649
Test: bit CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I7e06a7064f0a413379b30c5e2d11ee85d2ad3720
2018-01-16 17:28:11 +00:00
Sungsoo Lim
e325904987 Skeleton for updatable VideoView2
Test: manual
Change-Id: I77a960269e19ddf3659ffb9e60a69c4ca86f101b
2018-01-16 17:01:56 +09:00
Abodunrinwa Toki
e94a75a1a0 Implement text baseline attributes for TextView.
Bug: 71816223
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I0a9121ded88f954c5180ea35df0e666801cd8978
2018-01-16 03:37:40 +00:00
Seigo Nonaka
b01e18c3ee Merge "Rename PremeasuredText to MeasuredText" 2018-01-16 00:47:52 +00:00
TreeHugger Robot
1f31d9a8dd Merge "Making TextClassifier helper objects parcelable" 2018-01-15 11:26:06 +00:00
Richard Ledley
b033685533 Merge "Set selection bounds when we try to copy, so it will work with nonselectable text." 2018-01-13 00:15:19 +00:00
Jan Althaus
0d9fbb9bd1 Making TextClassifier helper objects parcelable
- EntityConfidence is no longer generic because it doesn't mix well with
  being Parcelable.
- Deprecated OnClick listeners in TextClassification as they can't be
  parceled. (Outright removed the secondary listeners that were not part
  of any release)
- Classes that were present in previous releases have their parceling
  factored out into ParcelableWrapper helper classes for backwards
  compatibility.

Bug: 67609167
Test: Added
Change-Id: I820ca4abc6b80f90007ab4424bc5df2a14f797b0
2018-01-12 17:53:07 +01:00
Richard Ledley
b30669861f Merge "Make Linkify links clickable in nonselectable text." 2018-01-12 10:40:20 +00:00
Richard Ledley
4b823b9406 Set selection bounds when we try to copy, so it will work with nonselectable text.
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Bug: b/67629726
Change-Id: I685ae3527685665eb3b50aaea90a570ebec47fd7
2018-01-12 10:13:26 +00:00
TreeHugger Robot
0b2249786f Merge "Move A11y events throttling away from View(RootImpl)" 2018-01-11 22:57:35 +00:00
Seigo Nonaka
9d3bd08eba Rename PremeasuredText to MeasuredText
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
2018-01-11 11:33:32 -08:00
Richard Ledley
724eff9a3d Make Linkify links clickable in nonselectable text.
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest\#testToolbarAppearsAfterLinkClickedNonselectable
Bug: b/67629726

Change-Id: I94452116453fff1a36f5d567b3a686e92e97a34f
2018-01-11 14:16:14 +00:00
TreeHugger Robot
3101268dd8 Merge "Avoid unnecessary division in TextView.Marquee.tick." 2018-01-10 21:31:19 +00:00
Eugene Susla
e4d31b3c10 Move A11y events throttling away from View(RootImpl)
..and also extract common code into a common superclass

This also preserves the order of the throttled events
(TYPE_VIEW_SCROLLED & TYPE_WINDOW_CONTENT_CHANGED) with regards to the rest
of events by flushing any pending throttled events immediately if another
event is requested to be sent.

Test: ensure no new a11y CTS failures
Change-Id: I948a16716521974393aaa1cf822d0a0324e9ce3a
2018-01-09 13:28:59 -08:00
TreeHugger Robot
fe3cc4b996 Merge "Initial commit of updatable media API" 2018-01-09 19:05:15 +00:00
TreeHugger Robot
0f4c4232d7 Merge "Renaming leftover from previous CL..." 2018-01-08 23:09:32 +00:00
TreeHugger Robot
2ef95c9d1d Merge "Ignores Resources.NotFoundException when setting ViewStructure.setTestIdEntry()." 2018-01-08 21:17:30 +00:00
Felipe Leme
0ca18071b2 Renaming leftover from previous CL...
Test: echo 'In TreeHugger we trust!'

Bug: 71552872

Change-Id: I2b317c28cb7ec0e74b2cfa98338f9d64ff7dce3b
2018-01-08 13:00:25 -08:00
Felipe Leme
01f4f03188 Ignores Resources.NotFoundException when setting ViewStructure.setTestIdEntry().
Test: manual verification using com.facebook.katana
Fixes: 71695541

Change-Id: Idefc7d3799f2ef5525a5050d63ca29a19cab730a
2018-01-08 11:28:20 -08:00
Siyamed Sinir
8038267b98 Enable/disable fallback line spacing in TextView
Add API to enable/disable fallback line spacing in TextView.

Test: bit FrameworksCoreTests:android.widget.TextViewFallbackLineSpacingTest

Bug: 65161512

Change-Id: I76ba7bdb7d25c7a94653144536295c50d8b0e495
2018-01-04 19:48:35 -08:00
Christofer Åkersten
cfa037065e Initial commit of updatable media API
Test: Created instance & called method
Change-Id: I85f6ea946ef7886abe496b7a851d5b6d50e235b5
2018-01-04 20:50:24 +09:00
Felipe Leme
5dc45ca349 Added new Autofill APIs to get name of id used on android:text.
Such resource id is useful to help the autofill service heuristics to figure out
the meaning of the labels without relying on their localized text. For example,
the id could be "username", while the text could be "Nome do usuario".

Test: atest CtsAutoFillServiceTestCases:LoginWithStringsActivityTest

Fixes: 71552872

Change-Id: I13f7080fb3c67f91492a113115ffa43d185d192a
2018-01-03 16:09:55 -08:00
TreeHugger Robot
6ea80ae06c Merge "Fix crash in EditText#getText" 2018-01-03 03:37:55 +00:00
Shimi Zhang
29d1e9eed1 [Magnifier] Comparing the correct coordinates to in Magnifier update.
Previously we are comparing the clamped coordinates to avoid
unnecessary update of magnifier content. However if the magnifier is
reaching to the edge of the screen it doesn't update itself because
coordinates passed to Magnifier#show() later are clamped to the same.

This CL compares the coordinates without clamping to fix the issue.

Bug: 70580848
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: manual test with WebView that shows the magnifier works.
Change-Id: I65d681da334d5037a924e733d1a27cfd77231726
2018-01-02 17:31:01 +00:00
Clara Bayarri
c832bd57f7 Fix crash in EditText#getText
EditText#getText assumes the text is editable. However if this is
called during construction, the text might still be a String.

Bug: 36972818
Test: bit CtsWidgetTestCases:.EditTextTest
Change-Id: I811fad057f33666692930cb60d696740f7b40a19
2018-01-02 15:46:08 +00:00
George Mount
1c9b3136f7 Add TestApi to disable the TextClock clock tick.
Bug: 70771205

In order to test TextClock being only updated by the 12/24
hour setting, we must disable the clock tick from causing
the text to change. Otherwise whenever the minute changes,
the clock text would update. This leads to a flaky test.

Test: I4917a2296744697f1b50a17e3c5eb5873d567a47
Change-Id: Ifb669af3e6b882eb7c158b7de16e7eb2f0c48f61
2017-12-20 13:54:39 -08:00
TreeHugger Robot
347b7189f2 Merge "Update setLineSpacing docs to mention units" 2017-12-20 17:39:21 +00:00
Clara Bayarri
e536e574fe Update setLineSpacing docs to mention units
Bug: 64896499
Test: none, docs update
Change-Id: I1b94005643764f6484dca2b02845adde7135a37e
2017-12-20 10:36:36 +00:00
Tim Murray
fa83834a44 Avoid unnecessary division in TextView.Marquee.tick.
Test: Marquee.tick works
Change-Id: Idb2c1cadb6b49009f8bec45ad44a34f5636c0e79
2017-12-19 12:56:12 -08:00
Siyamed Sinir
198e309394 Add OWNERS for text related classes
Test: None
Change-Id: Ieacd6b7e91665c7f17ab7e9308d0533f6dc5663e
2017-12-18 18:04:30 -08:00
Richard Ledley
26b8722de6 Show Floating Toolbar when tapping a selectable TextLink in TextView.
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest\#testToolbarAppearsAfterLinkClicked
Bug: b/67629726
Change-Id: Ied7a1903a308db37d0eb288c8e611da8229f381a
2017-12-18 10:12:59 +00: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
b507df4569 Merge "Introduce PremeasuredText" 2017-12-12 16:40:27 +00:00
Siyamed Sinir
ddd156bed5 Merge "Fix an incorrect display position of error popup in RTL layout" am: b7941c50a0 am: 0863cf4e40
am: 8fc08cc0f6

Change-Id: I96476450550e726c3ac6c07e39afcd175cfee043
2017-12-12 04:39:15 +00:00
Siyamed Sinir
8fc08cc0f6 Merge "Fix an incorrect display position of error popup in RTL layout" am: b7941c50a0
am: 0863cf4e40

Change-Id: Ief495fcc7e6f711696ed6337ab65face9d03c981
2017-12-12 04:25:54 +00:00
Siyamed Sinir
b7941c50a0 Merge "Fix an incorrect display position of error popup in RTL layout" 2017-12-12 03:57:43 +00: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
TreeHugger Robot
da586c5f9a Merge "Make TextClock only listen for specific changes." 2017-12-07 23:44:24 +00:00
George Mount
3e3a08e318 Make TextClock only listen for specific changes.
Bug 68016230

Make TextClock only listen for changes to the 12/24
hour clock setting, so that it doesn't trigger a
change when other settings are updated.

Test: I5dee1694890ec90b0eabb939cd636971ed9ba5d4
Change-Id: Ia345995dc2f019209e3c68e6e8681cd2c9d5f439
2017-12-07 07:39:38 -08:00