Commit Graph

532 Commits

Author SHA1 Message Date
Winson Chung
d19e69d0bc 6/ Update pip to use shell main thread
- Remove some currently unused pip interface methods
- Remove some usages of handler
- Remove update thread (will eventually run on shell main thread)

Bug: 161979899
Test: atest WMShellUnitTests
Change-Id: If97e5182e396029120f0d0fb9e730ece93cddcc8
Signed-off-by: Winson Chung <winsonc@google.com>
2021-01-27 05:39:01 +00:00
Jorge Gil
0d98528ce2 Merge "Add crossfade animation on finish resize" 2021-01-26 17:37:12 +00:00
Nataniel Borges
732cde8f57 Merge "Enable RotateAppPairs tests" 2021-01-26 16:21:32 +00:00
TreeHugger Robot
c64d83723f Merge "Disable visibleLayersShowInConsecutiveEntries assertion" 2021-01-26 14:31:26 +00:00
TreeHugger Robot
c79f0ed9d5 Merge "Enable Pip tests" 2021-01-26 09:28:36 +00:00
Nataniel Borges
5de871ffd2 Enable RotateAppPairs tests
The tests are stable in postsubmit, so they can be moved to presubmit

Bug: 162923992
Test: atest FlickerTests
Change-Id: Ie691d8ae11672337e46529b26cc358f99e5a0bf4
2021-01-26 08:48:29 +01:00
Nataniel Borges
beaddd2cde Disable visibleLayersShowInConsecutiveEntries assertion
This assertion is ~30% flaky at the moment

Bug: 162923992
Test: atest FlickerTests
Change-Id: I288b5f19ee45bd708a4c47b161f6b7f5405968b5
2021-01-26 08:45:06 +01:00
Lucas Dupin
e6fee6030a Merge "Make bubble scrim respect opacity flag" 2021-01-26 05:29:20 +00:00
jorgegil@google.com
fe0ab24277 Add crossfade animation on finish resize
If seamless resize is enabled and the pip param for it is set to false,
the finish resize transaction will do a crossfade animation between the
two states.

Bug: 152554547
Test: corner/drag resize or tap to expand, stretch resize crossfade when let go
Change-Id: I8b2b27335ab8150a84914fc29615dd6625b1af35
2021-01-25 17:20:58 -08:00
Evan Rosky
27923b5a68 Merge "Add support/adapter for recents animation via shell transition" 2021-01-26 00:29:40 +00:00
Lucas Dupin
2107c5815f Make bubble scrim respect opacity flag
Test: atest ScrimControllerTes
Fixes: 173562716
Change-Id: If815eb75f63078741f2b1104938b223e0a99df31
2021-01-25 16:27:14 -08:00
Wale Ogunwale
2a9e1e73ac Merge "Fixed some bugs with main/side stage splits" 2021-01-25 23:46:26 +00:00
Yuncheol Heo
857ebd3ccd Merge "Move setTaskAlwaysOnTop from TaskView to BubbleExpandedView." 2021-01-25 19:39:13 +00:00
Wale Ogunwale
f84a471b02 Fixed some bugs with main/side stage splits
- Dragging to right to dismiss no working.
- Dragging to left to dismiss closes all apps
- Not able to put app in split after left drag to dismiss
- Pressing back on last activity in one split dismisses both.
- Don't move home task forward when startActivityFromRecents with launch
root set.

Fixes: 176061049
Test: they pass!
Change-Id: Ic1219b747e995ee8833b31433356bd44435118da
2021-01-25 10:51:58 -08:00
Nataniel Borges
82d51f03ab Enable Pip tests
The tests are stable in postsubmit, so they can be moved to presubmit

Bug: 171049720
Test: atest FlickerTests
Change-Id: I116157823f192ce31473d2d7d33ae7b8bf4e7a43
2021-01-25 18:34:56 +01:00
Nataniel Borges
1257711e65 Merge changes from topics "media-projection", "merge-specs", "single-assertion"
* changes:
  Use MediaProjection for screen recording
  Split app pair tests into individual assertions
  Compatibilize tests with new runner
2021-01-25 14:06:18 +00:00
Sergey Nikolaienkov
322819916e Merge "Filter out WmShellFlickerTests that are not supported on TV" 2021-01-25 10:12:46 +00:00
Nataniel Borges
9d110213e9 Use MediaProjection for screen recording
Use media projection instead of the shell command for screen recording.

Test: atest FlickerTests
Bug: 177077842
Change-Id: I9ac7351bf04004b5512316232637fd5cc2dd5fcc
2021-01-25 08:58:32 +01:00
Nataniel Borges
d04791d65c Split app pair tests into individual assertions
After this CL each assertion in the AppPairs test will appear as independent tests

Bug: 162923992
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Id704301b3396c4330001ef639faed6e978237f10
2021-01-25 08:58:27 +01:00
Nataniel Borges
143d584efd Compatibilize tests with new runner
Runner now prints each assertion individually to aid debugging.

Bug: 162923992
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I1c9a49ec3c283e5e034f0223573fca3ccafaf64c
2021-01-25 08:58:21 +01:00
Ben Lin
8df3b4e9a8 Merge changes Ie9be757c,I2e239d23
* changes:
  PiP pinch-to-resize: Enable two finger movement and slight rotation.
  PiP pinch-to-resize: add double-tap to max/min size.
2021-01-23 19:20:49 +00:00
Ben Lin
70a82b9076 PiP pinch-to-resize: Enable two finger movement and slight rotation.
Bug: 166478885
Test: Use two fingers and rotate and move PiP around
Change-Id: Ie9be757c95eb4bde66664ed3b8057b13f1d5bb5d
2021-01-23 09:10:10 +00:00
Ben Lin
dd1d40ef0d PiP pinch-to-resize: add double-tap to max/min size.
Per spec, max size would be the biggest possible bounds within the
movement bounds (displayWidth - 2 * insetWidth), and min size would be
40% of the width.

This also fixes the issue of portrait PiP not resizing correctly due to
wrong math being done in the resize algorithm.

Bug: 166478885
Test: Double-tap on PiP
Change-Id: I2e239d23a0e2519c0b482005614a1faddb1f808a
2021-01-23 01:06:06 -08:00
Yuncheol Heo
4664023109 Move setTaskAlwaysOnTop from TaskView to BubbleExpandedView.
Bug: 178212126
Bug: 175918200
Test: [Car] launch Dialer and check Dialer button is highlighted.
Test: [Phone] launch DetailDialog and check Navigation bar.
Change-Id: Ic10dca7e25a8828f8da36130ec78d2e24c765609
2021-01-22 23:24:25 -08:00
Lyn Han
03622914f7 Merge "Animations for new bubble while stack is collapsed" 2021-01-23 00:52:43 +00:00
Hongwei Wang
92998bace0 Merge "Get PictureInPictureParams from top activity" 2021-01-22 22:31:40 +00:00
Evan Rosky
710ff71169 Add support/adapter for recents animation via shell transition
This does the basics to adapt recents animation to shell transition.

Replaces startRecentsActivity with a normal startActivity. Once
we make a full switch to shell transitions, we can hopefully remove
it.

Updates the TransitionHandlers in shell and RemoteTransitions to
support attaching a WindowContainerTransaction to a transition's
finish. For recents, this is used to move the "pausing" app (the
one getting animated into the recents carousel) back to the front
if the gesture doesn't go all-the-way into recents.

Bug: 162503077
Test: enable shell transit. launch an app, use gesture to open
      recents. use gesture to start going to recents, but then
      release early to return to the app.
      atest ShellTransitionTests
Change-Id: Ied54f1b2c70c5c129b2f5798117d6d8a85360998
2021-01-22 13:43:55 -08:00
Lyn Han
f609cbd8fa Animations for new bubble while stack is collapsed
Bug: 170302562
Test: have no bubs, add bub => bub moves up to finalY
Test: have bubs, add bub => new bub moves up, old bubs move down
Test: update existing bub => updated bub swoops above stack, then
      moves down to finalY with other bubs
Test: the above on portrait left/right && landscape left/right

Change-Id: I1f9e38fed9ad66ad243700082981f75418c64bf5
2021-01-22 14:55:53 -06:00
Wale Ogunwale
a47141f5ee drag-n-drop support for main/side stage split-screen
Switch shell dnd to use new split-screen infra.

Test: exiting tests pass
Bug: 176061049
Change-Id: Iff299502d1126320dc0935a9925f0c74d3f3beee
2021-01-21 10:34:56 -08:00
TreeHugger Robot
5bb5544909 Merge changes I057989ea,Ic2b318e4,I266d4a03
* changes:
  Fix some deprecation warnings in WM Shell.
  Clean up SysUI Kotlin warnings
  Clean up some deprecation warnings in SettingsLib
2021-01-21 02:16:27 +00:00
Hongwei Wang
e2f35542fe Get PictureInPictureParams from top activity
Task#getPictureInPictureParams used to get the params from root activity
and it is okay doing so without autoEnterPip since the activity to be
pinned will be put in a task with one and only one activity.

With autoEnterPip, it it possible that the root activity has no
PictureInPictureParams being attached when the transition starts in
Launcher side, switch to use the PictureInPictureParams tied to the top
visible activity here.

Fixes also
- when this happens, we need to reset the window crop leash on the
  original task in FullscreenTaskListener#onTaskInfoChanged
- ensure the reparented task inherits the current bounds
- ensure we do not hide the leash in Task#setHasBeenVisible by setting
  mHasBeenVisible=true on the newly created task

Video: http://rcll/aaaaaabFQoRHlzixHdtY/gIO4G5dybW7tJWXihkhXfE
Bug: 177335910
Test: see video
Change-Id: I198443b93b7d8cc11108f0d0606f98eac58c07b7
2021-01-20 16:41:10 -08:00
Hongwei Wang
418ac0a7ee Merge "Delay the PiP menu attachment" 2021-01-20 21:37:56 +00:00
Wale Ogunwale
a648085407 Merge "WindowContainerTransaction for setting adjacent roots" 2021-01-20 20:10:12 +00:00
Winson Chung
94891df66a Merge "Move the overflow ui to the bubble window" 2021-01-20 17:48:55 +00:00
Wale Ogunwale
c04c4c1098 WindowContainerTransaction for setting adjacent roots
Ability to specify that 2 root tasks are adjcent there by allowing them
to occlude their parent. Similar to how the legacy primary/secondary
split windowing modes are used to occlude their parent.

Also, occlude parent if a child in multi-window mode as a matching
bounds.

Bug: 177166639
Test: AppConfigurationTests#testSplitscreenPortraitAppOrientationRequests
Change-Id: I7d54bfa188700a76b0bca911d2011123c21553ad
2021-01-20 06:37:04 -08:00
Hongwei Wang
ba4ded96a4 Delay the PiP menu attachment
The flash at the end of entering PiP transition in gesture navigation
mode is a regression from ag/12997165. Fixed by delaying
PipMenuController#attach late (when the leash is set to transparent) in
the process to avoid any artifacts on the leash caused by addShellRoot.

Video: http://rcll/aaaaaabFQoRHlzixHdtY/dFdpJHvTCP6NmNEkDHrtei
Bug: 174814759
Test: see video
Change-Id: I7e74253f94b16977d04e27c2ab76fd3178001630
2021-01-19 17:51:41 -08:00
Winson Chung
ebf6903682 Move the overflow ui to the bubble window
- An activity always runs on the main looper of the process
  and this simplifies threading since all bubble data will
  run on the shell thread
- The BubbleExpandedView will not initialize the task view
  when mIsOverflow is set.  We still snapshot the overflow
  view to keep the existing selection animation logic the
  same between overflow/task bubbles

Bug: 161979899
Test: atest WMShellUnitTests
Test: atest SytemUITests

Change-Id: If3632a3030c58c9ec334afcb06aac4c51e28938b
2021-01-19 14:39:39 -08:00
Yuncheol Heo
cbb25bcfc3 Merge "Fix NPE in TaskView." 2021-01-19 21:54:49 +00:00
TreeHugger Robot
92f15b66e9 Merge "2/ Fix flaky in WMShellFlickerTest legacySplitScreen tests" 2021-01-19 09:27:52 +00:00
TreeHugger Robot
7ecc9ac716 Merge "Refactor OneHanded mode UiEventLogger implementation" 2021-01-19 08:55:19 +00:00
Tony Huang
83254fb5f8 Merge "Use queue to defer all task events" 2021-01-19 07:18:53 +00:00
Bill Lin
91f0e46305 Refactor OneHanded mode UiEventLogger implementation
1) Move UiEventLogger from static to non-static
2) Rename to OneHandedUiEventLogger to align wm-shell components
3) Remove unused code from OneHandedUiEventLogger
4) Refine the call of stopOneHandedWithUiEvent()
5) Only register TaskStackListenerCallback when enabled
6) Override getId() in the enum to ensure UiEventLoggerImpl
   can obtain the event corresponding id accordingly

Fixes: 176513465
Test: adb shell cmd stats print-logs
Test: manual + statsd_testdrive -terse 90
Test: atest WMShellUnitTests
Change-Id: Ic2fb1a2bbf87e647b0883d50b64ced53aa37d613
2021-01-19 10:11:58 +08:00
Yuncheol Heo
97ae10814c Fix NPE in TaskView.
Bug: 177646952
Change-Id: I14c0244e2d4b494491092c09f96bb50d9c2ceaaf
2021-01-18 13:59:15 -08:00
Bill Lin
c952210248 2/ Fix flaky in WMShellFlickerTest legacySplitScreen tests
b/177374067 indicate OpenAppToLegacySplitScreenTest still flaky
1) Extend the filter in visibleLayersShownMoreThanOneConsecutiveEntry()
   - Toast window
2) When going split transition, waitForAppTransitionIdle() at end
3) Enable navBarLayerIsAlwaysVisible() & statusBarLayerIsAlwaysVisible()

Test: atest com.android.wm.shell.flicker.legacysplitscreen
Test: Set TEST_REPETITIONS to 100 and run flicker test stressfully
Bug: 177374067
Bug: 176923301
Bug: 176134495
Change-Id: I1caface176f4af591d5383877c81b786eb23ba58
2021-01-18 11:47:32 +08:00
Tony Huang
28fb865b01 Use queue to defer all task events
It has two layer defer currently, it should only remain queue
events method. Remove using of mDeferTaskOrgCallbacksConsumer
and extand using of queue method to onTaskAppeared,
onTaskVanished and onBackPressedOnTaskRoot.

Bug: 171749427
Bug: 177551997
Test: check split screen, PiP and bubbles work normally
Test: atest WmTests:WindowOrganizerTests
Test: atest CtsHarmfulAppWarningHostTestCases
Change-Id: Ic8fea93117f45b60f15b06773eefbbde11e48fd5
2021-01-18 11:44:19 +08:00
Evan Rosky
c7bd598702 Merge "Add support for remote transition playback in shell transitions" 2021-01-15 18:23:09 +00:00
Michael Wright
64dcb6e4b6 Fix some deprecation warnings in WM Shell.
Also, it seems like the vibrate call was always broken by conflating
effect IDs with durations. Fixed that, which should hopefully provide a
better haptics experience.

Move things to use more Kotlin idioms along the way as well.

Bug: 177652618
Test: manual
Change-Id: I057989eab8f6728953c2c4f0d7489a5aa0e9bf2d
2021-01-15 15:36:48 +00:00
Evan Rosky
6d4c6ec276 Merge "Revert "Use queue to defer all task events"" 2021-01-15 00:08:16 +00:00
Evan Rosky
30f3544f65 Add support for remote transition playback in shell transitions
This adds IRemoteTransition interface for other processes (like
launcher) to register for playing transition animations.

Then there are 2 supported ways to "register":

1. Is to attach an IRemoteTransition to ActivityOptions. To
   support this pathway, requestStartTransition now takes a
   TransitionRequest object which can contain whatever info
   is needed at the time. One piece of that is the passed-in
   IRemoteTransition.

2. Is to register directly with shell (via systemuiproxy for
   now) with a TransitionFilter. This filter allows shell
   transitions to dispatch a transition to a remote without
   need to make queries over binder.

This also hooks up launcher animations by converting the new
transition info to the old RemoteAnimationTargetCompat stuff.

Bug: 169035082
Test: launch app from launcher and observe the icon animation.
      atest ShellTransitionTests
Change-Id: I8014a6f46cffda3a48a1a4ae101e2643078f4a14
2021-01-14 14:50:51 -08:00
Evan Rosky
1dd669ae2b Revert "Use queue to defer all task events"
This reverts commit 4c564ef04f.

Reason for revert: suspected culprit for b/177551997

Change-Id: Idf7ae363faba73bf4c79185b4069201f7173e1ab
2021-01-14 21:42:52 +00:00