Commit Graph

8213 Commits

Author SHA1 Message Date
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
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
Andrii Kulian
1c4c2caa4c Merge "Close leaked windows when trying to preserve main one" into nyc-dev
am: 4ef107bb7a

* commit '4ef107bb7ad0c1f28db710374bb118e6658d3238':
  Close leaked windows when trying to preserve main one

Change-Id: I20b5d6ab8adbb97cffca52e1daf66ed939d508b8
2016-05-13 03:30:45 +00:00
Andrii Kulian
4ef107bb7a Merge "Close leaked windows when trying to preserve main one" into nyc-dev 2016-05-13 03:24:34 +00:00
Vladislav Kaznacheev
a072db029f Merge "Partial fix for jumping freeform windows" into nyc-dev
am: d5c94d1af3

* commit 'd5c94d1af3c042fa373d0864c07387a3d2125a08':
  Partial fix for jumping freeform windows

Change-Id: Icf1d177ba6b04629beb40188dcbde63a19b3dbf9
2016-05-13 01:26:01 +00:00
Vladislav Kaznacheev
cb4bbd7af8 Partial fix for jumping freeform windows
Currently every focus change causes a freeform window to jump
for a few frames. The size of the jump is equal to the difference
in inset size (which is derived directly from the window elevation).

This problem goes away for most real use cases if the insets are
not allowed to decrease.

Bug: 28318973
Bug: 22668382
Change-Id: I77ca440a7d9c89cc4d45e6667bf37da94a5c8a9a
2016-05-12 23:56:32 +00:00
Yigit Boyar
16b53c67c1 Merge "Respect add focusables flags" into nyc-dev
am: 4c6eeb67a2

* commit '4c6eeb67a232fdbca43513d8414e38a55c40d75e':
  Respect add focusables flags

Change-Id: I63af32dd31750d8af612a4c562ec1e1930129151
2016-05-12 23:27:19 +00:00
Yigit Boyar
4c6eeb67a2 Merge "Respect add focusables flags" into nyc-dev 2016-05-12 23:19:22 +00:00
Yigit Boyar
4c6e983000 Respect add focusables flags
This CL fixes 2 bugs in View's addFocusables implementations.

1) addFocusables(list, dir) method was always returning focusables in
touch mode even if the device is not in touch mode.

2) addFocusables(list, dir, mode) was not respecting the provided mod.

Bug: 28745577
Change-Id: I9b9e5af27f8f5b1bb3cc601584fdad7c73e54a5d
2016-05-12 15:11:13 -07:00
Dimitry Ivanov
76766d29b3 Merge "Move Vulkan layer path setup to ApplicationLoaders" into nyc-dev
am: 7f0708390b

* commit '7f0708390b3006965fe640c72c4254eb74daca3a':
  Move Vulkan layer path setup to ApplicationLoaders

Change-Id: I406dad31babb52d601e1212c4672f1ce7cd9aa57
2016-05-12 21:21:25 +00:00
Andrii Kulian
eac0ea5cdf Close leaked windows when trying to preserve main one
When app has several windows and activity is relaunched + we try to preserve
main window - other windows just stayed around until removed by timeout or
replaced by app. There was a problem when one of the windows registered
broadcast receiver and set its own timer to remove it. In this case all
receivers were removed by framework because windows were considered leaked
and apps' timer caused crash when trying to remove registered receiver.

This CL removes all windows expect the main one, which we're trying to
preserve in this case.

Bug: 28337135
Change-Id: Ib8790cc8c61801f11d871ba3803bb0ebc3d3be01
2016-05-12 13:37:05 -07:00
Dimitry Ivanov
0997908c95 Move Vulkan layer path setup to ApplicationLoaders
ThreadedRenderer was never the right place for this anyway, and
ApplicationLoaders can provide both the full library search path (not
just the extracted native library dir) as well as the application loader
namespace.

Bug: 28213888
Change-Id: Ibcc0a9178da4dba6f3f3105932fdac1a1d0261af
2016-05-11 22:59:10 -07:00
Jim Miller
3c1e640d83 Merge "Fix KeyguardManager.isSecure() to observe work profile" into nyc-dev
am: 254d9e4f41

* commit '254d9e4f410f63ed1ba3f917e207731c5d9d6538':
  Fix KeyguardManager.isSecure() to observe work profile

Change-Id: Iaa814af0752a90ec53eed44b4d31b6bfdc13bfc3
2016-05-12 00:39:02 +00:00
Jim Miller
e4044bb617 Fix KeyguardManager.isSecure() to observe work profile
The fix passes the calling userId instead of the current userId to
allow apps running as managed profiles to work.

Fixes bug 28666104

Change-Id: I9f8676ab11bd581d9e67b2b9f385036d4d3576ee
2016-05-10 18:38:25 -07:00
Jorim Jaggi
a229226c61 Don\'t stage content drawn bounds
am: e85ce990fe

* commit 'e85ce990fe7bfa33d6b7d8bfd23b7336096466b9':
  Don't stage content drawn bounds

Change-Id: I2e380e1fb43f26b90927c10e2b445049e2fd2966
2016-05-11 00:44:02 +00:00
Jorim Jaggi
e85ce990fe Don't stage content drawn bounds
It's certainly not needed for two up, so remove the staging aspect.

Freeform resizing is currently broken because of another bug so this
can't be tested, but because we are not "shipping" it in any case
fixing the 2-up bug is more important, but it shouldn't break freeform
anyways.

Bug: 28618501
Change-Id: I6f285a714281fde50fd7328a3f8999cfa8dfb2c5
2016-05-11 00:37:33 +00:00
Chong Zhang
7722999ebd Disable keep_screen_on traces
am: 44aabe4b72

* commit '44aabe4b7240a9a03678b4a66bdd5f46a9dfb29a':
  Disable keep_screen_on traces

Change-Id: Icc19da42ecec4231fe323b3bb9d728ef02812918
2016-05-10 21:37:02 +00:00
Chong Zhang
44aabe4b72 Disable keep_screen_on traces
bug: 28692100
bug: 27522448

Change-Id: Ic077e8985f1f21bc111287813fb2992ed01df909
2016-05-10 21:34:01 +00:00
Yohei Yukawa
94c9aadc99 Merge "Fix stale InputMethodManager#mFullscreenMode." into nyc-dev
am: 9f76abc8ab

* commit '9f76abc8ab9db3306c8061e9719dbe2a998031f3':
  Fix stale InputMethodManager#mFullscreenMode.

Change-Id: If27212387cd76bb6cc7f1cd1d844bd3ca07915e8
2016-05-05 22:02:30 +00:00
Yohei Yukawa
9f76abc8ab Merge "Fix stale InputMethodManager#mFullscreenMode." into nyc-dev 2016-05-05 21:55:50 +00:00
Robert Carr
b9d2502eac Merge "Prepare to replace windows across recreate()." into nyc-dev
am: ea162c3c79

* commit 'ea162c3c7992b01d8d56766a94e56a0cee3fe3b2':
  Prepare to replace windows across recreate().

Change-Id: I3f78aa81d76e0a71f616037c531e7755760b41cf
2016-05-05 19:47:36 +00:00
TreeHugger Robot
ea162c3c79 Merge "Prepare to replace windows across recreate()." into nyc-dev 2016-05-05 19:38:17 +00:00
Chong Zhang
242eadabea Merge "Debug traces to facilitate screen timeout debugging" into nyc-dev
am: 6afe594461

* commit '6afe594461930e83cbf5ecf181bf43fcba0060dd':
  Debug traces to facilitate screen timeout debugging

Change-Id: I89dad5e66db460af83deac679f2f81bef34d0e69
2016-05-04 22:52:55 +00:00
Chong Zhang
6afe594461 Merge "Debug traces to facilitate screen timeout debugging" into nyc-dev 2016-05-04 22:50:11 +00:00
Chris Craik
2f66d0a849 Merge "Fix View leakage from mPreSortedChildren" into nyc-dev
am: 4e34cd0537

* commit '4e34cd05379d1e96a5ca8081b3e3fa3b1a1cc534':
  Fix View leakage from mPreSortedChildren

Change-Id: Idd17fa7d0cb1bfbca1725525d85e4068a234c8b6
2016-05-04 22:30:30 +00:00
TreeHugger Robot
4e34cd0537 Merge "Fix View leakage from mPreSortedChildren" into nyc-dev 2016-05-04 22:23:26 +00:00
Chong Zhang
4ffc318012 Debug traces to facilitate screen timeout debugging
bug: 27522448
Change-Id: I4d51be316e4aedecffb7001126849d7c6136d517
2016-05-04 15:09:01 -07:00
Chet Haase
512c406be9 Merge "Force second measure pass when there is a configuration change" into nyc-dev
am: c381c4e8e7

* commit 'c381c4e8e7b7dfc2aed0a662bf56e3d6e512df5d':
  Force second measure pass when there is a configuration change

Change-Id: I2586fe3605461b2e6e4d9678afd6436078dab21c
2016-05-04 21:51:38 +00:00
Chris Craik
fc56377178 Fix View leakage from mPreSortedChildren
bug:28553824

Change-Id: I62bfa3dcb121792dff7d00be1f4b018a99c96e1d
2016-05-04 13:40:07 -07:00
Robert Carr
77bdfb512f Prepare to replace windows across recreate().
When the activity locally recreates itself, nothing
on the server side is able to prepare preserving windows,
or replacing windows. The activity was trying to defer
removing the old window, but it was just waiting
until the new one was created, not until it was drawn,
thus resulting in a flicker. It's easy to backpack on the
existing replacement infrastructure.

Bug: 28221875
Change-Id: I55fc4ca78e9e11809473fedd8b30b6a6350cf852
2016-05-04 12:40:39 -07:00
Chet Haase
d86fb2ce37 Force second measure pass when there is a configuration change
It's possible for a call to updateConfiguration() to happen in the middle
of performTraversals(), after the measure phase has happened, but before
the layout phase. During the configuration call, it's possible for views to
have requestLayout() called on them. This can result in the request flag
not getting cleared, because views that have had layout requested, but which
have not yet been measured, may not be told to layout.

The correct flow should be that any code path causing requestLayout() (which
could be anything that calls out to user/app code) should happen before the
measure phase (or cause a second measure to occur). For now, causing the second
measure to occur is a low-risk simple change that fixes the immediate problem.

Issue #28152259  Calling requestLayout from inside View.onConfigurationChanged can cause problems

Change-Id: I3b532eeacc3784d8d21193d01ddd7fa15ac0684e
2016-05-04 18:14:46 +00:00
Abodunrinwa Toki
98f91884ff Merge "Implement alternative ViewGroup.getChildVisibleRect." into nyc-dev
am: f62dd564ed

* commit 'f62dd564edfa7f9e02e17e7a2e3107dbc7b4abb0':
  Implement alternative ViewGroup.getChildVisibleRect.

Change-Id: I8adae611f525a14dadc2fc0e2c15cc961b61d0cf
2016-05-03 20:20:05 +00:00
Abodunrinwa Toki
4e7a1208ea Implement alternative ViewGroup.getChildVisibleRect.
This CL allows getChildVisibleRect to optionally always call the
view's parent. The previous version attempted to optimize the call
by not calling further up the view heirarchy when the rect isn't
visible in the current view.

The call is hidden and the previous behaviour is preserved to limit
the bits of code that this change affects.

Bug: 28514727
Change-Id: I49550ed4082bcbdcfe4643b962b50f3308092525
2016-05-03 19:41:15 +01:00
Jaewan Kim
1e28182362 Merge "Fix crash when device doesn\'t support picture-in-picture" into nyc-dev
am: bfa0f48407

* commit 'bfa0f48407e70099c2558983b19163c1d92d063b':
  Fix crash when device doesn't support picture-in-picture

Change-Id: Icbbe69970e5f43387323b5ed810ebc11b1cf77b1
2016-05-02 22:36:31 +00:00
Jaewan Kim
d98dcab679 Fix crash when device doesn't support picture-in-picture
Bug: 28512987
Change-Id: Ic8287d70fed491d7493d443ba7d9633b7d9aaea9
2016-05-03 07:13:28 +09:00
Robert Carr
8175a59c2b Merge "Fix ViewRoot inset adjustment after initial setup." into nyc-dev
am: 3446a6ef71

* commit '3446a6ef71872f07de1ea59ff4aa060dad92eb22':
  Fix ViewRoot inset adjustment after initial setup.

Change-Id: Ia3a33d0d2031f4929cfb898ad0847cd620792bba
2016-04-29 20:39:56 +00:00
TreeHugger Robot
3446a6ef71 Merge "Fix ViewRoot inset adjustment after initial setup." into nyc-dev 2016-04-29 20:37:33 +00:00
Robert Carr
1bccabf3c4 Fix ViewRoot inset adjustment after initial setup.
If the insets change, "mWidth/mHeight" won't change
as it's based on the window frame (not the surface size),
we need to track when the insets change and call
HardwareRenderer.setup with the new values.

Bug: 28257246
Bug: 28368990
Change-Id: Ida304b57c4671d010d1cf7b370674c9453841c97
2016-04-29 11:13:57 -07:00
Michael Wright
b3324b4a2e Merge "Properly parcel HdrCapabilities." into nyc-dev
am: 5bddeaa

* commit '5bddeaa9bce6325c900eeabaa6a1cdfaf83910c6':
  Properly parcel HdrCapabilities.

Change-Id: I768887156c78cca859db6123a2bb184f12295ab0
2016-04-28 15:05:44 +00:00
TreeHugger Robot
5bddeaa9bc Merge "Properly parcel HdrCapabilities." into nyc-dev 2016-04-28 15:01:31 +00:00
Yohei Yukawa
1544def0fa Fix stale InputMethodManager#mFullscreenMode.
The current mechanism to sync InputMethodService#mIsFullscreen to
InputMethodManager#mFullscreenMode is really fragile because
  1. Currently the state change is notified via
     InputConnection#reportFullscreenMode(), where InputConnection is
     designed to be valid only while the IME has input focus to the
     target widget.
  2. In favor of performance InputMethodService (IMS) calls
     InputConnection#reportFullscreenMode() only when #mIsFullscreen
     changed.  If InputConnection#reportFullscreenMode() failed, there
     is no recovery mechanism.
  3. Screen oriantation change is likely to cause Window/View focus
     state change in the target application, which is likely to
     invalidate the current InputConnection.

What our previous workaround [1] did for Bug 21455064 was actually
relaxing the rule 1 only for InputConnection#reportFullscreenMode().
However, my another CL [2] made the lifetime check of InputConnection a
bit more strict again, which revived the issue as Bug 28157836.

Probably a long-term fix would be to stop using InputConnection to sync
that boolean state between IMS and the application.  However, it's too
late to do such a refactoring in N, hence this CL relaxes the rule 1
again keeping it as secure as possible.

The idea is that we allow InputConnection#reportFullscreenMode() to
update InputMethodManager#mFullscreenMode regardless of whether
InputConnection is active or not, as long as the InputConnection is
bound to the curent IME.  Doing this as a short-term solution is
supporsed to not introduce any new risk because the active IME is
already able to mess up the InputMethodManager#mFullscreenMode by
calling InputConnection#reportFullscreenMode() on any other active
InputConnection.  Bug 28406127 will track the long-term solution.

 [1]: Id10315efc41d86407ccfb0a2d3956bcd7c0909b8
      da589dffdd
 [2]: If2a03bc84d318775fd4a197fa43acde086eda442
      aaa38c9f1a

Bug: 28157836
Change-Id: Iba184245a01a3b340f006bc4e415d304de3c2696
2016-04-28 12:41:11 +00:00
Phil Weaver
44e272b469 Merge "Fix several accessibility magnification issues." into nyc-dev
am: 1f70f0b

* commit '1f70f0b7d60ad0b98fe6597162769bce8b85e3ed':
  Fix several accessibility magnification issues.

Change-Id: Ib174d8ff353fd990c5b3119b0728ec942784fbdc
2016-04-27 23:31:54 +00:00
Michael Wright
b082890149 Properly parcel HdrCapabilities.
Since the field might be null, we can't just read and write the
object directly. Use Parcel's convenience methods to do so safely
instead.

Bug: 28427070
Change-Id: I6460c9cb43dc6da97d5fd9edeaa78bdaaf105446
2016-04-27 19:28:29 -04:00
Phil Weaver
1f70f0b7d6 Merge "Fix several accessibility magnification issues." into nyc-dev 2016-04-27 22:50:37 +00:00
Phil Weaver
70439244ba Fix several accessibility magnification issues.
Clarifying region used for magnification as "magnificationRegion",
both in the public API and in the code. There's been significant
confusion about what "magnfifiedRegion" means. Removing
"availableRegion" from everywhere except where it's required, as
that region was identical to magnified/magnification region.

Trying to shut down magnification was a complex situation where
animations in progress and new magnification requests were tricky to
handle correctly. It was not possible to guarantee that the
magnification callbacks were unregistered consistently. There were
at least two situations that led to phone restarts:
1. If a triple tap was detected between unregistering the callbacks
and shutting down the input filter. In this case the magnification
request would go through.
2. If an animation had just started when magnification was turned
off, so the current magnification was 1.0 but the animator was
about to change it. In this case the callbacks would be unregistered,
and then the animator would start changing the magnification.

This change makes registering and unregistering magnification atomic.
It also makes MagnificationController stick around indefinitely once it
is created, registering and unregistering as needed to support
magnification gestures and services that control magnification. Services
that merely query the status of magnification no longer register for
callbacks.

One part of shutting down is turning off the animation and guaranteeing
that it won't try to make further changes. Adding a flag to
SpecAnimationBridge and a lock in that class so we can guarantee that
nothing happens when we aren't registered for magnification callbacks.

Also reconfiguring all accessibility options when a service stops to
make sure that only the features required by the current configuration
are enabled.

Bug: 27497138
Bug: 27821103
Change-Id: If697cbd34b117d82c8eee1ba7d0254089ee4241d
2016-04-27 13:57:43 -07:00
Bo Liu
7dc710d564 Merge "Revert "Expose setDrawGLFunctionDetachedCallback to webview"" into nyc-dev
am: 08ca2e3

* commit '08ca2e3a7593ced4967c56709a1fe675408d42dc':
  Revert "Expose setDrawGLFunctionDetachedCallback to webview"

Change-Id: I4bba52ddc4b89273eceb2627facbb9091eb341c0
2016-04-27 18:06:25 +00:00
Bo Liu
08ca2e3a75 Merge "Revert "Expose setDrawGLFunctionDetachedCallback to webview"" into nyc-dev 2016-04-27 17:58:34 +00:00
Hangyu Kuang
61734544d1 Merge changes from topic \'atv-hdr\' into nyc-dev
am: 39bb2c2

* commit '39bb2c29b427b0cf2396a8691176584094ae805c':
  Unhide getHdrCapabilities and HdrCapabilities.
  Plumb HDR capabilities to Display
  Revert "Revert "Hook up HDR capabilities from native SurfaceControl""

Change-Id: I53f0414c0a408edeae8ffe7161a035e45b8670b7
2016-04-27 16:46:30 +00:00
Hangyu Kuang
39bb2c29b4 Merge changes from topic 'atv-hdr' into nyc-dev
* changes:
  Unhide getHdrCapabilities and HdrCapabilities.
  Plumb HDR capabilities to Display
  Revert "Revert "Hook up HDR capabilities from native SurfaceControl""
2016-04-27 16:38:21 +00:00
John Reck
f97dca612e Merge "API tweaks to PixelCopy and make it public" into nyc-dev
am: 7f209d3

* commit '7f209d37f17d4df09475137c38b84a3338c84023':
  API tweaks to PixelCopy and make it public

Change-Id: I1aac8afacfd054fe10fc26a73552608c51dfa9f5
2016-04-27 14:44:38 +00:00