Commit Graph

13351 Commits

Author SHA1 Message Date
TreeHugger Robot
08e59efeb6 Merge changes from topic "drag surface stuck"
* changes:
  Fix drag surface would be stuck (1/2)
  Revert "Fix drag and drop (3/3)"
  Revert "Fix drag and drop (2/3)"
  Revert "Fix drag and drop (1/3)"
2019-09-28 00:08:43 +00:00
Rob Carr
05c575ea38 Merge "Continued SurfaceView lifetime fixes." 2019-09-26 21:58:52 +00:00
Robert Carr
9421048a1f Continued SurfaceView lifetime fixes.
More errors in the positionLost refactoring, it turns out positionLost
can be called after we are fully detached and so ViewRootImpl can be null
(which it can't be anywhere else in the SurfaceView code). Guard against this
and guard against ViewRoot.mSurface being released since it seems this intermediate
state would also be possible.

Bug: 141474834
Test: Manual
Change-Id: Id34e667bf319deb6e8b26346225b604a54dc342c
2019-09-26 10:44:16 -07:00
Winson Chung
52d938d31f Fix nav bar leak in SystemUI
- Ensure that the composition sampling listener is destroyed when the nav
  bar is destroyed instead of waiting for the finalize callback. That
  callback would never be made since the sampling listener has a reference
  to the outer class and has a strong ref from SF, and the other class
  has itself a reference to the listener.
- Always unregister the nav bar fragment from the mode change callbacks

Bug: 141473489
Test: Switch navigation modes a couple times, take hprof dump and verify
      there aren't leaking classes

Change-Id: Ic389a559a3d430af495365102854d531f7d1966d
2019-09-26 02:31:27 +00:00
Hongwei Wang
a904e8d208 Merge "Moves shelf offset into SysUI package" 2019-09-25 21:22:59 +00:00
TreeHugger Robot
135906a5b9 Merge "SurfaceView: Release Surfaces where SurfaceControl are released." 2019-09-25 13:59:58 +00:00
Kevin Hufnagle
476214b386 Merge "docs: Modernized AccessibilityNodeProvider example" into qt-dev am: e49cbb3a5d am: 786e8a2849 am: 5061c99b61
am: c56a6f0800

Change-Id: I759c91fc53835dc607973b02d2637b77005974a9
2019-09-24 15:38:23 -07:00
Kevin Hufnagle
c56a6f0800 Merge "docs: Modernized AccessibilityNodeProvider example" into qt-dev am: e49cbb3a5d am: 786e8a2849
am: 5061c99b61

Change-Id: Id2ff15be26ce240114eb3ca53635b9fd9ea6c8ac
2019-09-24 15:24:12 -07:00
Kevin Hufnagle
5061c99b61 Merge "docs: Modernized AccessibilityNodeProvider example" into qt-dev am: e49cbb3a5d
am: 786e8a2849

Change-Id: I71ff61397d44812647124042e73a655a6710ff01
2019-09-24 15:14:14 -07:00
Kevin Hufnagle
786e8a2849 Merge "docs: Modernized AccessibilityNodeProvider example" into qt-dev
am: e49cbb3a5d

Change-Id: I24a281dd7194ea5c731ecc02371734fe1fa315f8
2019-09-24 15:06:18 -07:00
Robert Carr
172bdbc502 SurfaceView: Release Surfaces where SurfaceControl are released.
Following the same logic as the revision "Destroy SurfaceControl from RenderThread"
we have a similar race condition with the native object behind the mSurface object.
In addition that CL introduces a logic error...previously in positionLost we assumed
if mSurfaceControl != null then mSurface had not been released,
but now we release the Surface but wait on the RenderThread to release the SurfaceControl
when it tries to grab the frame number to create the deferred transaction the Surface
has already been released and we go on to crash. Releasing them all in the same place
fixes this.

Bug: 141525040
Test: go/wm-smoke
Change-Id: I7c938cd498a9260146f34f2d6e18744854d69946
2019-09-24 12:03:18 -07:00
Hongwei Wang
9b751800bc Moves shelf offset into SysUI package
With this change, the shelf offset will be set directly by Launcher to
SysUI without WM being involved.

PinnedStackControllerTest is removed in this change since the only test
function is against WM.setShelfHeight. However, new tests regard
PinnedStackController should be added per b/141200935.

See also: go/pip-sysui-migration

Bug: 139016518
Test: atest PinnedStackTests
Change-Id: I606de3d8106ac12d7bf2b367877bc5bb345af3fe
2019-09-23 17:00:42 -07:00
TreeHugger Robot
427356e1b3 Merge "Updated ViewPropertyAnimator to call View methods" 2019-09-21 00:00:02 +00:00
Rob Carr
89c64cd195 Merge "SurfaceView: Destroy SurfaceControl from RenderThread" 2019-09-20 23:43:13 +00:00
Nader Jawad
6fa971bab3 Updated ViewPropertyAnimator to call View
methods

Modified ViewPropertyAnimator to call directly
into View setters instead of RenderNode APIs to match
implementation of FloatProperty objects on View. This
makes the animation APIs consistent with one another
and always call through the proper code paths to
give View implementations an opportunity to handle
alpha changes themselves.

Bug: 140961174
Test: Added CTS tests for ViewPropertyAnimator
Change-Id: I1c0023af50be47786296b46510034eb798658c20
2019-09-20 14:55:14 -07:00
Robert Carr
005c63e8c6 SurfaceView: Destroy SurfaceControl from RenderThread
Currently there is a race where the UI thread can destroy
the SurfaceControl (free the C++ object) while the RenderThread
still has pending operations on it. To fix have the positionLost callback handle the destruction.

Bug: 139111930
Bug: 136808018
Test: go/wm-smoke
Change-Id: Id5225e1e47046d928f8298de38ff61662debe360
2019-09-20 14:48:40 -07:00
Winson Chung
95112612bb Merge "Add wallpaper leash for remote and recents animations" 2019-09-20 21:28:29 +00:00
Winson Chung
d585219545 Add wallpaper leash for remote and recents animations
Bug: 140626334
Test: atest RecentsAnimationControllerTest
Test: atest RemoteAnimationControllerTest

Change-Id: Id638256983801e722b57da0abd22e3e480d5559d
Signed-off-by: Winson Chung <winsonc@google.com>
2019-09-20 17:20:12 +00:00
Yunfan Chen
e7a1ac48f7 Merge "Remove animation background color" 2019-09-20 03:31:43 +00:00
Rob Carr
9b1731f276 Merge "Fix WindowlessWm null check" 2019-09-19 23:42:12 +00:00
Robert Carr
8833ae89d5 Fix WindowlessWm null check
Fix careless mistake and also add end-to-end tests so that it doesn't happen again.

Bug: 134365580
Test: WindowlessWmTests
Change-Id: I4b22498faeb19d28f9f40daa8777f69efe6899ba
2019-09-19 16:39:24 -07:00
Beth Thibodeau
0893762538 Merge "Output switch button in media notification header" 2019-09-19 15:18:18 +00:00
Winson Chung
3f0b334926 Merge "Exposing flickerlib classes and layer tracing to sysui" am: e25075b2fb am: f19fcb5048
am: 8832611d4f

Change-Id: I0b0e2b1f094b29cc445e5347aa8af81da1b08bf8
2019-09-19 07:17:25 -07:00
Winson Chung
8832611d4f Merge "Exposing flickerlib classes and layer tracing to sysui" am: e25075b2fb
am: f19fcb5048

Change-Id: I281764bab937ff4a71ed0572a648e4f08738a5d9
2019-09-19 07:09:21 -07:00
Winson Chung
f19fcb5048 Merge "Exposing flickerlib classes and layer tracing to sysui"
am: e25075b2fb

Change-Id: I182eef2c7f93d68bcdceaec3fcdfaf9615eda0ea
2019-09-19 06:55:30 -07:00
Riddle Hsu
0ac60d478c Move the checking of mWindowAttributesChanged closer to relayoutWindow
It prevents additional relayoutWindow after the first performTraversals
if there is a SurfaceView in the view tree. It happens from
host.dispatchAttachedToWindow to SurfaceView#onAttachedToWindow
and then requestTransparentRegion that changes mWindowAttributesChanged
to true. So it is useless to clear mWindowAttributesChanged before the
path in the case.

Bug: 140407614
Test: The ViewRootImpl#relayoutWindow is only called once when
      launching a simple activity which contains a SurfaceView.

Change-Id: Id49226cab0e9407e6d76e6446f490145b0929594
2019-09-19 16:50:12 +08:00
Yunfan Chen
93d522496d Remove animation background color
The background color was used to show while animating window transition.
This is no longer used, and it's safe to remove it.

Bug: 140913423
Test: go/wm-smoke

Change-Id: Ib8dc40c9762f4566ca21947579deb0d50990e8a5
2019-09-19 17:31:59 +09:00
TreeHugger Robot
37f9bd820e Merge "Move bounds calculation and snap fraction to SysUI" 2019-09-19 05:10:43 +00:00
TreeHugger Robot
5814cca135 Merge "Add notifySessionLifecycle() to ContentCaptureSession." 2019-09-19 01:01:51 +00:00
Jacky Kao
38a0b53664 Merge "Modifying the mechanism of A11y window cache" 2019-09-18 23:33:49 +00:00
Hongwei Wang
43a752be14 Move bounds calculation and snap fraction to SysUI
Major changes in this CL

- Added PipBoundsHandler in SysUI package handles the bounds calculation
and save/restore the snap fraction
- Added IPinnedStackListener.onSaveReentrySnapFraction and
IPinnedStackListener.onResetReentrySnapFration, both called from
PinnedStackController (WM) to SysUI
- Added IPinnedStackListener.onPrepareAnimation, called from WM to
SysUI to notify that an animation for pinned stack is about to happen
- Added IPinnedStackController.startAnimation, called from SysUI to WM
to actually start the pinned stack animation
- Updated tv/PipManager to use PipBoundsHandler as well

Known issues and what's next

- Shelf height is set after the animation is started, therefore one may
notice the PiP window is hovering over the shelf. This is tracked
separatedly by b/139016518
- Bounds calculations still exist in PinnedStackController since
onTaskStackChanged callback requires so. Once we addressed b/139016833
(move rotation bounds calculation to SysUI), they should be all gone.
- Move the pinned stack animation from WM to SysUI and we can furthre
remove IPinnedStackListener.onPrepareAnimation and
IPinnedStackController.startAnimation

More details: go/pip-sysui-migration

Bug: 139015463
Bug: 139015142
Test: atest PinnedStackTests
Test: atest PinnedStackControllerTest
Change-Id: Ib62d8152ecc7b18a671ec403af44cc517612169e
2019-09-18 23:01:00 +00:00
TreeHugger Robot
43815bb9df Merge "Adds a Builder to SyncRtSurfaceTransactionApplier.Params" 2019-09-18 21:00:13 +00:00
Beth Thibodeau
750ec58fec Output switch button in media notification header
Adds a chip-like button to the header of media notifications which will
open the media output slice. This was previously implemented as an
action button behind the feature flag and can be enabled by toggling
settings_seamless_transfer

Test: manual
Change-Id: I447b0add9d9de378fa09b5cf087518a81ec941e5
2019-09-18 15:29:41 -04:00
Mark Renouf
df0f3bce7e Adds a Builder to SyncRtSurfaceTransactionApplier.Params
This allows applying only those values provided. Since NULL can
be passed for several of these params, the builder keeps
track of fields that have been specified using flags instead.

Test: nope
Change-Id: I1483df7f796d11f1ebb5eda57d4aa10787cfb5de
2019-09-18 14:43:59 -04:00
Winson Chung
05a91477e5 Merge "Skip updating exclusion rects unless one is set" into qt-qpr1-dev am: 4b15467f5f
am: 2f8f814501

Change-Id: If3d72a9866f1aff44326db653e4f1fd670275366
2019-09-17 14:08:14 -07:00
Winson Chung
2f8f814501 Merge "Skip updating exclusion rects unless one is set" into qt-qpr1-dev
am: 4b15467f5f

Change-Id: I7eedaaddd5b2c843cb9f019440085bb9ceed9d25
2019-09-17 13:57:33 -07:00
Hongwei Wang
7759895ee6 Revert "Move bounds calculation and snap fraction to SysUI"
This reverts commit e3ff139062.

Reason for revert: PinnedStackTests#testEnterPictureInPictureDiscardSavedPositionOnFinish flaky

Change-Id: I067c94d536b1db94523ef3eec3d443e0dc4cb575
2019-09-17 09:48:36 -07:00
Winson Chung
687bcb7f33 Skip updating exclusion rects unless one is set
Bug: 140775753
Bug: 140701977
Bug: 140758369
Test: atest google/perf/jank/SystemUI/UbSystemUIJankTests:android.platform.systemui.tests.jank.SystemUiJankTests#testQuickSettingsPull -v
Change-Id: I824ca918d141eb88aa99b1e90adafe64ca3eb672
2019-09-16 22:41:45 +00:00
Mady Mellor
fd48588768 Merge "qt-r1-bubbles-dev @ build 5835883" into qt-qpr1-dev 2019-09-16 21:55:51 +00:00
Kevin Hufnagle
e0d4d96cc8 docs: Modernized AccessibilityNodeProvider example
Uses a delegate and more realistic method contents. Also added
language switcher for Kotlin-based and Java-based code.

Test: make ds-docs -j32

Bug: 138849874
Change-Id: Id31cf944f4adab2f09cf5004d68434b445da6eeb
2019-09-16 19:23:33 +00:00
Winson Chung
0d4ac4ec1c Exposing flickerlib classes and layer tracing to sysui
- Allow recents component to enable/disable layer tracing
- Expose flickerlib classes for use with sysui/launcher tests
- Allow trace files to be moved to a path that the client can read
- Ensure layers are flattened with depth traversal to encode ordering

Bug: 140244969
Test: atest FlickerTests
Change-Id: I7af5699ff5b8a4bc62c1a8105c67b31bc45a2236
Merged-In: Ia0934ec7c2b9484fa6c85f5aa8d9b2e5e6f7dc0f
2019-09-16 18:08:13 +00:00
Winson Chung
43e7a82f50 Merge "Exposing flickerlib classes and layer tracing to sysui" 2019-09-16 18:07:26 +00:00
Tiger Huang
b4bf224698 Merge "Window Manager Flag Migration (3/n)" 2019-09-16 16:56:53 +00:00
Jacky Kao
35b8966e77 Modifying the mechanism of A11y window cache
For supoorting new API as below, the A11y window cache needs to modify
from one dimension to two dimension. The first dimension is window Id,
the second(new) dimention is the display Id.
SparseArray<List<AccessibilityWindowInfo>> getWindowsOnAllDisplays()

Bug: 133279356
Test: a11y CTS & unit tests
Change-Id: Ida49ef22de67bd81353a896491dcae56ed751fd1
2019-09-16 17:00:39 +08:00
Arthur Hung
c499ad3775 Revert "Fix drag and drop (1/3)"
This reverts commit 59f532efad.

Bug: 137819199
Test: manual
Change-Id: If5e8856aad74b6f232fff9d5fd746f56d63288eb
2019-09-16 01:59:06 +00:00
Hongwei Wang
b77ae52cbc Merge "Move bounds calculation and snap fraction to SysUI" 2019-09-15 02:11:50 +00:00
TreeHugger Robot
4a4282f20c Merge "Define SurfaceControl.Transaction aidl in SurfaceControl.aidl file" 2019-09-13 06:38:34 +00:00
Adam He
34f8cc5f14 Add notifySessionLifecycle() to ContentCaptureSession.
Fixes: 139811826
Test: atest CtsContentCaptureServiceTestCases
Change-Id: Ia318ff220a8b13462655eb584fb400414163774f
2019-09-12 14:12:02 -07:00
Hongwei Wang
e3ff139062 Move bounds calculation and snap fraction to SysUI
Major changes in this CL

- Added PipBoundsHandler in SysUI package handles the bounds calculation
and save/restore the snap fraction
- Added IPinnedStackListener.onSaveReentrySnapFraction and
IPinnedStackListener.onResetReentrySnapFration, both called from
PinnedStackController (WM) to SysUI
- Added IPinnedStackListener.onPrepareAnimation, called from WM to
SysUI to notify that an animation for pinned stack is about to happen
- Added IPinnedStackController.startAnimation, called from SysUI to WM
to actually start the pinned stack animation
- Updated tv/PipManager to use PipBoundsHandler as well

Known issues and what's next

- Shelf height is set after the animation is started, therefore one may
notice the PiP window is hovering over the shelf. This is tracked
separatedly by b/139016518
- Bounds calculations still exist in PinnedStackController since
onTaskStackChanged callback requires so. Once we addressed b/139016833
(move rotation bounds calculation to SysUI), they should be all gone.
- Move the pinned stack animation from WM to SysUI and we can furthre
remove IPinnedStackListener.onPrepareAnimation and
IPinnedStackController.startAnimation

More details: go/pip-sysui-migration

Bug: 139015463
Bug: 139015142
Test: atest PinnedStackTests
Test: atest PinnedStackControllerTest
Change-Id: I76c2b40ea0fe95e3a8019b434d39ba5540e2039f
2019-09-12 09:57:21 -07:00
Vishnu Nair
676cdb31d8 Define SurfaceControl.Transaction aidl in SurfaceControl.aidl file
Test: go/wm-smoke
Change-Id: I60bb4683798e61149907731a4e3beb4e1a6389f2
2019-09-12 09:27:43 -07:00