Commit Graph

6955 Commits

Author SHA1 Message Date
Wale Ogunwale
c9a0452244 Merge "@hide TYPE_APPLICATION_ABOVE_SUB_PANEL window type." into mnc-dev 2015-06-02 18:54:55 +00:00
Wale Ogunwale
3540f93654 @hide TYPE_APPLICATION_ABOVE_SUB_PANEL window type.
Bug: 21572285
Change-Id: Iff56a8ee5b91e02bd20afb7891bd94a0ec1abba9
2015-06-02 11:07:07 -07:00
Svet Ganov
8fa8b95c9d Merge "Respect accessibility importance for before/after node ordering." into mnc-dev 2015-06-02 16:49:47 +00:00
Alan Viverette
5431000830 Merge "Remove strict mode violation from value to string coercion" into mnc-dev 2015-06-02 16:47:53 +00:00
Svet Ganov
2dca7ca9bf Respect accessibility importance for before/after node ordering.
One can set a view to be visited before/after another one for
accessibility but the before/after target views were always added
to the node info for the view regardless if they are included
for accessiilbity. Now the target viwes are reported only if they
should be included for accessibility.

Change-Id: Iba64e6f0ee0dc090c8c3e6a0a940df8c7ecd49d9
2015-06-02 09:45:19 -07:00
Adam Powell
fa3f17f117 Merge "Don't take the compatibility path for non-primary ActionModes" into mnc-dev 2015-06-02 01:00:06 +00:00
Svetoslav
762621ced7 Don't add real children for a view with a node provider
Change-Id: I1dd43fa5ff93e8eb76e2c7587fb13cd1ef097678
2015-06-01 17:21:59 -07:00
Alan Viverette
069767717a Remove strict mode violation from value to string coercion
The legitimate uses of value to string coercion, including the
interaction between lax attribute formatting and AAPT type inference,
combined with the low likelihood of unintentional coercion and low cost
of most string coercions, makes the value to string coercion violation
overkill.

Bug: 21563086
Change-Id: I7892e776d3e5479fcba507749b074c2abdf1b781
2015-06-01 15:18:37 -07:00
Adam Powell
e9fd6d29f4 Don't take the compatibility path for non-primary ActionModes
Action modes that are not of type PRIMARY currently go through some
compatibility gymnastics so that the non-typed startActionModeForChild
ViewParent method has an opportunity to process them. Unfortunately, a
lot of apps in the wild use AppCompat, which intercepts these and
presents its own contextual action bar UI.

In practice this now means that the new floating toolbars for
TextViews and similar components don't show up in the majority of
existing apps. While this may be more correct from a compatibility
standpoint, it presents a poor user experience.

Only take the compatibility code path that calls through the older,
untyped startActionModeForChild method when the type is PRIMARY. The
tradeoff is that apps that previously would use parent views to modify
a text selection action mode will now no longer be able to do so.

Change-Id: I8c892a7a84ec36e6a484a5cba0c95281ea6beafb
2015-06-01 11:26:32 -07:00
Alan Viverette
242b9c4eee Merge "Fix row/column order when unparcelling CollectionItemInfo" into mnc-dev 2015-06-01 16:39:10 +00:00
Mady Mellor
3aa33b3da0 Merge "Update button to BUTTON_STYLUS_PRIMARY" into mnc-dev 2015-06-01 16:17:37 +00:00
Mady Mellor
ef24bc0039 Merge "Update stylus button press recognition in View to use new MotionEvent APIs" into mnc-dev 2015-06-01 16:16:20 +00:00
Mady Mellor
cac7b2b175 Merge "Update stylus button press recognition in GestureDetector to use new APIs" into mnc-dev 2015-06-01 16:16:00 +00:00
Alan Viverette
faeac960cc Fix row/column order when unparcelling CollectionItemInfo
Bug: 21527853
Change-Id: I02a75b9395a4d573f5fd49abcbd282b35e2c8f3c
2015-06-01 09:03:27 -07:00
Filip Gruszczynski
99bcc3eee2 Merge "Revert "Revert "resolved conflicts for merge of 47249f2a to mnc-dev""" into mnc-dev 2015-06-01 15:42:42 +00:00
Yohei Yukawa
512234f196 Merge "Close input session when the view is detached from the window." into mnc-dev 2015-05-30 00:52:30 +00:00
Yohei Yukawa
b13f015ab5 Close input session when the view is detached from the window.
This is the 3rd trial to fix Bug 20820914.

In followig CLs, we have tried to address a input session
leak when the focused view is detached from the focused
window by relying on IMM#focusOut() but failed because of
regressions like Bug 21508503.
- Ib4bd70ce0305a6bde6a929bcc6ad20a2b8402a97
- I219394178e4172bc47864297f1418e677dba25e5
- Id6afc8fc64512225578c62557b96c7dc2e969adf
- Ib1b037594ebbb4ad4cf2d59e21c7a8ca9d8dc930
- I2228ae0c48ad3d9e0b55875f0dcb5ef8c55b0c5f

What we have learned from Bug 21508503 was that re-enabling
IMM#focusOut() probably requires much more work than we
thought.  Also relying on IMM#focusOut() might be overkill
because the situation in Bug 20820914 is really special where
the focused view is detached from the focused window hence
we should be able to be fix the issue more conservatively
by closing input session when and only when the focused
view is detached from the focused view, rather than
re-enabling IMM#focusOut() globally.

Bug: 20820914
Change-Id: Iaf3fe2c065b5bf91e49a729ba46262114bb6da88
2015-05-29 17:44:51 -07:00
Jeff Brown
cb81d18367 Merge "Tell PhoneWindowManager when we start/finish interactive changes." into mnc-dev 2015-05-30 00:33:07 +00:00
Doris Liu
1501da4bae Merge "Fix calls to Rect.intersect() in package android.view" into mnc-dev 2015-05-30 00:31:47 +00:00
Jeff Brown
416c49c404 Tell PhoneWindowManager when we start/finish interactive changes.
Added some new callbacks that can be used to more precisely trigger
certain behaviors that need to happen around the time the device
is put to sleep and locked.

Fixed an issue where the going to sleep signal might be sent too
early on devices that don't support ambient mode due to the extra
wakefulness change between DOZING and ASLEEP.  We are now track
the early / late interactive change work separately from the rest.

Bug: 21375811
Change-Id: I95387195e216ae92a6e45485bd1bd362e41aa45a
2015-05-29 17:28:40 -07:00
Yohei Yukawa
650a91356b Merge "Revert "Rely on IMM#focusOut() to close input session."" into mnc-dev 2015-05-29 20:41:25 +00:00
Doris Liu
f042cd841f Merge "Update doc to include how clipToPadding affects EdgeEffect" into mnc-dev 2015-05-29 20:28:21 +00:00
Yohei Yukawa
0b52ed02df Revert "Rely on IMM#focusOut() to close input session."
This reverts commit 41bb4953da.

Ib1b037594ebbb4ad4cf2d59e21c7a8ca9d8dc930 caused Bug 21508503.
Since it looks like a timing issue, many other applications
could be affected potentially.

Bug 21508503 implies that re-enabling IMM#focusOut() globally
requires much more work than we thought.  Probably the memory
leak found in Bug 20820914 should be addressed in a more
conservative way at the moment, e.g., by plumbing events from
ViewGroup to IMMS.

Bug: 21508503
Bug: 20820914
Change-Id: I2228ae0c48ad3d9e0b55875f0dcb5ef8c55b0c5f
2015-05-29 13:28:13 -07:00
Doris Liu
b134b5e376 Update doc to include how clipToPadding affects EdgeEffect
Bug: 19126514
Change-Id: I72c6ac20b4c72421137d97f77da5425e74f2b09a
2015-05-29 11:20:46 -07:00
James Cook
63b6320af4 Merge "assist: Fix reported colors/styles for TextView/Switch" into mnc-dev 2015-05-29 17:30:23 +00:00
Doris Liu
9607fbe9d7 Fix calls to Rect.intersect() in package android.view
This CL checks for the return value for Rect.intersect() for whether
there is actually an intersection before taking the return intersected
rect. In the case of no intersection (Rect.intersect() returns false),
an empty rect will be used as the intersection.

bug: 7368679
Change-Id: Ib874345210c8f62550627544d717e958d46cfe13
2015-05-28 17:17:28 -07:00
Yohei Yukawa
5176b5451a Merge "Rely on IMM#focusOut() to close input session." into mnc-dev 2015-05-28 23:52:50 +00:00
James Cook
5cfaae4aae assist: Fix reported colors/styles for TextView/Switch
Changes to the data provided to AssistStructure:
* Text foreground color is correct even if the view has not yet been
painted.
* Text background color is now always 1 (TEXT_COLOR_UNDEFINED) for a
TextView, as it has no separate concept of background color.
* Switch now reports the text size/color/style of the label text
(usually user visible) rather than the on/off text on the button
itself (usually hidden in Material, and not usually revelant when
visible).

Bug: 21080375
Change-Id: I7e15f68d89510a76cab76031c2c8ca6ca3f32435
2015-05-28 15:52:44 -07:00
Filip Gruszczynski
2217f61e51 Revert "Revert "resolved conflicts for merge of 47249f2a to mnc-dev""
This includes the fix for the broken dialog windows. The outsets will
only be calculated and applied if the window is full screen, since
they don't make much sense otherwise.

This reverts commit 4bb6b751fb.

Change-Id: I977a85a78c990c1840784dc0be0dddd5a6d84e6b
2015-05-27 15:36:10 -07:00
Alan Viverette
60bf94e3be Merge "Move ApplicationInfo hardware acceleration to public flags" into mnc-dev 2015-05-27 21:30:07 +00:00
Alan Viverette
d70b9e7aea Move ApplicationInfo hardware acceleration to public flags
Bug: 21342038
Change-Id: I5af826f3f2921eef24725c909304243c67f3da78
2015-05-27 14:29:20 -07:00
Mady Mellor
b09334424b Update stylus button press recognition in GestureDetector to use new APIs
Button press events now occur in onGenericMotionEvent. This CL update the
button press detection code in GestureDetector to recognize the gestures
within onGenericMotionEvent rather than in onTouchEvent.

Bug: 21148238
Change-Id: I6729668ed9bb600d8bf5e42e5ba9d8201b642d68
2015-05-27 14:15:57 -07:00
Mady Mellor
68e280074d Update stylus button press recognition in View to use new MotionEvent APIs
Button press events now occur in onGenericMotionEvent. This CL updates
the button press detection code in View to recognize the gesture within
onGenericMotionEvent rather than in onTouchEvent.

Bug: 21148238
Change-Id: I6b5d6d6840e7cb6d3dabf8b138828ae862db8ed4
2015-05-27 13:35:23 -07:00
Alan Viverette
d0699fa569 Merge "Avoid strict mode violation during saveAttributeData" into mnc-dev 2015-05-27 18:00:18 +00:00
Alan Viverette
2232adddc5 Offset accessibility focus rect for view root's scrollY
Previously we were only partially transforming the focus rect into
window coordinates, so it was offset when the window was panned (for
example, when the IME was showing).

Bug: 20113389
Change-Id: I41f5ed20cb1404232b7042d37ca2fc725f9ee476
2015-05-26 15:24:18 -07:00
Yohei Yukawa
41bb4953da Rely on IMM#focusOut() to close input session.
Historically we have been doing nothing in IMM#focusOut().
Problem of ignoring IMM#focusOut() may not be obvious as
long as IMM#focusIn() is called immediately after
IMM#focusOut().  In some particular situations, however,
IMM can fall into an inconsistent state where the software
keyboard continues to be shown even when there is no text
input field.

As reported in b.android.com/171190 or Bug 20820914, we
can easily reproduce that inconsistent state by removing
a focused EditText from the parent view while the IME still
keeps an active connection to the EditText.

This CL tries to address such a situation by staring using
IMM#focusOut() as another trigger to check IME focus.

Note that this CL has no effect if IMM#focusOut was called
after the current window losed the focus. It is supposed to
be taken care of in subsequent CLs for Bug 20612313.

This CL depends on Id6afc8fc64512225578c62557b96c7dc2e969adf.

Bug: 20612313
Change-Id: Ib1b037594ebbb4ad4cf2d59e21c7a8ca9d8dc930
2015-05-26 11:42:43 -07:00
Alan Viverette
75a857cec5 Merge "Handle error states when refreshing accessibility node" into mnc-dev 2015-05-26 17:29:39 +00:00
Selim Cinek
d6623618b2 Fixed logspam and handling subwindows with the input consumer
Bug: 21402648
Change-Id: I4c1c73487dfd19ba452ff2077d8541547f149c3b
2015-05-23 01:57:41 +00:00
Dianne Hackborn
4bb6b751fb Revert "resolved conflicts for merge of 47249f2a to mnc-dev"
This reverts commit c7becb7ee7, reversing
changes made to 8562b08f04.
2015-05-22 16:34:44 -07:00
Adam Powell
eb2b0af22c Restore app expectations around drawable visibility change timing
When we update drawable visibility has changed to be part of
View.onVisibilityChanged instead of an overload of
setVisibility. While this covers more cases that we were previously
missing, it also means that we now set drawable visibility from the
View constructor via the call chain view.setFlags to
view.onVisibilityChanged to drawable.setVisibility, resulting in us
passing a 'this' pointer all over before the object is fully
initialized. (i.e. a Bad Thing.)

In general we've gotten away with playing fast and loose with this
sort of thing as a part of view inflation - calling various non-final
setters that may invoke callbacks as needed rather than initializing
view fields directly. Unfortunately it also means that we can cause a
lot of hard to trace bugs and in the long run we should try to clean
up as much of it as we can.

In this case, some apps were expecting inflation to have finished
completely before any drawable visibility changed. If a view's
visibility changes but it's not attached to a window, does it make a
callback?

The fix: no. We won't dispatch onVisibilityChanged to detached views,
but we will dispatch it when a view becomes attached.

Also fix a bug where we could end up telling a view its visibility
changed to (INVISIBLE | GONE), which just doesn't make any sense.

Bug 20103422

Change-Id: Ifba54c36114e85cf64869afcca766c30d601a16c
2015-05-22 11:21:17 -07:00
Chris Craik
33416a9363 Merge "Disable density scaling for HW canvas" into mnc-dev 2015-05-22 17:57:08 +00:00
Chris Craik
9c08ee0f6c Disable density scaling for HW canvas
bug:20692121

Change-Id: Ief4514ba55857e183fa281f28e5aceac08d51990
2015-05-22 10:49:48 -07:00
Mady Mellor
772fcb96f1 Update button to BUTTON_STYLUS_PRIMARY
MotioneEvent.BUTTON_SECONDARY is no longer used for M+, instead it will
be BUTTON_STYLUS_PRIMARY.

Bug: 21148238
Change-Id: If08a82e7be57798a2a747d29436e0411c76ef58f
2015-05-21 17:46:58 -07:00
Filip Gruszczynski
91e5b0f598 Merge "resolved conflicts for merge of 47249f2a to mnc-dev" into mnc-dev 2015-05-22 00:02:48 +00:00
Yohei Yukawa
c0a9cd440d Merge "Do not clear IMM#mCurRootView in IMM#finishInputLocked()." into mnc-dev 2015-05-21 21:47:36 +00:00
Yohei Yukawa
0f3a99d837 Do not clear IMM#mCurRootView in IMM#finishInputLocked().
This is a follow up CL for I219394178e4172bc47864297f1418e677dba.

As explained in the commit message of I219394178e4172bc47864297f,
IMM#mCurRootView needs to be synchronized with the actual window
focus more precisely to fix Bug 20820914. Hence we should not
clear IMM#mCurRootView in IMM#finishInputLocked() anymore.
Ideally this CL should have been included in the previous CL.

Manually tested following scenarios.
- Repro steps in Bug 6413553.  Made sure that IMM#mCurRootView
  is cleared after switching back from the current application to
  the previous application with back key.
- Test application that calls WebView#showFindDialog(). Made sure
  that LatinIME works fine when switching text fields.  This is
  non-trivial because android.webkit.FindActionModeCallback is
  changed in the previous CL I219394178e4172bc47864297f1418e677db.
- Repro steps in Bug 21144633.  Made sure that we can enter
  recipient's name in the messaging app.

This CL depends on I219394178e4172bc47864297f1418e677dba25e5.

Bug: 20820914
Change-Id: Id6afc8fc64512225578c62557b96c7dc2e969adf
2015-05-21 21:34:07 +00:00
Clara Bayarri
e95cc176bb Update the documentation for ActionMode.Callback2#onGetContentRect
Received feedback from a team that it was not clear what the rect
had to include.

Change-Id: I03ca54ee1092e8af3a2078c42104e1ce88490cd1
2015-05-21 17:45:19 +01:00
Filip Gruszczynski
c7becb7ee7 resolved conflicts for merge of 47249f2a to mnc-dev
This is a merge of chin support.

Change-Id: I436b751b3c4aaa6b46cfcdb475e02eedfa5a5635
2015-05-20 20:15:29 -07:00
Filip Gruszczynski
47249f2a9e am cb89ac84: Merge "Support for devices with a chin." into cw-d-mr1-dev
* commit 'cb89ac84c621e047d81873428325dfd747b90a6b':
  Support for devices with a chin.
2015-05-20 22:54:14 +00:00
Selim Cinek
d3f216d921 Merge "Fixed that touches where incorrectly consumed when fullscreen" into mnc-dev 2015-05-20 22:21:38 +00:00