Commit Graph

8262 Commits

Author SHA1 Message Date
Selim Cinek
f874020399 Merge "Fixed a few accessibility issues with notifications and groups" into nyc-dev
am: ddc6de1eda

* commit 'ddc6de1eda495790e6564438994df5d49ddf248f':
  Fixed a few accessibility issues with notifications and groups

Change-Id: Iaa2ddc8bedaad3623190e65116f0d8b85687eb78
2016-05-31 19:36:27 +00:00
Selim Cinek
ddc6de1eda Merge "Fixed a few accessibility issues with notifications and groups" into nyc-dev 2016-05-31 19:26:16 +00:00
Selim Cinek
ddf1b399d8 Fixed a few accessibility issues with notifications and groups
Change-Id: I78fa62884eaa0efe825b5eb1e6cac7d88fc05a7f
Fixes: 28069681
2016-05-27 17:04:56 -07:00
Jorim Jaggi
26dea2d518 Merge "Close IME when attaching dock stack" into nyc-dev
am: c5fc6c602c

* commit 'c5fc6c602c16f0e985d8f8ba7f94075229e52320':
  Close IME when attaching dock stack

Change-Id: I40abf80fcea522c8082e622c33f3a6726f781145
2016-05-27 21:15:26 +00:00
Jorim Jaggi
3c5d0f1041 Close IME when attaching dock stack
So we don't end up with animation weirdness.

Bug: 28905720
Change-Id: I04124995dd99fa26d2e9be467c5976d7b20810a7
2016-05-27 21:08:39 +00:00
Teng-Hui Zhu
b076ee0a42 Merge "Update the light center when the root view\'s layout changed" into nyc-dev
am: e78ba24c17

* commit 'e78ba24c176fd6a0c54eaf7e52be545952ba1ab7':
  Update the light center when the root view's layout changed

Change-Id: I03e6d183e2a98b4d08f1e5be74447ddf942e8337
2016-05-26 17:53:31 +00:00
Tenghui Zhu
e78ba24c17 Merge "Update the light center when the root view's layout changed" into nyc-dev 2016-05-26 17:48:49 +00:00
Michael Wright
4f6ae7bbaa Merge "DO NOT MERGE Remove Pointer Capture API" into nyc-dev
am: c396f0f70e

* commit 'c396f0f70ef40ea0fb42a0872a13f4c4e9a6a5f0':
  DO NOT MERGE Remove Pointer Capture API

Change-Id: Iede50a709849ed27cb9723a565b946e00fb23be7
2016-05-26 14:39:03 +00:00
Michael Wright
c396f0f70e Merge "DO NOT MERGE Remove Pointer Capture API" into nyc-dev 2016-05-26 14:03:47 +00:00
Phil Weaver
062d24f9ec Merge "Improve accessibility window title behavior" into nyc-dev
am: 7ab1a4d286

* commit '7ab1a4d286898acffd1f3b444f9efc9e1d2a104e':
  Improve accessibility window title behavior

Change-Id: I29286da845751351f3dcf603efb12441a6efe74e
2016-05-26 00:18:34 +00:00
Phil Weaver
7ab1a4d286 Merge "Improve accessibility window title behavior" into nyc-dev 2016-05-26 00:11:25 +00:00
Phil Weaver
2a7e4442bf Improve accessibility window title behavior
Suppress the default, unlocalized strings from being read as title.

Bug: 28744278
Change-Id: Iea0f7d8fed3d6428ada725cf3ffa077ba974b74a
2016-05-25 12:48:13 -07:00
Robert Carr
e1b1fb1740 Merge "Force pending transactions to flush before screenshot." into nyc-dev
am: 39e8022a75

* commit '39e8022a75507be06179c3de7358cebb1bb22e06':
  Force pending transactions to flush before screenshot.

Change-Id: I2dc18293c1507a7f427c3ad554d3f70467dac98d
2016-05-25 19:21:16 +00:00
TreeHugger Robot
39e8022a75 Merge "Force pending transactions to flush before screenshot." into nyc-dev 2016-05-25 19:16:13 +00:00
Mady Mellor
8bfb5b971d Merge "Changes based on API council feedback for performContextClick" into nyc-dev
am: 7c17e70f2f

* commit '7c17e70f2f795ca06006ff2560c8b8211ce1dd52':
  Changes based on API council feedback for performContextClick

Change-Id: Ibf53f8081db8b847d18eaa8fee983b677b62f9bc
2016-05-25 19:08:17 +00:00
Mady Mellor
7c17e70f2f Merge "Changes based on API council feedback for performContextClick" into nyc-dev 2016-05-25 19:00:08 +00:00
Mady Mellor
4f3ab93147 Changes based on API council feedback for performContextClick
Added an overloaded version with (float x, float y).

Fixes: 28295818
Change-Id: I41c2bf225964436655986b3ad4d0c630c658e38b
2016-05-25 09:52:51 -07:00
Yohei Yukawa
ef68474698 Merge "Make IMM more robust to spurious window focus-in" into nyc-dev
am: 50c33d1ca1

* commit '50c33d1ca1218ec00eb37f66a7c11315603c9ef7':
  Make IMM more robust to spurious window focus-in

Change-Id: I1d9a138798d982f2164907b49713a7b90cec9adc
2016-05-25 04:58:20 +00:00
Yohei Yukawa
8e9214b4bd Make IMM more robust to spurious window focus-in
InputMethodManager (IMM) has a latch switch named IMM#mHasBeenInactive
to forcefully refresh IME focus state when an inactive client
(IMM#mActive == false) is gaining window focus.  However, it turns out
that there is a race condition where the latch could be unexpectedly
turned off. This is probably what we have been chasing in bug 25373872.

Imagine the following scenario:

  1. An app receives MSG_WINDOW_FOCUS_CHANGED w/ hasWindowFocus=false
  2. IMM inside the app receives MSG_SET_ACTIVE w/ active=false
  3. The app receives MSG_WINDOW_FOCUS_CHANGED w/ hasWindowFocus=true
  4. The app receives MSG_WINDOW_FOCUS_CHANGED w/ hasWindowFocus=false
  5. The app receives MSG_WINDOW_FOCUS_CHANGED w/ hasWindowFocus=true

Here, our current strategy has been:
  A. Turn on the latch when MSG_SET_ACTIVE (w/active=false) is handled.
  B. Turn off the latch and ask IMMS to start input when
     MSG_WINDOW_FOCUS_CHANGED (w/ hasWindowFocus=true) is handled.

The problem is that in the step B IMMS can reject the request if
WindowManagerService (WMS) tells that the window in question no longer
has window focus. This is not surprising because the app is
just handling messages in the message queue sequentially.  As a result,
the IME focus is not updated expectedly in the step 5, because the latch
is no longer enabled as we expected.

With this CL, the latch will be re-enabled if the app fails to start
input while IMM#mActive is false as a short-term solution.

In future we may want to address this issue in protocol level so that
we can address other known issues such as bug 26851566 at the same time.

Bug: 28281870
Change-Id: I60adb38013b063918b074c7b947649eada77b2c8
2016-05-24 23:55:29 +00:00
Mady Mellor
470c001355 Merge "Children should have backgrounds" into nyc-dev
am: 31e49b0964

* commit '31e49b0964cfba0b6b91e8ae67cbc04730098569':
  Children should have backgrounds

Change-Id: I4c123a7cf9efd38c46ff155a70f5b9c053e4df02
2016-05-24 21:09:33 +00:00
Mady Mellor
b0a824687f Children should have backgrounds
To add a background to children of a group, a couple of things
are changed when a group is in the expanded state:
- The parent's shadow + background is removed
- The group header is given a background and elevation
- The children are elevated to cast a shadow and have backgrounds
- When it's fully expanded the dividers won't be shown
- There's extra height added to the parent so that the child
  may cast the bottom shadow of the group
- As the children move into the bottom stack the last visible
  one alters its height and the ones below it are hidden
  to achieve the clipping effect

Fixes: 27591195
Fixes: 28655641
Change-Id: I0484308843e9b8bc10391387e54de07973a48f7d
2016-05-24 11:39:12 -07:00
Robert Carr
e9953b1752 Force pending transactions to flush before screenshot.
Following 14e54ba747 (ag/1043009) we need to push an empty
synchronous transaction if we want to ensure all previous
transactions have occured before taking a screenshot. In
light of Bug 7552304 it seems wise to do this before screenshoting
applications.

Bug: 27098060
Bug: 7552304
Change-Id: I6d7dfbe634a288c55449d2f1d6fbbfc13bab08ad
2016-05-23 20:57:11 -07:00
Phil Weaver
f2b72b3a9d Merge "Fix a11y crash when window layer isn\'t unique." into nyc-dev
am: 227d33439d

* commit '227d33439da72495b39508ebc7e4f3719bb5175f':
  Fix a11y crash when window layer isn't unique.

Change-Id: Ie5bfa1fcee7ec463190ef73311f20f3a6f087e82
2016-05-19 21:57:12 +00:00
Phil Weaver
227d33439d Merge "Fix a11y crash when window layer isn't unique." into nyc-dev 2016-05-19 21:50:29 +00:00
Phil Weaver
adaafb2980 Fix a11y crash when window layer isn't unique.
TalkBack is seeing crashes that I can only explain by our assumption
that window layer is unique in all cases. TalkBack reports that it
happens during animation, so I assume that the layer may repeat
transiently.

Reducing our dependence on this assumption by traversing the list of
windows sorted by layer without assuming that the list has the same
length as the list of unsorted windows.

Also documenting the undefined behavior of SparseArray when indexing
beyond its bounds. The undefined behavior itself is intentional for
performance reasons.

Bug: 28679528
Bug: 28815817
Change-Id: I0c9f90b0b458b4cde465f603ba204fe6691e5c2c
2016-05-19 13:32:24 -07:00
Michael Wright
1831ca8f04 Merge "DO NOT MERGE Rename PointerIcon and Pointer Capture APIs" into nyc-dev
am: a1e0cebf3a

* commit 'a1e0cebf3a18ac097d370e21d698e079f974bfff':
  DO NOT MERGE Rename PointerIcon and Pointer Capture APIs

Change-Id: I20532a3148a99d4ea91ba7dc050f8669d5f19400
2016-05-19 15:12:30 +00:00
TreeHugger Robot
a1e0cebf3a Merge "DO NOT MERGE Rename PointerIcon and Pointer Capture APIs" into nyc-dev 2016-05-19 15:03:36 +00:00
Yohei Yukawa
ddaf3f4681 Merge "Move LocaleList to avoid layering violation." into nyc-dev
am: 31884efd13

* commit '31884efd13b3ac60078edaa0b7e8a4b75d995538':
  Move LocaleList to avoid layering violation.

Change-Id: I9132fe456a8d79569c651dac0a0bce0153444767
2016-05-18 02:18:38 +00:00
Yohei Yukawa
31884efd13 Merge "Move LocaleList to avoid layering violation." into nyc-dev 2016-05-18 02:14:26 +00:00
Chris Craik
77f706980e Merge "Document that SurfaceView is synchronous in N" into nyc-dev
am: 0cfbb7643e

* commit '0cfbb7643ef81cc8d1fd72bfe7c651d0e5e04949':
  Document that SurfaceView is synchronous in N

Change-Id: I508585ec749b0a5d4e241757d655349b09b31566
2016-05-18 00:55:17 +00:00
TreeHugger Robot
0cfbb7643e Merge "Document that SurfaceView is synchronous in N" into nyc-dev 2016-05-18 00:51:57 +00:00
Hangyu Kuang
993f685045 Merge "Hide HdrCapabilities constructor." into nyc-dev
am: c189934573

* commit 'c1899345730ab3c4504cb314b371b4fa43ca0702':
  Hide HdrCapabilities constructor.

Change-Id: Id3e15f6d3f26634dc632caa8f775071516436cd5
2016-05-18 00:46:35 +00:00
Yohei Yukawa
23cbe85610 Move LocaleList to avoid layering violation.
Since LocaleList needs to depend on android.os.Parcelable, we cannot let
that class belong to "android.util" package, which causes layering
violation.

Bug: 28819696
Change-Id: Ia8de2ee9df3dd0a42b1fe84574439519b680fe18
2016-05-17 16:42:58 -07:00
Chris Craik
6ee192f4e9 Document that SurfaceView is synchronous in N
bug:28821062

Change-Id: I1c17949d93de3d1f89c504fc061f7d20dd451a4d
2016-05-17 16:17:25 -07:00
Hangyu Kuang
1e7d1aa6a6 Hide HdrCapabilities constructor.
Bug:25684127
Change-Id: I1a30ab3c162d8891c8aea1447757c85942033a0d
2016-05-17 14:21:01 -07:00
Michael Wright
778e3b91ac DO NOT MERGE Remove Pointer Capture API
The underlying implementation needs to be completely rethought. If a
process crashed while you were in pointer capture mode, you were
pretty much stuck in it. If the mouse happened to move outside of
your bounds right before you called the API, you'd never actually get
an event (whatever it was hovering over would). There's no easy way
for the system to tell you when you enter or exit this mode because
it doesn't actually track who the current request is from.

These are all solvable, but not in the N time frame. Maybe next time.

Bug: 26830970
Change-Id: I03efd63c499b86dc278491ca3284566c1965581f
2016-05-17 18:02:37 +01:00
Michael Wright
f9d9ce7705 DO NOT MERGE Rename PointerIcon and Pointer Capture APIs
This is a response to API council feedback.

Bug: 26830970
Change-Id: Ia2d284b5c1ab8365bedfdc37d129be4b8146036b
2016-05-17 18:02:32 +01:00
Wale Ogunwale
33cffe3717 Merge "Fixed bugs with starting windows when displayng forcedResized activity" into nyc-dev
am: b406dd20ee

* commit 'b406dd20eee28eedb8e9f330a0459d630c026515':
  Fixed bugs with starting windows when displayng forcedResized activity

Change-Id: I9e3bc8825d837abe61d31dea27249f7bce6e7f9d
2016-05-17 00:57:25 +00:00
TreeHugger Robot
b406dd20ee Merge "Fixed bugs with starting windows when displayng forcedResized activity" into nyc-dev 2016-05-17 00:51:41 +00:00
Wale Ogunwale
3b23239d6e Fixed bugs with starting windows when displayng forcedResized activity
- Added ActivityOption to mark a starting activity as a taskOverlay
activity. That is the activity will always be the top activity of the
task and doesn't cause the task to be moved to the front when it is added.
- Only set the starting window state of the ActivityRecord to shown if
window manager actually showed the starting window for the activity.
Avoids incorrectly trying to remove starting window for an activity that
didn't show any.
- When starting additional activity in a task, transfer the starting
window from the top most activity with a starting window. It is possible
the top most window does have a starting window like in the case of the
forcedResized activity.
- Only ensure visiblity of an activity we are starting in a task whose top
activity is a task overlay. They need to start in the visible-paused state
and not the resumed state which just causes extra churn in the system.
- Always add additional starting activities in a task with an overlay
activity below the overlay activity.

Bug: 28751186
Change-Id: I3624a4313ae9c406d42c67a3537f67ad685791af
2016-05-16 16:27:01 -07:00
Jorim Jaggi
b7bd18bdc6 Handle multi-window for inset hint
am: 23bf5462f0

* commit '23bf5462f05b33ce4390d8370520e43b74dbec09':
  Handle multi-window for inset hint

Change-Id: I6165730cf338d85f4e4a38d4115b9f4f299807b2
2016-05-16 23:26:53 +00:00
Jorim Jaggi
23bf5462f0 Handle multi-window for inset hint
We need to incorporate task bounds when calculating the inset hint
so we don't specify something wrong to the client which we correct
immediately after.

Bug: 28697105
Change-Id: I23cec7d6cc62a4d982e0796a867e803d4cce0803
2016-05-16 23:18:14 +00:00
Vladislav Kaznacheev
943c9f10d2 Merge "Fix inconsistencies in DragEvent.getX/getY behavior and JavaDoc." into nyc-dev
am: a423ec52ac

* commit 'a423ec52ac427e5bdbd12aac21ef75eff7d96140':
  Fix inconsistencies in DragEvent.getX/getY behavior and JavaDoc.

Change-Id: I8b704c0cf3b4df430b0f5a322e1cee008e67d113
2016-05-16 21:26:04 +00:00
TreeHugger Robot
a423ec52ac Merge "Fix inconsistencies in DragEvent.getX/getY behavior and JavaDoc." into nyc-dev 2016-05-16 21:21:58 +00:00
Vladislav Kaznacheev
c244970220 Fix inconsistencies in DragEvent.getX/getY behavior and JavaDoc.
Make getX/getY return view-relative position as specified in the class
JavaDoc.

Fix obvious errors in JavaDoc for getX/getY

Bug: 28793547
Change-Id: Ic2ac646189711e7466594d4fc8326408fc0348e1
2016-05-16 12:57:15 -07:00
Yohei Yukawa
a1c905caf3 Merge "Make IMS#clearInsetOfPreviousIme() reliable." into nyc-dev
am: cef3337cb5

* commit 'cef3337cb5e27d4f571fb350be055c26d339833d':
  Make IMS#clearInsetOfPreviousIme() reliable.

Change-Id: I76b607cd8086f421fc0d552a348a70fc06aa3d9c
2016-05-16 15:31:05 +00:00
Yohei Yukawa
cef3337cb5 Merge "Make IMS#clearInsetOfPreviousIme() reliable." into nyc-dev 2016-05-16 15:22:21 +00:00
Abodunrinwa Toki
03e7feeba3 Merge "Ensure that ViewGroup.getChildVisibleRect(...) is recursive." into nyc-dev
am: 376f9f4bd6

* commit '376f9f4bd6ba2e117f0356161c767225f47f2745':
  Ensure that ViewGroup.getChildVisibleRect(...) is recursive.

Change-Id: I35ef50e803c17df3911bee580e604992768df484
2016-05-16 09:44:05 +00:00
Yohei Yukawa
833bdcedce Make IMS#clearInsetOfPreviousIme() reliable.
This is a follow-up to my previous CL [1] for Bug 15922840 so that we
can clear the following variables in a more reliable way.
 - PhoneWindowManager#mLastInputMethodWindow
 - PhoneWindowManager#mLastInputMethodTargetWindow

The idea behind CL [2] is that when InputMethodManagerService (IMMS) is
switching from an IME to another IME, IMMS can send a signal to
WindowManagerService (WMS) to remember the current IME's inset so that
the system can continue using it to reduce jank until the new inset is
specified by the next IME.  As summarized in Bug 28781358, however, if
the next IME does not show the window after the IME switch, WMS (or
PhoneWindowManager to be precise) keeps using the previous IME's inset
unexpectedly until the new IME shows its window.  All we have seen in
Bug 15922840 and Bug 26663589 fall into this category.

The idea of this CL is just adding a hidden API to InputMethodManager so
that InputMethodService#clearInsetOfPreviousIme() can surely terminate
the IME transition state managed in PhoneWindowManager, rather than
relying on a hack of calling SoftInputWindow#show() and
SoftInputWindow#hide(), which actually does not work for Bug 26663589.

 [1]: Ib04967f39b2529251e4835c42e9f99dba2cf43f2
      2977eb7b6c
 [2]: I5723f627ce323b0d12bd7b93f5b35fc4d342b50c
      792faa2c16

Note that addressing all the corner cases in [2] still requires lots of
non-trivial change.  Hence this CL focuses only on Bug 26663589 (and
the case we handled in Bug 15922840).

Bug: 26663589
Change-Id: Ib567daa009c1139858dccadcfc6a04465ebecf36
2016-05-15 20:05:56 -07:00
Abodunrinwa Toki
cb66406d33 Ensure that ViewGroup.getChildVisibleRect(...) is recursive.
This change fixes the issue where
getChildVisibleRect(View, Rect, Point, boolean) call isn't recursive.
The method was introduced in I49550ed4082bcbdcfe4643b962b50f3308092525

Bug: 28514727
Change-Id: Ib6b0fb67ca6c700b44f645319c23b1213a2742d4
2016-05-13 19:26:03 +01:00