Commit Graph

7317 Commits

Author SHA1 Message Date
Treehugger Robot
8b764a0dab Merge "[DO NOT MERGE] Fix some mouse + list-item selection/scrolling issues" 2018-02-16 20:02:26 +00:00
Evan Rosky
ca57523614 [DO NOT MERGE] Fix some mouse + list-item selection/scrolling issues
Any "touch" interaction now hides selection (since mouse
doesn't enable touch-mode, this wasn't happening anymore;
also, allowing listview to scroll an actual selection
off-screen would be very involved and risky).

The selector hilight remains (since mouse doesn't enter
touch-mode). This is a new scenario, so this change also
makes sure to hide the selector hilight when it's target
view is scrolled off-screen.

Bug: 67881712
Bug: 67720587
Test: Existing CTS tests still pass. Can now click list items
      via mouse even when scrolled. Visually checked that that
      selector hilight is not visible if off-screen.
Change-Id: Ia7b0fd7b247e8d9d9e609364a5500717df648fd9
2018-02-01 00:20:37 +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
Hidehiko Tsuchiya
a0c8c1cfc8 Fix an incorrect display position of error popup in RTL layout
Symptom:
The display position of error popup is incorrect in RTL layout such as
Arabic language.

Root cause:
In LTR layout, a popup window is anchored to the bottom-left corner of
the anchor view. But in RTL layout, it's anchored to the bottom-right.
showError calculates a position for RTL by itself and it gets a wrong
result.

Solution:
Set the base alignment of the error popup to the bottom-left even though
it's in RTL.

Bug: 69402857
Change-Id: Iae099984e6c47feca078658ddc44ab905995fe0d
2017-11-16 21:55:45 +09:00
Abodunrinwa Toki
ba60ab604c Flags to enable/disable smart selection in EditText
1. smart_selection_enabled_for_edit_text
   Disables smart selection for editable text.
2. smart_selection_dark_launch
   Dark launch TextClassifierImpl.suggestSelection(...)
   In this mode we run the method, but never change the user's
   selection to measure the quality of the results based on what
   the user actually wanted.

Bug: 65959640
Test: Manually tested flags turn on/off feature with 'adb shell
settings put global' and GServices override.
Test: bit FrameworksCoreTests:android.provider.SettingsBackupTest
Merged-In: Iacc561c8ee004b0123de66ad1ee06b1f56b4e4b4
Change-Id: Iacc561c8ee004b0123de66ad1ee06b1f56b4e4b4
2017-10-13 16:45:31 +01:00
Abodunrinwa Toki
be60f06a1b Increase the duration allowed for a TC result.
Increase the duration allowed for a TextClassifier (TC) result when
it is being initialized for the first time.
Initialization typically takes more time that other calls to the TC.
A timeout during initialization means the user doesn't see the
effect of running the TC the first time. Subsequent calls typically
work fine as they're less likely to timeout.
We increase this value only slightly because we don't want the user
waiting too long for a slow TC's result. Finding the right balance
is an art and most likely depends on the TC being used.

Note that although a TextView's TC can change for each individual
call to the TC, such a situation does not benefit from the bump in
the timeout. Again, we really want to discourage larger timeouts.

Fixes: 66217281
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: Manual test:
  - Delayed TextClassifier response by about 150ms (allowing only 50ms for initialization)
  - Before cl: Sometimes the result is not shown to the user the
    first time the textclassifier runs
  - After cl: Results consistently show for even for first
    textclassifier call
Merged-In: Iabc8279fa57ef6a9a2db0c7e9c7e3ab8c131bf02
Change-Id: Iabc8279fa57ef6a9a2db0c7e9c7e3ab8c131bf02
2017-09-29 21:41:54 +01:00
Abodunrinwa Toki
8f22de0e7f Fix crash due to TextView.getText() returning null.
This CL ensures that a null text is not passed to
TextClassificationHelper.reset(...)

This CL does not handle the issue of TextView.getText() being null.

Bug: 65682674
Test: none
Merged-In: Id8bdc062ecf21cc14810586580fef9052672cfd8
Change-Id: Id8bdc062ecf21cc14810586580fef9052672cfd8
2017-09-27 11:52:21 +00:00
TreeHugger Robot
8e5e30c5eb Merge "Hide autofill popup if anchor removed" into oc-mr1-dev 2017-09-25 22:24:25 +00:00
Jan Althaus
b3513a130d Fixing session abandon logging bug
Previously, making two selections quickly one after the other could lead
to the first session missing the terminal event, and the second one getting
terminated prematurely - getting marked incorrectly as abandoned.

Bug: 64914512
Test: Manually tested that logs are correct.
Change-Id: Icd75dcabe707b591f30629b9b9b42c5459ed7dda
2017-09-25 10:37:24 +02:00
Svet Ganov
77150c5fbb Hide autofill popup if anchor removed
Test: Manual
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

bug:64601372

Change-Id: Ic55dabb99cd5015d318ab3be1231b6aa5c67294e
2017-09-23 10:13:06 -07:00
TreeHugger Robot
286c7db342 Merge "Handle null left and right tab strip drawables" into oc-mr1-dev 2017-09-20 13:59:05 +00:00
Alan Viverette
00e9401e00 Handle null left and right tab strip drawables
Change-Id: I7a44fadc33a05c884e81d9bbb12e868937ab95f3
Fixes: 65726084
Test: bit CtsWidgetTestCases:.TabWidgetTest\#testStripDrawables
2017-09-15 16:59:15 -04:00
Jan Althaus
019389a638 New metrics fields for selection logs
Changes that affect logging:
- Switched to new category/actions/fields that are used exclusively by
  selection logging.
- Action types are now logged in the tron type (the information that was
  previously in the field could be derived from other fields).
- Entity types are now logged in the tron sub type.
- Delta time from previous event is now zero for first event (was time
  since epoch).
- The smart select model version is now written for all events after
  smart select has run. (i.e. better support for analysis based on
  terminal events alone)
- Restoring the logging removed in ag/2901629.

Internal only changes:
- Made debug statement conditional on DEBUG_LOG_ENABLED.
- Reduced logging tag length to fit into 23char limit.

Bug: 64914512
Test: Manually tested that logs are correct. Will follow up with automated tests.
Merged-In: If12daa2f206fb42be53587decbe2c4abfd689f41
Change-Id: Iec0f6cf1f9f2efdc8518133cf8551cd96b095ad8
2017-09-15 18:17:57 +02:00
TreeHugger Robot
c668bc0d92 Merge "Use correct date pattern for displaying year in DatePicker" into oc-mr1-dev 2017-09-14 21:49:43 +00:00
Siyamed Sinir
dcb33f1618 Fix maxLines/lines properties for BoringLayout
Line height calculation with maxLines set to zero displayed a single
line when BoringLayout was used. This CL fixes it to show zero lines.

Test: Added related CTS tests to TextViewTest and EditTextText
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.EditTextTest

Bug: 65435738
Change-Id: Ic21eb50b31666b2dcc2398278010fa072ea1ff67
2017-09-13 09:05:53 +00:00
Abodunrinwa Toki
89bda32771 Log the "change selected text" gesture.
This logs when the selected text is changed e.g. by typing on
the hard or soft keyboard.

Bug: 64914512
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Merged-In: I82b3b2157856c607d08a82c0a3d9fb938af4c06a
Change-Id: I82b3b2157856c607d08a82c0a3d9fb938af4c06a
2017-09-12 14:04:42 +01:00
Abodunrinwa Toki
cd2497b534 Fix smart selection logging bugs.
- Fix count with selection start index inside a word
- Properly handle whitespace characters
- Set the model version tag

Bug: 64914512
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: Manually tested that logs are correct. Will follow up with automated tests.
Merged-In: Ib73b52ebce999f2cb6e5734e556cd09e47c89a29
Change-Id: Ib73b52ebce999f2cb6e5734e556cd09e47c89a29
2017-09-12 00:20:40 +01:00
Evan Rosky
c8b91ecbae Merge "Fixed some small keyboard nav bugs (TabHost, directional focus)" into oc-mr1-dev 2017-09-11 20:25:50 +00:00
Andrei Stingaceanu
4303f22535 TextView longpress 2 haptic feedback fix
TextView#performLongClick() calls View#performLongClick which
calls View#performLongClickInternal() which, if handled, performs
the longpress haptic feedback and returns handled. TextView
looks at this return value and if it is true then makes another
call to perform longpress haptic feedback. Remove the duplicate
call in TextView as the one in the parent (View) is sufficient.

Bug: 65397911
Test: manual
Change-Id: Ic73a86637486d5382b63f1c1b37783e238452841
2017-09-08 11:18:56 +00:00
Abodunrinwa Toki
fadd4288df Delete old TEXT_SELECTION_MENU_ITEM_ASSIST logs.
This field is now being used for new smart selection logging.
See: Icc9d5b542140bdb01b2ad4211048bd83eae2ce83

Bug: 64914512
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsAccessibilityServiceTestCases:android.accessibilityservice.cts.AccessibilityTextTraversalTest
Change-Id: If1ce8ca038b089500cd7adb9a146330abe909407
2017-09-05 14:19:52 +01:00
Abodunrinwa Toki
5ddd3ed855 TextView text selection interaction logging.
TODO: Log typing over selection

Bug: 64914512
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsAccessibilityServiceTestCases:android.accessibilityservice.cts.AccessibilityTextTraversalTest

Merged-In: Icc9d5b542140bdb01b2ad4211048bd83eae2ce83
Change-Id: Icc9d5b542140bdb01b2ad4211048bd83eae2ce83
2017-09-04 20:47:40 +01:00
Selim Cinek
87c3153dcd Transforming all texts of decorated media custom views
Since otherwise they would be illegible with the color
tranformation.

Change-Id: I5c1fa085fc3d6f682012c267d489a95fc7073f32
Fixes: 64810767
Test: manual, add decoratedMediaCustomView
2017-08-23 02:30:14 +00:00
TreeHugger Robot
9d41e8cd47 Merge "Fixed a bug with decorated custom views" into oc-mr1-dev 2017-08-22 22:48:14 +00:00
Selim Cinek
fc8073c4b6 Fixed a bug with decorated custom views
Even if their layout still maches, the content was unrecoverably
destroyed, so we can't just reapply it anymore.

Fixes: 62911941
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationInflaterTest.java

Change-Id: I3a50c96484686958570ac5e4949df3ad4b8a421a
2017-08-22 14:58:59 -07:00
Alan Viverette
ca38c43604 Use correct date pattern for displaying year in DatePicker
Also uses lambdas where appropriate.

Change-Id: I1b97745e434dc12cb88b427f8cd0b3cc66a73267
Fixes: 64339201
Test: visual check in Japanese locale
2017-08-18 16:56:33 +00:00
Felipe Leme
f480e8cad5 Improved autofill support on DatePicker and TimePicker:
- Save autofilled value so UI is properly highlighted.
- Notify TimePicker listener just once.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases
Test: cts-tradefed run commandAndExit cts-dev -m CtsWidgetTestCases -t android.widget.cts.DatePickerTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsWidgetTestCases -t android.widget.cts.TimePickerTest

Fixes: 37098837

Change-Id: I38d64c107f6059b94c92676ea37681006474f519
2017-08-15 10:42:58 -07:00
Jeff Sharkey
67f9d5070a Fix broken javadocs.
Bug: 64337634
Test: make -j32 doc-comment-check-docs
Change-Id: I20fdd3dcddef09111d35946c41c596c7689effa6
2017-08-06 07:37:08 -06:00
Andrei Stingaceanu
8719c2a8e6 Merge "AutoSize TextView - fix transformation method" into oc-mr1-dev 2017-08-04 13:08:40 +00:00
Evan Rosky
815fb1f40c Fixed some small keyboard nav bugs (TabHost, directional focus)
- TabHost was forwarding Tab/shift+tab/space to its content
  instead of navigating through the tabs.
- FocusFinder's directional focus considered 2 touching Views to be
  overlapping which would yield confusing directional movement at
  times.

Bug: 62943663
Bug: 62911028
Test: Added CTS tests
Change-Id: I253f66b7513daf5c2c9fdeed8a2fb930b4fd8db4
2017-07-31 11:03:02 -07:00
Sergey Vasilinets
3c9c422d33 Merge "Revert "Revert "Update overscroll and toast UI""" into oc-dr1-dev
am: 2cf8f91637

Change-Id: Ia0f4dc6193776e0b37eb7e2d2048918510cae535
2017-07-28 22:02:14 +00:00
Sergey Vasilinets
2cf8f91637 Merge "Revert "Revert "Update overscroll and toast UI""" into oc-dr1-dev 2017-07-28 21:46:43 +00:00
Sergey Vasilinets
ebfaca5246 Revert "Revert "Update overscroll and toast UI""
This reverts commit 45c493f2c2.

Change-Id: Idefc8e1b6f954def7ef4cdf08b687042a6091a0d
2017-07-27 23:29:34 +00:00
Andrei Stingaceanu
6e82029a0f AutoSize TextView - fix transformation method
AutoSize now takes the text transformation method into
account when measuring the view.

Bug: 63889588
Test: cts-tradefed run cts-dev -m CtsWidgetTestCases -t
android.widget.cts.TextViewTest#testAutoSizeCallers_setTransformationMethod

Change-Id: I52f4bf6ea2f45342efa04b742a9debdac69f9c4c
2017-07-27 10:03:33 +00:00
Aurimas Liutikas
0aadeed536 Merge "Revert "Update overscroll and toast UI"" into oc-dr1-dev 2017-07-26 22:36:59 +00:00
Aurimas Liutikas
45c493f2c2 Revert "Update overscroll and toast UI"
This change broke android.uirendering.cts.testclasses.EdgeEffectTests.

This reverts commit 6085f8a16b.

Bug: 64085792

Change-Id: I70ccebebb54dabf1ec0ee5002adca93e44104a1e
2017-07-26 22:24:21 +00:00
Chet Haase
1c31f9653f Merge "Update overscroll and toast UI" into oc-dr1-dev 2017-07-26 05:40:41 +00:00
Chet Haase
6085f8a16b Update overscroll and toast UI
Overscroll updates:
Same shape, but smaller radius (doesn't come as far into the view)
and more translucent (max 15% instead of 50%). Overall, more subtle.

Toast updates:
Light background, smaller, dark font, closer to the bottom of the
container.

Test: manual unit tests. Also:
cts test ToastTest for toast changes
cts test EdgeEffectTests for EdgeEffect changes (adding some tests to
known-failures for now, due to brittle golden-image failures - see
CL ag/2596621)
Bug: 30563264  Refresh toast visuals for Android ODR
Bug: 63010438  Tweaks to overscroll animation
Change-Id: I0fac6322b0b81d030c8d174852c134211290bbea
2017-07-26 05:40:02 +00:00
Felipe Leme
2e58b1672e Move cursor to end of text when autofilling.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testAutofillMovesCursorToTheEnd
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 62669787

Change-Id: I70a583c71057804334e86ed3f7dd2aca8da20922
2017-07-25 10:37:02 -07:00
Selim Cinek
8ffa981686 Merge "Reducing bitmap sizes in notifications" into oc-dr1-dev 2017-07-19 23:41:44 +00:00
Selim Cinek
15733d1f85 Reducing bitmap sizes in notifications
Bitmap sizes could be arbitrary large when they were sent
over to the system. We're now reducing them to reasonable
sizes.s

Also fixed that notification bitmaps were not put into
ashmem anymore since it got lost in a refactor.

Test: code inspection
Bug: 62319200
Merged-In: I87db7656e749666b9eab1f67fd497f155c407e18
Change-Id: I87db7656e749666b9eab1f67fd497f155c407e18
2017-07-19 18:06:09 +00:00
Selim Cinek
d0426628f6 Reducing bitmap sizes in notifications
Bitmap sizes could be arbitrary large when they were sent
over to the system. We're now reducing them to reasonable
sizes.s

Also fixed that notification bitmaps were not put into
ashmem anymore since it got lost in a refactor.

Test: code inspection
Bug: 62319200
Change-Id: I87db7656e749666b9eab1f67fd497f155c407e18
2017-07-19 11:05:26 -07:00
TreeHugger Robot
e38db1b9be Merge "Fix calculation of RelativeLayout width in RTL mode" 2017-07-14 21:10:57 +00:00
TreeHugger Robot
41db50cd25 Merge "Disable smart sharing for password fields." 2017-07-14 20:21:59 +00:00
Abodunrinwa Toki
76b51dc450 Disable smart sharing for password fields.
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Bug: 62340817
Change-Id: Ifbf2c39d9f304251adc8c4acdf1b4fd6914011d8
2017-07-14 18:31:04 +01:00
TreeHugger Robot
267c6b2a5b Merge "Avoid FloatingToolbar flickers" 2017-07-14 13:44:45 +00:00
Roozbeh Pournader
4d4596aae8 Fix calculation of RelativeLayout width in RTL mode
Fixes: 37035671
Test: Manual
Test: bit CtsWidgetTestCases:.RelativeLayoutTest
Change-Id: I82feecdba7d1ed1198580758ab1f68932bb50aa7
2017-07-13 19:11:05 -07:00
Roozbeh Pournader
bfe8b1cdd6 Merge "Merge "Make TextInputTimePickerView use localized input" into oc-dr1-dev am: dd74c1a8cd" into oc-dr1-dev-plus-aosp
am: d792c31806

Change-Id: I91e28ff9aa7b2bea64dcfe2371f8a734ea8cbb6e
2017-07-14 00:57:59 +00:00
Roozbeh Pournader
f3cda89def Make TextInputTimePickerView use localized input
Previously, TextInputTimePickerView used the default numeric IME, which
could result in cases where the digits displayed in the text fields were
native, but the IME showed ASCII digits resulting in a mix.

Now we use setImeHintLocales to hint that we need a localized IME.

Change-Id: Ic4041dcc65a31bd00741c6d96d8cbc5dac9d77c8
Fixes: 63650251
Test: Manual (tested under en-US and ar-BH locales)
2017-07-13 15:25:24 -07:00
Abodunrinwa Toki
4a7aeb3cb0 Avoid FloatingToolbar flickers
by:
 1. Restricting 'moving hide' -- where we hide the toolbar if the
    toolbar is moving.
 2. Hide the toolbar when transitioning to 'select all' -- where the
    toolbar is refreshed.

Bug: 32910217
Bug: 30418276
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
bit CtsWidgetTestCases:android.widget.cts.TextViewTest

Change-Id: I1f44ee765d74bbcf08e6e7cd635f76d1e8f6305b
2017-07-13 21:48:51 +01:00
Sumir Kataria
37b8567a87 clearChoices when setting AbsListView adapters.
This allows us to reset mCheckedItemCount to 0 to match the clearing
of check states.

Bug: 63559021
Fixes: 63559021
Test: Added test to AbsListViewTest.

Change-Id: I47a0fbc25448addf75a3f7e5a282bb98360200dd
2017-07-12 10:39:41 -07:00