Commit Graph

7958 Commits

Author SHA1 Message Date
Vladislav Kaznacheev
cdaf19530e Merge "Revert "Add wallpaper input consumer to WindowManagerService"" into nyc-dev
am: b4142f7

* commit 'b4142f70e5a65338019e9f79b59adc4fc78b32e1':
  Revert "Add wallpaper input consumer to WindowManagerService"

Change-Id: I38e9343cca898a7877176de9262e5c9871c427f9
2016-03-31 02:17:32 +00:00
Andrii Kulian
b6ba05ffb0 Merge "Refactor usages of Picture In Picture and Multi Window (1/4)" into nyc-dev
am: ac94586

* commit 'ac945867145c571506a211ccb0a87a3402c4d745':
  Refactor usages of Picture In Picture and Multi Window (1/4)

Change-Id: I34a274c3eca15546d7be85fbb30ac072ff03db7f
2016-03-31 02:17:08 +00:00
Vladislav Kaznacheev
ce230a40d2 Add wallpaper input consumer to WindowManagerService
am: 6013a55

* commit '6013a558262d149023b32ab175c9b885b6c5b81d':
  Add wallpaper input consumer to WindowManagerService

Change-Id: If3da7b370d52692dd2ed0b9c19b65744358cbc0b
2016-03-31 02:16:26 +00:00
Vladislav Kaznacheev
b4142f70e5 Merge "Revert "Add wallpaper input consumer to WindowManagerService"" into nyc-dev 2016-03-31 01:43:11 +00:00
Vladislav Kaznacheev
2769e7ebe9 Revert "Add wallpaper input consumer to WindowManagerService"
This reverts commit 6013a55826.

Change-Id: I2711afe2e97a8b9a4bd94193202cb83113b3bd7e
2016-03-31 01:42:02 +00:00
Andrii Kulian
ac94586714 Merge "Refactor usages of Picture In Picture and Multi Window (1/4)" into nyc-dev 2016-03-31 00:57:42 +00:00
sergeyv
761f59c19f Merge "Hide children in ViewGroup.createSnaphost via internal flag and add test for it." into nyc-dev
am: 394d3df

* commit '394d3dfb2d9ccd2ca2fd7aad06ef2e9a8458a0c7':
  Hide children in ViewGroup.createSnaphost via internal flag and add test for it.

Change-Id: Iab1265b6a4c4ff5291259f7e5d9b96c217ee3141
2016-03-31 00:32:41 +00:00
Vladislav Kaznacheev
6013a55826 Add wallpaper input consumer to WindowManagerService
This is an input consumer similar to the one used when hiding the navbar,
but placed above wallpapers. It might be useful for processing touch
events over "desktop" in freeform MW mode.

Bug:26688904
Change-Id: I9d6d28a624f750ad48fc39f9b149dd1f989cceba
2016-03-31 00:32:39 +00:00
Sergei Vasilinetc
394d3dfb2d Merge "Hide children in ViewGroup.createSnaphost via internal flag and add test for it." into nyc-dev 2016-03-30 23:42:34 +00:00
George Mount
a140391f3d Merge "Revert "Run cleanup before end actions of ViewPropertyAnimator."" into nyc-dev
am: 6bb61e2

* commit '6bb61e25a2831dc14b604327a995c36309dfcbc9':
  Revert "Run cleanup before end actions of ViewPropertyAnimator."

Change-Id: I2254f4f2dfa19711fac8ed90e72addb94f4e26b8
2016-03-30 23:04:54 +00:00
George Mount
6bb61e25a2 Merge "Revert "Run cleanup before end actions of ViewPropertyAnimator."" into nyc-dev 2016-03-30 22:55:29 +00:00
Yohei Yukawa
9f42270f9b Merge "Add IC#closeConnection()." into nyc-dev
am: f6f0f5f

* commit 'f6f0f5fbe988cede008168438e469657c62ac51b':
  Add IC#closeConnection().

Change-Id: Id5dff1aab51d7538fe8213a6692aff6069ae8f7a
2016-03-30 22:07:07 +00:00
Yohei Yukawa
f6f0f5fbe9 Merge "Add IC#closeConnection()." into nyc-dev 2016-03-30 21:55:31 +00:00
George Mount
879a626f18 Revert "Run cleanup before end actions of ViewPropertyAnimator."
This reverts commit e9a4f87852.

This revert is to test to see if the gralloc lock problems are caused by this CL.

Change-Id: I395fd3675dd430c44a5d29b050ba248f3f2bf4cd
2016-03-30 21:33:18 +00:00
sergeyv
b37d44e267 Hide children in ViewGroup.createSnaphost via internal flag and add test for
it.

bug:27747923
Change-Id: I079b52b176b920bfa4c6749be31fbcd96a4dc42c
2016-03-30 14:20:09 -07:00
Yohei Yukawa
9f9afe526d Add IC#closeConnection().
It turns out that BaseInputConnection has still depended on a private
API named BaseInputConnection#reportFinish(), which was introduced
4 years ago to work around a UI freeze due to an unbalanced batch edit
count [1].  Note that such an unbalanced batch edit count cannot always
be avoidable.  It can easily occur in the following situations.
 - The current IME crashed during batch edit.
 - The user changed the View focus during batch edit.
 - The current IME called IMM#switchToNextInputMethod() during batch
   edit.

The remaining problem is that #reportFinish() is still an internal API
and only subclasses of BaseInputConnection can implement it, and IMM
calls it when and only when the current InputConnection is
BaseInputConnection or its subclass.  InputConnectionWrapper and any
other InputConnection implementations will never receive such a callback
to clean up InputConnection#{begin, end}BatchEdit(), which is considered
to be a major contributor to UI freeze.

To address the above issue, we unhide BaseInputConnection#reportFinish()
as InputConnection#closeConnection() so that application developers can
receive an appropriate callback to clean up internal state including
unfinished batch edit.

  [1] I5525d776916f0c42d5e6d4a4282aed590d7f0e9a
      9d69ecbf61

Bug: 24688781
Bug: 25332806
Change-Id: I234309c5880c9fe0b299b8bd0f8862796d4dda0d
2016-03-30 12:03:51 -07:00
Chris Banes
75ff37ebed Merge "Re-dispatch nested scrolls if not implemented" into nyc-dev
am: 6b69b12

* commit '6b69b122025631290380f4350f7bd0074bad10dd':
  Re-dispatch nested scrolls if not implemented

Change-Id: Ibb88f89e0c77b2eef7dfda72c023fc19f27d77a0
2016-03-30 08:49:00 +00:00
Chris Banes
6b69b12202 Merge "Re-dispatch nested scrolls if not implemented" into nyc-dev 2016-03-30 08:43:40 +00:00
Andrii Kulian
933076d805 Refactor usages of Picture In Picture and Multi Window (1/4)
Bug: 27365860
Change-Id: I1590e430a12ceb84cb83da295e0bf7e4378fea96
2016-03-29 18:39:45 -07:00
Robert Carr
d4c85e182a Merge "Ensure we change SurfaceView size from UI thread." into nyc-dev
am: ffe3098

* commit 'ffe309816989457f71a39a84d22fb06fe5b6e8d5':
  Ensure we change SurfaceView size from UI thread.

Change-Id: I8e57aa126a601df935b6005b74ba7842f819c741
2016-03-30 00:22:03 +00:00
Jeff Sharkey
21b1b0d937 Merge "AccessibilityNodeInfo shouldn\'t touch extras." into nyc-dev
am: af64f63

* commit 'af64f6341bdbca93aff3d68264af48e74faa9e58':
  AccessibilityNodeInfo shouldn't touch extras.

Change-Id: I44ae8aebdbe0046a64971eb47c25b8720f7bfd36
2016-03-30 00:22:00 +00:00
Rob Carr
ffe3098169 Merge "Ensure we change SurfaceView size from UI thread." into nyc-dev 2016-03-29 23:50:47 +00:00
Jeff Sharkey
297017d154 AccessibilityNodeInfo shouldn't touch extras.
The extras may contain custom Parcelables which aren't in the
system's default classpath, so touching them would end up clobbering
the contents.

Update code to leave the parcelled data untouched inside the bundle
until someone tries reading the extras.

Bug: 27897919
Change-Id: I99381dd50c9a0e8887667076362ea98805f0437c
2016-03-29 16:38:55 -06:00
Robert Carr
0b10c335c7 Ensure we change SurfaceView size from UI thread.
We need to change the SurfaceView size from the UI thread
so that we can appropriately deliver the SurfaceChanged
callback. We also need to not preserve geometry
in this case, as if we don't update the surface
and layout size together we could get scaling. This still has
some potential for holes, as transactions are not synced with
the parent renderer, but we have other methods to avoid
these in the case of resizing. This fixes the remaining
issues with content sizing and surface view "out of sync".

Bug: 27780983
Bug: 27687126
Bug: 27676101

Change-Id: Idd7864f00e5cf7a4eb32dd66c0b389292a788069
2016-03-29 13:42:06 -07:00
George Mount
3bed2e9ab1 Merge "Run cleanup before end actions of ViewPropertyAnimator." into nyc-dev
am: 58cf2c3

* commit '58cf2c3da028c9e091eed03868eaaa38625b12b7':
  Run cleanup before end actions of ViewPropertyAnimator.

Change-Id: I4ea31dc25223445e2aab2f2ab0c69030a53b57f3
2016-03-29 20:01:29 +00:00
George Mount
58cf2c3da0 Merge "Run cleanup before end actions of ViewPropertyAnimator." into nyc-dev 2016-03-29 19:54:36 +00:00
Jorim Jaggi
44af2a68f3 Revert "Start drawing immediately"
am: 75c21ca

* commit '75c21ca948aabbcd8b87196e966771b1dd976686':
  Revert "Start drawing immediately"

Change-Id: I1b07eeaf65ca76f740393d89218d2d75ba8e5f9f
2016-03-29 19:40:50 +00:00
Chet Haase
927e3c7a60 Merge "Add setHasOverlappingRendering() method" into nyc-dev
am: fd48a32

* commit 'fd48a321c9be5e46224222c46be8667bec6f631a':
  Add setHasOverlappingRendering() method

Change-Id: Ifbb72d9f334c60e1b0d964aab650dc85cba9890f
2016-03-29 19:33:12 +00:00
Jorim Jaggi
75c21ca948 Revert "Start drawing immediately"
This reverts commit 3127c2a471.

The original CL caused various issues for which we don't have the
time/not willing to take the risk.

Bug: 27864389
Bug: 27451341
2016-03-29 19:30:21 +00:00
Chet Haase
fd48a321c9 Merge "Add setHasOverlappingRendering() method" into nyc-dev 2016-03-29 19:19:14 +00:00
Markus Michler
e113d6a669 Merge "Fix javadoc for View.getMeasuredHeight() and View.getMeasuredHeightAndState()" am: 7160459
am: ae975ab

* commit 'ae975aba7372b18cbf7f30cdc4b74cff32cc3558':
  Fix javadoc for View.getMeasuredHeight() and View.getMeasuredHeightAndState()

Change-Id: I565ec862ff883bac9894aeec6fc63b7ce323e00c
2016-03-29 18:34:03 +00:00
Adam Lesinski
7160459611 Merge "Fix javadoc for View.getMeasuredHeight() and View.getMeasuredHeightAndState()" 2016-03-29 18:24:39 +00:00
Chet Haase
15b6ba5859 Add setHasOverlappingRendering() method
View.hasOverlappingRendering() is an important performance tweak that
subclasses can override to do the right thing return false when appropriate
to avoid expensive operations when view is translucent).
But this requires subclassing View to get this behavior.

This new API allows the property to be set from outside, enabling
standard views to have this behavior set. When the new method is called,
the behavior will derive from whatever it was set to. Otherwise, it
will default to the old/overriden behavior.

Issue #16561361  Make hasOverlappingRendering settable from outside/XML

Change-Id: If0fbc8667cdb82b1d85e795e782716a07196f3c0
2016-03-29 11:01:27 -07:00
Alan Viverette
4d2a42336b Merge "Various fixes for MagnificationController" into nyc-dev 2016-03-29 15:13:04 +00:00
George Mount
e9a4f87852 Run cleanup before end actions of ViewPropertyAnimator.
Bug 27788719

The end action of a ViewPropertyAnimator may do anything,
including starting a new animator. If the next animator has
started prior to cleaning up the previous one, it will capture
the dirty state as the final state. This CL runs the cleanup
Runnables before running the end actions so that any captured
state is the clean state.

Change-Id: Ib005b817d420e79b636e61987669a852e15df9ce
2016-03-29 07:39:02 -07:00
Chris Banes
61d5070614 Re-dispatch nested scrolls if not implemented
Currently the default implementations just swallow
the calls. This CL fixes this by re-dispatching
them up the tree by default.

BUG: 27611756

Change-Id: Ib31938dca34cd956e78d746321716a51cbd9dcd6
2016-03-29 12:37:03 +01:00
Jorim Jaggi
15d4b5aae8 Merge "Fix nav bar consuming" into nyc-dev 2016-03-28 22:16:44 +00:00
Jorim Jaggi
2eb62737af Merge "Cleanup window callbacks locking" into nyc-dev 2016-03-28 22:16:18 +00:00
Jorim Jaggi
e5638a6f75 Fix nav bar consuming
- Cache shouldAlwaysConsumeNavbar so it doesn't get reset when
insets == null
- Remove logic with frame comparison when determining whether to
consume nav bar. Not sure how that ever worked.
- Make sure shouldAlwaysConsumeNavBar survives when consuming
insets.

Bug: 27157904
Change-Id: I35f209ab27cc12240038da7efa9e79c95f70c6ce
2016-03-28 21:58:30 +00:00
Sergei Vasilinetc
4edfdd55cf Merge "Fix NPE while using mLayerPaint" into nyc-dev 2016-03-28 21:21:45 +00:00
Jorim Jaggi
16b631923d Cleanup window callbacks locking
- Also get rid of USE_MT_RENDERER, because there is no point in
having a flag if the other path never gets tested.

Bug: 27738239
Change-Id: Ic76115962940e72f2c59b8d291d078d15f8d493c
2016-03-28 21:19:17 +00:00
sergeyv
e66be622f6 Fix NPE while using mLayerPaint
bug:27873847
Change-Id: I9bfae72dfa9bda45fdeb94544b7656e2584f29f6
2016-03-28 13:23:28 -07:00
Yohei Yukawa
feade80609 Merge "Dump more info for View when IMM#DEBUG is true." into nyc-dev 2016-03-28 18:20:56 +00:00
Alan Viverette
59e53a164e Various fixes for MagnificationController
- Ensure initial magnified and available regions are set
- Correctly offset magnified bounds by left coordinate
- Cancel ongoing animations before unregistering callbacks

Bug: 22718911
Bug: 27871383
Change-Id: Iaff63be856598d1f8edb2d94158bbd75045c86ec
2016-03-28 13:41:32 -04:00
Yohei Yukawa
5c1e6751a5 Dump more info for View when IMM#DEBUG is true.
This is a preparation CL to fix Bug 27858665.  In order to debug issues
like this, we want to record following information about View.
 - Whether the View is focused or not.
 - Whether the Window to which the View belongs is focused or not.
 - Whether the View belongs to a Window or not.

This CL has no impact on production build where IMM#DEBUG is false.

Bug: 18920212
Change-Id: I06bcd5e42d55f96a9e916eb34ed7785cfe14c96f
2016-03-28 01:52:47 -07:00
Yohei Yukawa
241eac21a0 Clean-up a workaround that is no longer necessary.
With the previous commit [1], now Bug 27868748 is fixed and Bug 6789252
is no longer reproducible even without a workaround [2] for that.  Hence
this CL logically reverts [2] in favor of simplicity.

  [1]: If2a03bc84d318775fd4a197fa43acde086eda442
       aaa38c9f1a
  [2]: I66f51da1299532793ef8fa700f35b0811670f235
       4e5184f929

Bug: 27868748
Change-Id: Ic59af43343eb44d1d2c23a3f4018565e7a75b143
2016-03-28 00:28:50 -07:00
Yohei Yukawa
aaa38c9f1a Ensure IC#finishComposingText() is called on the correct Handler.
This attempts to reland previously reverted CLs [1][2] due to an
unexpected regression (Bug 27824691).

The Bug 27868748 we want to address by this CL is that currently
InputConnection#finishComposingText() can be called on the root view's
Handler no matter what Handler is associated with
ControlledInputConnectionWrapper.  Actually the root cause of
Bug 6789252 is the same, but there we worked around it by not calling
InputConnection#finishComposingText() in certain situations [3].
With this CL we should be able to logically revert that workaround.

This CL also removes redundant IMM#mServedInputConnection.  This is safe
because the following two fields have the same lifetime.
 - InputMethodManager#mServedInputConnection
 - InputMethodManager#mServedInputConnectionWrapper
We do not need to maintain both of them.  This also allows us to use a
strong refecente in IInputConnectionWrapper#mInputConnection instead of
a WeakReference.  To understand why this is safe, we need to understand
how things previously worked, which is as follows:

  1. InputMethodManager#mServedInputConnection becomes non-null.
    -> IInputConnectionWrapper#mInputConnection.get() is guaranteed to
       be alive.
  2. InputMethodManager#mServedInputConnection becomes null or another
     object.
    -> IInputConnectionWrapper#mInputConnection.get() may not be alive.

Since we know exactly when InputMethodManager#mServedInputConnection is
updated, in theory we do not need to use WeakReference here, and
with this CL we do not use WeakReference anymore.  Actually the initial
commit [1] accidentally removed the last strong reference to the active
InputConnection and WeakReference could be null at any time, which was
what we observed in Bug 27824691.

  [1]: I1181e067aa5bedbdf0c7ec1bcec479257aea511c
       afb6558c8f
  [2]: Ibe94f115e607a198d12ecd3d4e4f91a7d9469c98
       16e2c7b59a
  [3]: I66f51da1299532793ef8fa700f35b0811670f235
       4e5184f929

Bug: 27868748
Change-Id: If2a03bc84d318775fd4a197fa43acde086eda442
2016-03-27 23:46:04 -07:00
Jorim Jaggi
c39c7b0ce2 Add shadow during resizing in docked mode
Bug: 27738239
Change-Id: I48c45bd97c2aa7f3d7bbb5b1ba650fbe408bd0bf
2016-03-25 14:04:25 -07:00
Muyuan Li
3eca3cd334 Merge "Refactor enableAccessibility to AccessibilityManagerService" into nyc-dev 2016-03-25 18:03:36 +00:00
sergeyv
342a7e6a7c Clean up setLayerType and setLayerPaint
bug:21755299
Change-Id: I8f0953ccfc3d743abdecc8ec228ed3e1b6718c3c
2016-03-24 16:06:46 -07:00