Commit Graph

7186 Commits

Author SHA1 Message Date
TreeHugger Robot
1812e446e1 Merge "Update TimePicker mode switch icon." into oc-dev 2017-05-16 01:14:01 +00:00
Aurimas Liutikas
c0aa90d9ee Update TimePicker mode switch icon.
Previously the icon was an event icon, but a clock icon is
more appropriate so we are switching to that instead.

Bug: 37351390
Test: Open time picker
Change-Id: I47e6caf3c341c10264168004628288fd00e4601a
2017-05-15 15:39:28 -07:00
TreeHugger Robot
22c6f2d3a8 Merge "Revert "Respect PopupWindow.setOverlapAnchor when above anchor"" into oc-dev 2017-05-13 00:34:43 +00:00
Abodunrinwa Toki
05d41a7183 Merge "TextView: Invalidate selection action mode on "select all"." into oc-dev 2017-05-12 23:51:51 +00:00
Abodunrinwa Toki
4ce651e92d TextView: Invalidate selection action mode on "select all".
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I0b5ebb8d6f1af1a9938151f758a2feedb14fcb9f
Fixes: 38244876
2017-05-13 00:39:58 +01:00
Abodunrinwa Toki
f0d0e37564 Merge "Properly invalidate text classification cache." into oc-dev 2017-05-12 23:08:03 +00:00
Vladislav Kaznacheev
3b105d92a5 Revert "Respect PopupWindow.setOverlapAnchor when above anchor"
This reverts commit 07084924be.

Bug: 37951656
Test: android.widget.cts.PopupWindowTest
Change-Id: I6c950d19bbf5c778f799a652595550a2733aae08
2017-05-12 10:40:16 -07:00
Evan Rosky
23114d68be Added redundant focusable attribute read in TextView
Some apps were relying on TextView favoring focusable over
focusableInTouchMode when they were explicitly set to
opposite values in XML (usually because they start with an
EditText and only set focusable=false). This behavior is
undefined (and is, in-fact opposite to every other View).
In order to keep backwards-compatibility, this restores
the old behavior.

Bug: 36497135
Bug: 37916052
Test: Tested those apps and they behave like they used to.
      TextView CTS still passes.

Change-Id: I65bd1b343a6dfb087f41c9fc8af4b5c1e4c71493
2017-05-12 17:01:54 +00:00
Abodunrinwa Toki
08925e6501 Properly invalidate text classification cache.
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Change-Id: I02b77fc0edf53d13b1623631f4521487cd0bf081
Fixes: 38247676
2017-05-12 13:48:50 +01:00
TreeHugger Robot
6bf9b9a5f3 Merge "TRON: Count smart selection events." into oc-dev 2017-05-12 11:54:37 +00:00
Abodunrinwa Toki
1d77557517 TRON: Count smart selection events.
Logs:
 - Smart selection occured
 - TextView menu item activated on smart selection
 - Smart selection reset
 - Smart selection modified

Test: Manually checked logging happens as per go/tron-howto and verified
nothing is broken in related classes by running:
bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
bit FrameworksCoreTests:android.widget.TextViewActivityTest

Bug: 32572232
Change-Id: Ia9081d92ae9aea50d863455be770eecd0c73be1a
2017-05-11 23:04:29 +01:00
TreeHugger Robot
bcc6cc84bf Merge "Hiding text from obscured text fields." into oc-dev 2017-05-11 02:15:17 +00:00
TreeHugger Robot
3ee2bfd8f5 Merge "Fix Toast exception in NotificationManagerService" into oc-dev 2017-05-10 17:41:17 +00:00
TreeHugger Robot
a9a916ada7 Merge "Warn when other's child is added to ListView as header/footer." into oc-dev 2017-05-10 00:20:57 +00:00
Phil Weaver
52b9dbc677 Hiding text from obscured text fields.
My change to remove "speak passwords" set things up as if
the user had permanently enabled speaking of passwords.
That mode seems to go too far, though. It would speak the
password content even if it wasn't shown on the screen.

This change reverts a small part of ag/1900438 to avoid
populating text changed accessibility events with the plain
text of a view that is concealing that text from users who
are looking at the screen.

I'm tempted to populate the event instead with the
transformed text, but I'm concerned that corner cases may
exist where the transformed text is not valid in the
beforeTextChanged callback. This change seems safer, as it
is just going part way back to the pre-O behavior.

Bug: 38172502
Test: Verified that letters in the WiFi password are no
longer read out when they are deleted.

Change-Id: I1a000ee7f87c334a0d38248ce9ad120f43d12256
2017-05-09 14:28:18 -07:00
Geoffrey Pitsch
d34c1879f1 Fix Toast exception in NotificationManagerService
Toast client code needed optional way to specify a looper

Bug: 37945054
Test: runtest systemui-notification
Change-Id: I8f0e051876871b8c44c225f53370392f1b7f353e
2017-05-09 12:51:32 -04:00
Phil Weaver
8d25b77e4c Merge "NumberPicker a11y (and a11y-inspired) fixes" into oc-dev 2017-05-09 15:36:00 +00:00
Daichi Hirono
a3e6a957a8 Warn when other's child is added to ListView as header/footer.
If other's child is added to ListView as header/footer, it may crash
while layouting. To notify users invalid use case, the CL adds warning.

Bug: 37726743
Test: Manually inspect logcat after adding other's child as header.
Change-Id: I1a66fa9a74e4f15e9d8a696a3957db88fc5bbfbe
2017-05-09 18:24:44 +09:00
Phil Weaver
2a86bad94c Merge "Properly translate text locations to screen coords" into oc-dev 2017-05-06 15:29:24 +00:00
Philip P. Moltmann
c368a240c9 Report less data in structure to autofill provider
Fixes: 35899963
Test: CtsAutoFillServiceTestCases, CtsAccessibilityTestCases,
      CtsAccessibilityServiceTestCases
Change-Id: Ia7dba3e252e7678c033d67bcf653e592f3134304
2017-05-05 14:20:11 -07:00
Phil Weaver
6c617f0a93 Properly translate text locations to screen coords
Using the same method as getBoundsInScreen.

Bug: 35095925
Test: Manually verified location with test app, ran a11y cts
Change-Id: I1eee2a4eb23912698be61c9030d92bbade1d743a
2017-05-05 14:19:58 -07:00
TreeHugger Robot
a20b6ba1f2 Merge "Only classify text when the toolbar is shown." into oc-dev 2017-05-04 15:15:34 +00:00
Abodunrinwa Toki
66c1627301 Only classify text when the toolbar is shown.
classifyText() is used to generate a menu item in the selection toolbar
to handle the selected text. In this cl we avoid calling classifyText()
when the selection is changing but instead call it when we are about to
show the toolbar.

Previously, we depended on invalidateActionModeAsync() to classify text
after a call to startActionMode(). Now that we've introduced
invalidateActionMode() we need to be able to tell
startSelectionActionMode() that we also want the text to be classified,
hence the introduction of an input parameter, "adjustSelection", to
startSelectionActionModeAysnc().

Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Bug: 34966796
Change-Id: I5b9fc9e8ab443f024f8ca461df5a4bcc6485d26b
2017-05-04 13:51:38 +01:00
TreeHugger Robot
6e0332f308 Merge "Revert "Don't add other's child as header or footer"" into oc-dev 2017-05-04 01:04:01 +00:00
Jeff Sharkey
48fef8ce49 Revert "Don't add other's child as header or footer"
This reverts commit 358d0d3297.

This CL resulted in b/37933333 regression, so it'll have to re-land with a target API check.

Change-Id: I1c2e4de43a15c1851d98f6aff432585ada80fb5b
2017-05-03 19:25:08 +00:00
TreeHugger Robot
d30044407e Merge "Avoid classifying text mulitple times." into oc-dev 2017-05-03 12:35:22 +00:00
TreeHugger Robot
33f2b3b3b1 Merge "Fix VideoView touch and trackball handlers to call super." into oc-dev 2017-05-03 07:31:48 +00:00
TreeHugger Robot
9e37a2e419 Merge "Don't add other's child as header or footer" into oc-dev 2017-05-03 02:12:08 +00:00
TreeHugger Robot
3cb61255ab Merge "Support resetting "smart selection" to any word in the selection." into oc-dev 2017-05-02 20:05:48 +00:00
Abodunrinwa Toki
fdf57ba84c Avoid classifying text mulitple times.
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Bug: 34966796
Change-Id: I278dc5f1ca684ff0f336c05f14f5b42196738ba7
2017-05-02 20:32:23 +01:00
Abodunrinwa Toki
8dd3a744a6 Support resetting "smart selection" to any word in the selection.
Test: See topic
Bug: 34779207
Change-Id: I75a9b991571f750b362047baa13675250e929223
2017-05-02 18:44:19 +01:00
Phil Weaver
1d359a6d31 NumberPicker a11y (and a11y-inspired) fixes
- Sending scroll events for accessibility.
- Sending text update events when state changes.
- Blocking text updates during fling to reduce number of events.
- Making widget focusable by default, which keeps focus from
  moving to the rest of the UI when the text box becomes invisible.
- Managing visibility of the text box alongside IME state, so the
  IME won't decide to display the password keyboard during a fling.

Bug: 21494380
Bug: 37016501
Test: Ran NumberPicker CTS
Change-Id: I459d37d4a54c91e1cb5c7ec68fe0f012b25fb740
2017-05-02 10:43:34 -07:00
Vladislav Kaznacheev
fd48ed6669 Fix VideoView touch and trackball handlers to call super.
Currently VideoView.onTouchEvent and VideoView.onTrackballEvent do not
call super. This completely disables several useful View features
such as long click, context menu or tooltips.

Bug: 37755662
Test: manual
Change-Id: I0c82c32da36e4ca7cacc78027daed2fa298a6b58
2017-05-02 09:39:06 -07:00
Abodunrinwa Toki
ea6cb1215e Add "Paste as plain text" in TextView's toolbar.
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Bug: 36179795
Change-Id: Iee0502678adcfb9de58c107b9247a528718b2c40
2017-05-02 15:16:26 +01:00
TreeHugger Robot
ecc0e16e32 Merge "Use newest scrap view in ListView" into oc-dev 2017-05-01 18:31:39 +00:00
Daichi Hirono
358d0d3297 Don't add other's child as header or footer
Previously ListView#addHeaderView and ListView#addFooterView accepts a
view which is other's child.

The CL adds precondition check not to accept other's child and make the
methods consistent with ViewGroup#addView.

Bug: 37726743
Test: CtsWidgetTestCases
Change-Id: Ibe11f162e9af3c153254966796349b94468b08f3
2017-05-01 13:52:57 +09:00
TreeHugger Robot
093eb12994 Merge "TextClassifier: API rename" into oc-dev 2017-04-30 17:15:55 +00:00
TreeHugger Robot
7f90a9fdb0 Merge "Restricted Context layout font loading in TextView" into oc-dev 2017-04-30 06:50:43 +00:00
Abodunrinwa Toki
e0b57893c6 TextClassifier: API rename
getTextClassificationResult() -> classifyText()
 TextClassificationResult -> TextClassification

Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Bug: 37769880
Change-Id: I2d926e89058babf06bcff390bee3a45e965984e8
2017-04-30 01:06:03 +01:00
Seigo Nonaka
0f07dd5b14 Remove FontVariationAxis.InvalidFormatException.
Use IllegalArgumentException instead.

Bug: 37769084
Bug: 37765945
Test: am instrument -w -e class android.widget.cts.TextViewTest
      android.widget.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.TypefaceTest
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.PaintTest
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.FontVariationAxisTest
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.text.VariationParserTest
      com.android.frameworks.coretests/\
      android.support.test.runner.AndroidJUnitRunner

Change-Id: I50b70e3e7e37585c937dcce2416a83353de62a5d
2017-04-28 15:24:40 -07:00
Clara Bayarri
b7df9d0d6b Restricted Context layout font loading in TextView
When the context is restricted, avoid loading custom fonts in
layouts. This is currently only done by TextView. Loading
system fonts via their string name is still OK, just not by
resource id.

Test: cts attached in topic
Bug: 35763094, 31218679
Change-Id: I0dc3a3eade0439c503c58a582b083d7ba1dd4aa3
2017-04-28 20:48:14 +00:00
Kirill Grouchnikov
b07544cf69 Merge "Tweak initialization order of LinearLayout's dividers" into oc-dev 2017-04-28 13:56:28 +00:00
Svetoslav Ganov
70c0221813 Merge "Implement the rest of autofill importance modes" into oc-dev 2017-04-28 06:30:07 +00:00
Svetoslav Ganov
64cf2bb19b Merge "Force autofill on overflow only if empty" into oc-dev 2017-04-28 06:29:25 +00:00
Svet Ganov
fd31f85d0c Implement the rest of autofill importance modes
Test: CTS tests pass; augmented tests to verify new behavior

bug:36171235

Change-Id: Ieff2b8d7e1c3a3eba456deca7bed70c8e29c415e
2017-04-27 18:16:08 -07:00
Evan Rosky
d0c6cf9bc0 Merge "Only restrict arrows out of text fields from keyboard" into oc-dev 2017-04-27 21:28:13 +00:00
Svet Ganov
54523413f8 Force autofill on overflow only if empty
Test: manual

bug:37244196

Change-Id: I0953546492ade815617d30f698e92282a1172302
2017-04-27 12:32:08 -07:00
TreeHugger Robot
e6746726bc Merge "Revise method comment on setFontVariationSettings" into oc-dev 2017-04-27 17:34:48 +00:00
TreeHugger Robot
cc7f08e997 Merge "docs: Update EditText JavaDoc comments" into oc-dev 2017-04-27 05:24:51 +00:00
TreeHugger Robot
1e5d0768cd Merge "docs: Update Button JavaDoc comments" into oc-dev 2017-04-27 05:21:23 +00:00