Commit Graph

7399 Commits

Author SHA1 Message Date
Sunny Goyal
0ebf88133a Fixing wrong actions were written to parcel when copying
Bug: 66901470
Test: Manual and CTS
Change-Id: I292e0e7d890d4da522045f434982aeeae35eb0fe
2017-09-26 16:44:12 +00:00
Svet Ganov
c2840f9f9f Merge "Hide autofill popup if anchor removed" into oc-mr1-dev am: 8e5e30c5eb
am: 89934be670

Change-Id: Idc925398f0b28ffe7220634cd9b74fba22de7278
2017-09-25 22:41:17 +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
6b8cbb99a4 Merge "Fixing session abandon logging bug" into oc-mr1-dev am: 4fce88dd4d
am: c7812f0fa5

Change-Id: I57abb3d7f4bce7cdda696b57f65475c02ac3b498
2017-09-25 16:03:31 +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
e3c34ce400 Merge "Switch version gate for fallback linespacing to P" 2017-09-21 22:08:02 +00:00
TreeHugger Robot
a762cae719 Merge "Preventing data overwirte in a Parcel" 2017-09-21 20:24:59 +00:00
Roozbeh Pournader
60f555cca8 Switch version gate for fallback linespacing to P
Previously, no version was defined for Android P. Now that
I0a90033239081c583b10021cbc06d032e206beb4 defines it, we can switch
the version gate on the new fallback-based linespacing behavior of
TextView and Switch to it.

Test: bit CtsWidgetTestCases:android.widget.cts.CheckedTextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.EditTextTest
Test: bit CtsWidgetTestCases:android.widget.cts.SwitchTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewTest
Change-Id: Id68ea4b26baa8a632d9f516083a73a0b8879513f
Fixes: 64648475
2017-09-21 12:54:55 -07:00
Sunny Goyal
5b7689f287 Preventing data overwirte in a Parcel
Test: am instrument -w -e class android.widget.RemoteViewsTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Bug: 65576228
Change-Id: Ia1f072c1451eba3c6c13833c5a813e754df901e2
2017-09-21 11:32:13 -07:00
Alan Viverette
dda510800a Merge "Handle null left and right tab strip drawables" into oc-mr1-dev am: 286c7db342
am: 7dbf5b032b

Change-Id: I5c3f616276f1f68a134c48f886cc43d282400415
2017-09-21 01:46:55 +00: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
TreeHugger Robot
d4f7c5bc19 Merge "ActivityOptions.set/getLaunchStackId() be gone!" 2017-09-20 00:09:09 +00:00
Wale Ogunwale
0568aed2af ActivityOptions.set/getLaunchStackId() be gone!
Removed ActivityOptions.set/getLaunchStackId() and replacement
ActivityOptions.set/getWindowingMode() and set/getActivityType()

Test: Existing tests pass.
Test: go/wm-smoke
Bug: 64146578
Change-Id: Ifc1c35f7b13c335cdf1a1694208e9fe0aea0c1fa
2017-09-19 10:36:52 -07:00
Clara Bayarri
a26be3c97c Fix crash in TextView#setHint
Bug: 65821360
Test: bit CtsWidgetTestCases:TimePickerTest
Change-Id: I1ee279691d73f173064d98f6e7d5d5fbd483f682
2017-09-18 15:05:02 +01: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
a2dfc3cc68 Merge "New metrics fields for selection logs" 2017-09-15 15:54:59 +00:00
Clara Bayarri
e128408553 Merge "Fix hint text updates in Extracted text mode" 2017-09-15 15:21:06 +00:00
Clara Bayarri
d8c5e7fc41 Fix hint text updates in Extracted text mode
Updates to the hint on a TextView were not notified to the
ExtractEditText, so there was no way it could know to update.
This change pipes through the hint value when the extracted
mode becomes visible and informs it of changes.

The Editor#reportExtractedText method has been refactored to
be more readable. Note that checks on whether the content
changed are done in the two places in the code that already
called this method, and we explicitely don't want to check
contents when there is a hint change.

Bug: 63980155
Bug: 65691495
Test: bit CtsWidgetTestCases:.TextViewTest
Change-Id: I357dd5c74b61d149cf8612d1f52c7118ec70c696
2017-09-15 12:19:29 +01:00
Alan Viverette
f91ebf5433 Merge "Use correct date pattern for displaying year in DatePicker" into oc-mr1-dev am: c668bc0d92
am: 5b8476637d

Change-Id: I5b1063b5b787f814ef78d55f6f5868dfb21c4f9d
2017-09-15 11:19:07 +00:00
Jan Althaus
786a39dfa5 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.
Change-Id: If12daa2f206fb42be53587decbe2c4abfd689f41
2017-09-15 10:41:16 +02:00
Siyamed Sinir
390a4d6cd5 Merge "Fix maxLines/lines properties for BoringLayout" into oc-mr1-dev am: ae90cfccee
am: 273dcbf053

Change-Id: Ic03051c0a9d491337d9606e082ad83ecb61bd1c7
2017-09-15 05:32:10 +00: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
78940eb859 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
Change-Id: I82b3b2157856c607d08a82c0a3d9fb938af4c06a
2017-09-12 13:53:04 +01:00
TreeHugger Robot
33e9e7d5e6 Merge "Fix smart selection logging bugs." 2017-09-12 11:00:04 +00:00
Petar Šegina
c975213ddb Merge "Enable smart select animation for multiline scenarios" 2017-09-12 10:24:35 +00:00
Petar Šegina
02b345725b Merge "Filter out empty and unnecessary rectangles" 2017-09-12 10:23:36 +00: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
a0cff8b547 Merge "Fixed some small keyboard nav bugs (TabHost, directional focus)" into oc-mr1-dev am: c8b91ecbae
am: 2e7e7a9960

Change-Id: I4843d0b8409909d9b0c1af2950321918adc722bb
2017-09-11 21:24:01 +00: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
Sunny Goyal
f4b3cbc273 Merge "Adding a copy constructor for RemoteViews" 2017-09-11 19:40:58 +00:00
Andrei Stingaceanu
160d23ece3 Merge "TextView longpress 2 haptic feedback fix" into oc-mr1-dev am: 04b6095082
am: ddb8ced959

Change-Id: Id1ebf69c0f3c94f5c505c2bbe2f2dc52cb342fbf
2017-09-11 17:55:39 +00:00
Abodunrinwa Toki
d62a86e64c 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.
Change-Id: Ib73b52ebce999f2cb6e5734e556cd09e47c89a29
2017-09-11 18:23:44 +01:00
Petar Šegina
ba1b8566e4 Filter out empty and unnecessary rectangles
Layout::getSelection will sometimes give us rectangles which are
redundant - specifically, those with dimension zero and those that may
already be contained in some other rectangles. In order to keep the
smart select animation simple and in line with what the user would
visually expect, we remove these rectangles.

Test: manual - verify smart select animation over multiple lines
Test: bit FrameworksCoreTests:android.widget.SelectionActionModeHelperTest
Change-Id: Ia4406d9505366245609b44e3ec3743f84820ba0a
2017-09-11 15:41:12 +01:00
Petar Šegina
9b5b70cf20 Enable smart select animation for multiline scenarios
Test: manual - verify that smart select works when the selection spans
multiple lines

Change-Id: I7a8113559560dc4657c36c66c6059a44d03bf1ae
2017-09-11 15:38:22 +01: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
TreeHugger Robot
5b730ba2a0 Merge "Emit text direction with selection rectangle" 2017-09-07 13:02:22 +00:00
Sunny Goyal
56333a872a Adding a copy constructor for RemoteViews
Copying a remoteView will not longer mutate the original views

Simplifying bitmap cache and memory measurement for remoteViews. A
remoteView tree will have a common bitmapCache, and hence ite memory
estimate would be same as the total bytes allocated to all the bitmaps.

Bug: 62629395
Test: am instrument -w -e class android.widget.RemoteViewsTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I7ea6ce476f19f425431ed01ef22cc97764626230
2017-09-06 08:54:33 -07:00
Petar Šegina
b92c539232 Emit text direction with selection rectangle
In order to properly perform the smart select animation on right-to-left
and mixed text, we need the information about the direction of the text
that is present below the selection rectangle.

Test: manual - verify selection still works and that the generated
directions match the directions of the text on the screen
Test: bit FrameworksCoreTests:android.text.LayoutTest

Change-Id: I564ee2db59ab583c9bff807ad0d0dfeacaf1386f
2017-09-06 15:58:38 +01:00
Petar Šegina
5ab7bb242e Draw SmartSelectSprite in TextView
Instead of the SmartSelectSprite drawing its contents into a View's
ViewOverlay, the SmartSelectSprite can now be drawn on any Canvas. In
order to perform the smart select animation, it is now the TextView that
performs the actual drawing.

Since the TextView can adjust the canvas for its padding and offset,
there is no more need to manually transform the selection rectangles, so
that part can be removed.

Test: manual - verify smart select animation still works
Change-Id: Ibaccf59fd44d5701e6f37d6b4fa97f2b05fd77cc
2017-09-06 14:26:28 +01:00
Abodunrinwa Toki
7c5df649d7 Merge "Delete old TEXT_SELECTION_MENU_ITEM_ASSIST logs." into oc-mr1-dev am: f28b8a8de3
am: 48063322b4

Change-Id: I23f8204732f1f166aacf10d5d147bd3f21025c6b
2017-09-05 16:51:19 +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
Abodunrinwa Toki
57ec6ea1bb 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

Change-Id: Icc9d5b542140bdb01b2ad4211048bd83eae2ce83
2017-09-04 20:40:07 +01:00
Petar Šegina
aee97ac902 Improve and simplify final polygon drawing
The final step of the smart select animation, drawing the outline of all
the rectangles, was not working properly in cases where the rectangles
would touch or intersect, which we cannot guarantee that they won't.

Instead of the previous implementation, we now rely on Path to create
the outline of the rectangles, making much of the code simpler.

Now the polygon generation should work in the general case, which is one
of the prerequisites in getting the smart select animation to work
properly in multiline scenarios.

Test: manual - test the smart select animation with various rectangle
sets
        (100, 100, 500, 500), (300, 300, 700, 700)
        (100, 100, 500, 500), (500, 100, 900, 500)
        (100, 100, 500, 500), (500, 300, 900, 700)
        (100, 100, 500, 500), (300, 300, 700, 500), (200, 500, 400, 700)

Change-Id: I51dd72e18c5efe36df734aa62ab47d57a5946399
2017-09-01 11:57:37 +01:00
TreeHugger Robot
95fc70bcec Merge "Changing RemoteViews to using MethodHandles instead of relection" 2017-08-31 20:11:00 +00:00
TreeHugger Robot
25706748aa Merge "Improve rectangle direction generation" 2017-08-31 18:05:23 +00:00