Commit Graph

5604 Commits

Author SHA1 Message Date
Abodunrinwa Toki
8fbe1a0cfc Merge "Add accessibility actions for the PROCESS_TEXT feature." into mnc-dev 2015-07-02 02:29:34 +00:00
Keisuke Kuroyanagi
f3be3ddfd8 Merge "Fix: Selection handles can remain on home screen." into mnc-dev 2015-07-01 22:44:53 +00:00
Dianne Hackborn
de15edaa9b Work on issue #21589105: Scope WRITE_SETTINGS and SYSTEM_ALERT_WINDOW...
...to an explicit toggle to enable in Settings

Add a new permission flag, saying the permission can be automatically
granted to pre-api-23 apps.  Apply this to SYSTEM_ALERT_WINDOW.

Change-Id: I24a0ceabe7e9f5e458a864d30eda2696ad14a699
2015-07-01 12:37:00 -07:00
Keisuke Kuroyanagi
4712b8ef9e Fix: Selection handles can remain on home screen.
This happened as selection handles are shown even when
selection action mode is not active.

Bug: 22188927
Change-Id: Ifd88b91d98cc6f9b0c578e782144b6eee1bdeec9
2015-07-01 20:06:51 +09:00
Doris Liu
e08f3b3ff5 Merge "Resolve CompoundButton's foreground drawable for layout direction change" into mnc-dev 2015-06-30 21:42:43 +00:00
Doris Liu
99aa13ec10 Merge "Allow null child view when checking whether divider should draw" into mnc-dev 2015-06-30 21:35:09 +00:00
Doris Liu
f102d4266b Allow null child view when checking whether divider should draw
The beginning divider should draw before the first child that is not
set to GONE. Incidentally, there needs to be a check for such a child,
which involves checking the visibility of all the children with lower
indices. This CL takes into account the scenarios where children with
lower indices could be null, in which case we'll treat them as if they
were GONE.

Bug: 22199594
Change-Id: Iefc73ef87beec219898c967b9a3ccebd1e3b5b4c
2015-06-30 13:57:28 -07:00
Alan Viverette
b35e866713 Merge "Handle null argument in ImageView.setImageIcon()" into mnc-dev 2015-06-30 20:53:31 +00:00
Alan Viverette
6ef129e09d Handle null argument in ImageView.setImageIcon()
Provides consistency with setImageDrawable(). Also updates docs and
annotations for setImageZzz() methods that can take null.

Bug: 21664964
Change-Id: Ia9b7f8ee9edb23eeea457520bea4dd261decc794
2015-06-30 13:32:27 -07:00
Maxim Bogatov
7a2e4b8f80 Merge "Let TextView clear accessibility selection index" into mnc-dev 2015-06-30 18:45:52 +00:00
Doris Liu
3380e69f55 Resolve CompoundButton's foreground drawable for layout direction change
This CL adds a step to resolve CompoundButton's foreground drawable when
layout direction has been changed. Prior this CL, only background drawable
of the button resolves its layout direciton in respond to system wide
layout direction change. This CL makes the foreground and background
drawables consistent in layout direciton.

Bug: 16376848
Change-Id: I9a4eb1e010e6ab61ef8684005508bd36486ec1f3
2015-06-30 11:26:47 -07:00
Abodunrinwa Toki
deaf0dbe49 Add accessibility actions for the PROCESS_TEXT feature.
Also refactored the code so that PROCESS_TEXT-related code is shared
by menu item actions and accessibility actions.

Bug: 21890235
Change-Id: Ie932fa9bb5cd3d8bd29f8c82695f3c7490693cbd
2015-06-29 17:34:11 -07:00
Alan Viverette
a1b647c883 Merge "Always remeasure ListView scrap used to obtain minimum width" into mnc-dev 2015-06-29 19:39:29 +00:00
Seigo Nonaka
e96b1c6f82 Merge "Fix crash due to reverse selection." into mnc-dev 2015-06-29 03:02:45 +00:00
Maxim Bogatov
1fa819b337 Let TextView clear accessibility selection index
b/22101633

Change-Id: I861cb705d78b2ed1cf0fab0dab36df3fac7d8256
2015-06-26 16:36:28 -07:00
Mady Mellor
11b64410d9 Merge "Text selection: fix snapping to words when words break across lines" into mnc-dev 2015-06-26 22:36:44 +00:00
Abodunrinwa Toki
1223a75a67 Merge "TextView: add the "Share" accessibility action." into mnc-dev 2015-06-26 22:32:26 +00:00
Mady Mellor
a526683d12 Text selection: fix snapping to words when words break across lines
Some languages do break words across lines and words can break between
lines with hyphenation. If a word has only one character on the current
line with the rest of the characters on the next line, the user would
be unable to move the cursor to the end of the word.

Rather than judging if a user is far enough into a word by using the
full word length, this CL amends the logic to only use the characters
that are on the current line of the word, if the user is far enough into
these characters the handle jumps to the next line to the end of the
word position.

Bug: 21400624
Change-Id: I8b96eb83bea08d9794d1e9db74066bcc3e168ac0
2015-06-26 14:28:12 -07:00
Abodunrinwa Toki
0e5c603192 TextView: add the "Share" accessibility action.
Bug: 21891817
Change-Id: I99b7489845b2103c18fd74d15d0050c34f37ca67
2015-06-26 14:25:15 -07:00
Mady Mellor
450176c52c Merge "Fix: Text selection handles shouldn't be shown in accessibility mode" into mnc-dev 2015-06-26 21:21:56 +00:00
Alan Viverette
2ea329290c Always remeasure ListView scrap used to obtain minimum width
Also turns off ViewPager debug, enabled the scroll indicator on the
DatePicker's year list, and updates the year label's TextView ID to
something more reasonable. Some code cleanup inside ListView.

Bug: 20110431
Change-Id: If1dba955094524d69cc297d7a567a182cef7f11d
2015-06-26 13:31:50 -07:00
Mady Mellor
29f37e1597 Merge "Text selection: When user reaches midpoint jump to end of word" into mnc-dev 2015-06-26 17:38:08 +00:00
Mady Mellor
10f9251736 Merge "Text selection: Fix word boundaries for languages without spaces" into mnc-dev 2015-06-26 17:33:22 +00:00
Mady Mellor
011a42dee7 Fix: Text selection handles shouldn't be shown in accessibility mode
If you select some text normally while in accessibility mode, it
should be cleared and handles should not show if you initiate text
selection using the accessibility context menu.

Bug: 22071639
Change-Id: I32b966e771ba5715a0ab370e6aa602398e5ec534
2015-06-26 09:51:35 -07:00
Seigo Nonaka
084b7a15c9 Merge "Do not show selection action mode when the TextView is not shown." into mnc-dev 2015-06-26 05:10:35 +00:00
Doris Liu
9206d6a0e6 Merge "Fix logic for whether beginning/end divider should be drawn" into mnc-dev 2015-06-25 22:43:14 +00:00
Doris Liu
ec6a4cdeda Fix logic for whether beginning/end divider should be drawn
Bug: 18945384
Change-Id: Ib8e785cb97d288e39a39b968bcb9c05410acbe34
2015-06-25 15:29:41 -07:00
Alan Viverette
8bbae343d2 Ensure partially-detached AbsListView children are removed
Bug: 22052083
Change-Id: If8c30c622206257587441bbd4f02c83eb3a62b60
2015-06-25 14:49:29 -07:00
Alan Viverette
e71c6e3832 Merge "Constrain ListPopupWindow hint width spec to >= 0" into mnc-dev 2015-06-25 20:00:56 +00:00
Alan Viverette
ba4332d9cf Constrain ListPopupWindow hint width spec to >= 0
Bug: 22092169
Change-Id: Ia05302cf8d167aae26eccbf53dd3fd21d09b326d
2015-06-25 13:00:03 -07:00
Alan Viverette
fdf102e62d Merge "Constrain child width and height to >= 0 in FrameLayout.onMeasure()" into mnc-dev 2015-06-25 19:57:03 +00:00
Yohei Yukawa
ab142f7f57 Merge "Handle back key to cancel text action mode in full-screen IME." into mnc-dev 2015-06-25 19:39:36 +00:00
Alan Viverette
39fd902bdb Constrain child width and height to >= 0 in FrameLayout.onMeasure()
Bug: 22093669
Change-Id: I55e8a0289f871b73ed07f3d73e8297786f9acac1
2015-06-25 12:24:27 -07:00
Jun Mukai
46f087c43b Merge "Apply thumbTint and trackTint styles to Switch from xml." into mnc-dev 2015-06-25 18:16:57 +00:00
Alan Viverette
efb49bd811 Merge "Constrain width and height to >= 0 in FastScroller layout" into mnc-dev 2015-06-25 17:08:42 +00:00
Alan Viverette
de14ad55f6 Constrain width and height to >= 0 in FastScroller layout
Bug: 22071990
Change-Id: I9dcb2066ee069a3764b7d711cb341a4dfdc4445e
2015-06-25 09:57:30 -07:00
Seigo Nonaka
86d60cde91 Fix crash due to reverse selection.
Selection start can be bigger than selection end and this kind
of selection is generated by mouse selection at least from L MR1.

To fix and support SHARE button for this kind of selection,
getSelectedText need to invert selection start and selection end
when the selection start is bigger than selection end.

Bug: 22065979
Change-Id: Ide4ac41e3f59d256033aca004450712ca0bb0f03
2015-06-26 01:40:49 +09:00
Seigo Nonaka
145252f840 Do not show selection action mode when the TextView is not shown.
OnPreDraw is called even if the View is not visible.
So need to check isShown() and hasWindowFocus() before calling
starting selection action mode.

This hack is originally introduced for keeping selection on device rotation.
I manually verified this issue does not revive with this CL.

Bug: 22036870
Change-Id: I814db6165e2345fcacedcbd399c1a3985501c8fd
2015-06-26 01:30:40 +09:00
Mady Mellor
d4d802be39 Merge "Fix: Don't display the drag handles when focus is lost" into mnc-dev 2015-06-25 15:54:03 +00:00
Andrei Stingaceanu
3d7109a1f6 Merge "EditText - can not drag handles in extracted mode" into mnc-dev 2015-06-25 15:52:51 +00:00
Mady Mellor
a2861454aa Fix: Don't display the drag handles when focus is lost
The text selection handles should be hidden / shown when the window
loses / regains focus.

Additionally renames method to make more sense.

Bug: 22062480
Change-Id: I6e160234cf112ee285367637e2f1c14defd82e89
2015-06-25 08:40:27 -07:00
Andrei Stingaceanu
1cb1f1523a EditText - can not drag handles in extracted mode
In TextView's onPreDraw method, startSelectionActionMode()
is called, but the selection has already been started so
in startSelectionActionMode() it shows the
insertionController which hides the selectionController.
Fix this by adding a check to start the action mode only
if it is not already started.

Bug: 22028858
Change-Id: I2999423155b7a63a7d879bc8ea5032e17dff459f
2015-06-25 11:54:43 +01:00
Jun Mukai
9fb302cfbc Apply thumbTint and trackTint styles to Switch from xml.
Bug: 21664957
Change-Id: Id08ae89fb1586968df4b901816a8e108bb8570af
2015-06-24 18:31:06 -07:00
Alan Viverette
39310d3606 Avoid negative childSpecSize in RelativeLayout
Bug: 22071351
Change-Id: I951fd7c7973c49581d3ea30bae64d6c20bc362be
2015-06-24 17:03:48 -07:00
Alan Viverette
9bf9a3a99e Merge "Constrain FastScroller max width to be >= 0" into mnc-dev 2015-06-24 18:22:33 +00:00
Alan Viverette
c98922ba2f Constrain FastScroller max width to be >= 0
Bug: 22055552
Change-Id: Ib0bba93e5490ad9d8668c9532f23654a8cb702d9
2015-06-24 10:22:02 -07:00
Andrei Stingaceanu
2e5615467e Merge "Floating toolbar shown after rotation in extract mode" into mnc-dev 2015-06-24 09:16:36 +00:00
Yohei Yukawa
38940aab69 Handle back key to cancel text action mode in full-screen IME.
This CL is a follow up to I7998c8ee2162a0e01525a0cd66ec14fa505,
which completely removed ExtractActionMode including back key
handling in InputMethodService when full-screen mode is enabled.

It turns out that back key events still need to be handled in
InputMethodService when full-screen mode is enabled so that
users can still cancel floating text action mode with back key.

Bug: 22034992
Change-Id: I5f8db34f7425eef343d40d9820925ea6aaf9fccc
2015-06-24 00:20:24 -07:00
Dianne Hackborn
a6fb1e70ff Merge "Fix issue #20654534: API Review: android.app.assist" into mnc-dev 2015-06-23 19:33:04 +00:00
Keisuke Kuroyanagi
1384d1d900 Merge "Fix: TextView makes new layouts too frequently." into mnc-dev 2015-06-23 17:56:48 +00:00