Commit Graph

774 Commits

Author SHA1 Message Date
Ben Lin
a4cd16baad Merge "PiP: Refine pinch-resizing by damping rotation." into sc-dev 2021-03-06 04:21:31 +00:00
Hongwei Wang
5632ba9ee0 Merge "Defer onTaskInfoChanged while transitioning to PiP" into sc-dev 2021-03-05 23:26:49 +00:00
TreeHugger Robot
d6973bfc1e Merge "Fix some legacy-transition timing issues in split-screen" into sc-dev 2021-03-05 18:58:34 +00:00
Hongwei Wang
c504ed49fd Defer onTaskInfoChanged while transitioning to PiP
The ApiDemos app triggers onTaskInfoChanged when transitioning from
landscape to portrait PiP due to its implementation (fixed in a separate
CL in same topic). Here we defer applying the TaskInfo received in
onTaskInfoChanged till the entering transition finishes.

Video: http://rcll/aaaaaabFQoRHlzixHdtY/c1n3cqwBydRxDrwxKHqI0H
Bug: 180630127
Test: enter PiP w/ autoEnter from landscape in button navigation
Test: atest WMShellUnitTests:com.android.wm.shell.pip.PipTaskOrganizerTest
Change-Id: I3bc07dbb45a281d5c9b0bbfff7478e57b8944c60
2021-03-05 10:19:59 -08:00
Evan Rosky
86234a6ebd Merge "Abstract some transition checks so they can be expanded." into sc-dev 2021-03-05 16:48:32 +00:00
Winson Chung
6d2a041ca4 Merge "Update the split screen APIs used by the launcher" into sc-dev 2021-03-05 04:25:11 +00:00
Evan Rosky
b944f19d50 Fix some legacy-transition timing issues in split-screen
This does 2 things:

1. Leash-setup was originally made asymmetric to handle tasks
   switching between organized and non-organized; however, now the
   tasks don't do that so we can symmetrize this again.

2. TaskInfoChanged reporting was added to ensureActivityVisibility.
   This causes noise as it can repeatedly send unchanged TaskInfos to
   shell. The result is that the legacy split organizer will reposition
   its surface while it is on an animation leash. To avoid this, keep
   track of the last positions and only update it if it changes. This
   maintains a contract that as long as the task's actual position
   doesn't change (ie. during an animation), the shell won't clobber
   changes made by legacy-transition's leashing. This can be cleaned
   up once we move to shell transitions where ownership is better
   defined.

Bug: 172840531
Test: open 2 apps in split and observe no offset in launcher
Change-Id: I262e3a53b7497192e234d4a8ba215e10ed73a145
2021-03-04 17:59:45 -08:00
Ben Lin
bc696ba302 PiP: Refine pinch-resizing by damping rotation.
This adds:
- push back rotation starting by 5 degrees. Until the user input has
more than 5 degrees of rotation, we assume the user doesn't really want
to rotate it and only want to move/resize, so it's less jarring/jittery.
- Dampen the rotation once the user rotates past a certain amount.

Bug: 181068706
Test: Manual.
Change-Id: I0fd95d9cb2ad2eff053ce92817af22513d11cc62
2021-03-04 15:23:52 -08:00
Winson Chung
a416ee18a6 Use the right executor for callbacks in Shell code
Bug: 181814254
Test: atest SystemUITests
Change-Id: I60a196360f9ff435ce99cb5e1d42d3da400d1206
2021-03-03 17:23:55 -08:00
Hongwei Wang
c241755d1f Merge "Restrict the overridden min size for PiP" into sc-dev 2021-03-03 17:53:16 +00:00
Jeff Pierce
031bb5d835 Update the split screen APIs used by the launcher
Makes the following changes:
1. Adds a boolean visible parameter to the onTaskChanged method of
SplitScreenListener to allow the launcher to determine which task is
on top of a stage
2. Allows the launcher to specify a fill-in intent when asking to open
a PendingIntent on the main or side stages.
3. Allows the launcher to ask to remove a task from the side stage.

Bug: 179176511
Test: manually tested against the foldable taskbar launcher.
Change-Id: I9fa530f546af58779ccf71d0753d9b6d3479fd0b
2021-03-02 16:40:30 -08:00
Winson Chung
e6e1ab1571 Merge "Move PipTouchHandler initialization to shell main thread" into sc-dev 2021-03-02 23:30:30 +00:00
Hongwei Wang
8c51113135 Restrict the overridden min size for PiP
Per go/cdd-proposal-pip-size, the absolute minimum size when overridden
should be 48dp.

Bug: 174302616
Test: atest PinnedStackTests#testEnterPipWithTinyMinimalSize \
            WMShellUnitTests:com.android.wm.shell.pip
Merged-In: I2f0dfd9a79049aaf696fde8703994deaecce63f5
Change-Id: I2f0dfd9a79049aaf696fde8703994deaecce63f5
2021-03-02 15:01:31 -08:00
TreeHugger Robot
3dd7039e73 Merge "Set size compat UI to max layer" into sc-dev 2021-03-02 22:09:30 +00:00
Evan Rosky
7e3bc7154e Abstract some transition checks so they can be expanded.
This is mostly to clean-up CL diffs so its easier to tell
what is changing. The main change here is replacing naked
parint == null checks with TransitionInfo.isIndependent() which
can do extra logic to handle cases where, even though a change
has a parent, it might be animating independently with in it.
The easiest example is display rotating while an app is opening.

This also fixes a small bug when removing a non-visible task.

Bug: 179270750
Test: atest TransitionTests
Change-Id: Ibd72b0721f33602b26bcc5c7060fc959aed04377
2021-03-02 12:34:03 -08:00
Chris Li
ca5fb2f2a6 Set size compat UI to max layer
Before, the size compat UI is reparent to Task with its original layer
(likely 1), which may not be the higheset layer when the Task contains
more than one children.

Fix: 181541449
Bug: 178327644
Test: verify with launching a non-resizable activity from another
Change-Id: I9e812ca8c0c1fd5b93a6e074a5e4df164c8fa03b
2021-03-02 10:41:54 -08:00
Winson Chung
527b6ce657 Move PipTouchHandler initialization to shell main thread
- We should separate the construction from the initialization
  and make sure everything is initialized in order on the shell
  main thread.

Bug: 181262334
Test: atest PinnedStackTests

Change-Id: I4f52864972146c7440794625e1de370ecea75006
2021-03-01 23:02:00 -08:00
Wei Sheng Shih
a3b84a9a62 Merge "Extract StartingSurface interface on WMShellBaseModule(7/N)" into sc-dev 2021-03-02 04:50:28 +00:00
Jerry Chang
2f3b22c90a Merge "Fix dismissing wrong stage when droping divider to the edge" into sc-dev 2021-03-02 00:24:43 +00:00
Yuncheol Heo
83ad0adb52 Merge "Introduce a flag removeWithTaskOrganizer." into sc-dev 2021-03-01 21:13:45 +00:00
Lyn Han
69943c0ea9 Update bubble dot math for consecutive flyout
Bug: 170267642
Test: flyout-to-dot transformation okay
      for left/right stack in portrait/landscape
Change-Id: I83f41984dd8bb6ec1cbbfcf9e0a1671555ebab32
2021-02-26 23:25:08 -06:00
Yuncheol Heo
28e66c2a77 Introduce a flag removeWithTaskOrganizer.
- The flag allows us to remove the tasks which are managed by
  TaskOrganizer when TO dies.

Bug: 179676966
Test: Launch a Bubble, kill SysUi and check if the Bubble remains in
  ActivityStack.
Change-Id: Ie0ccafd2b4b0393b777b69b7fb70c0ea74f95963
2021-02-26 10:46:52 -08:00
Nataniel Borges
ca35310221 New CUJ: Swipe pip window to bottom center to close
Share the assertions between close with dismiss and close with swipe.

Bug: 172037252
Test: atest WMShellFlickerTests:PipCloseWithSwipe WMShellFlickerTests:PipCloseWithDismissButton
Change-Id: I03904f1de78d3204f9bdd0d6207ec4947f1404dd
2021-02-26 14:41:17 +01:00
Mark Renouf
20bd3d4935 Merge "Long screenshots framework update and API unhide" into sc-dev 2021-02-26 13:06:47 +00:00
Nataniel Borges
31182d2383 Merge "Promote stable app pairs tests" into sc-dev 2021-02-26 12:46:12 +00:00
Nataniel Borges
62d88aac30 Merge "Promote stable Pip tests" into sc-dev 2021-02-26 12:46:08 +00:00
wilsonshih
75d1558ce1 Extract StartingSurface interface on WMShellBaseModule(7/N)
Decouple the dependency for the rest CLs.

Bug: 73289295
Bug: 131311659
Test: atest WindowOrganizerTests StartingSurfaceDrawerTests
SplashscreenTests

Change-Id: Ifd323714184fad285b4d65f8c86c9b8feafc2374
2021-02-26 18:22:40 +08:00
Nataniel Borges
470a4a95e5 Merge "New CUJ: Pip window moves when opening all apps" into sc-dev 2021-02-26 09:34:06 +00:00
Nataniel Borges
7729077c66 Promote stable Pip tests
Promote stable postsubmit and flaky tests to presubmit

Test: atest FlickerTests
Bug: 171049720
Change-Id: I44aba59aaac9912848d287cf3cbea36e868a33e5
2021-02-26 10:14:32 +01:00
Jerry Chang
b194837fed Fix dismissing wrong stage when droping divider to the edge
Fix: 181143181
Test: manual check
Test: atest WMShellUnitTests
Change-Id: I273594fe25d4b4efe060180b876446ebc1daede8
2021-02-26 14:44:11 +08:00
Lyn Han
27b5e90577 Merge "Fix bubble flyout alignment for right-side stack" into sc-dev 2021-02-25 23:50:34 +00:00
Mark Renouf
8f1b73e183 Long screenshots framework update and API unhide
This change includes a series of API review changes. The most
significant update is the addition of cancellation signals to
API methods where needed.

Renames some internal classes and interfaces to support the
API changes and to simplify tests and improve quality.

Test: numerous presubmits
Bug: 175830670
CTS-Coverage-Bug: 180419562
Change-Id: I9b1b950a2779fc902ecf4d6394e3c35171926700
2021-02-25 23:02:17 +00:00
Nataniel Borges
52eb6ffa55 Promote stable app pairs tests
Promote stable postsubmit and flaky tests to presubmit

Test: atest WMShellFlickerTests
Bug: 171049720
Change-Id: I7eff620e56b6c2ccf2704ffbf1576b766cbe4403
2021-02-25 22:09:23 +01:00
Nataniel Borges
6306b61682 New CUJ: Pip window moves when opening all apps
Bug: 174238224
Test: atest WMShellFlickerTests:PipMovesInAllApps
Change-Id: I31304a462f78bc435b395207b76efc707e316d4b
2021-02-25 21:55:12 +01:00
Hongwei Wang
9bdee79a47 Merge "Fixes autoEnterPip transition from landscape" into sc-dev 2021-02-25 19:50:01 +00:00
Nataniel Borges
a32ef5bd2a Merge "Updates flicker documentation and improve naming" into sc-dev 2021-02-25 12:33:34 +00:00
Louis Chang
09f52aa440 Merge "Rename Stack to Task related terms (7/n)" into sc-dev 2021-02-25 04:58:24 +00:00
Louis Chang
7efc57797c Rename Stack to Task related terms (7/n)
- Renaming PinnedStack to PinnedTask
- Renaming DockedStack to DockedTask

Bug: 157876447
Test: presubmit
Change-Id: I51c10564647ed0d46eddc0c51a1ee06eef897e43
2021-02-25 04:57:26 +00:00
Jason Chang
b33721641e Merge "Fix the wallpaper app cannot display into full screen when in one-handed mode" into sc-dev 2021-02-25 02:55:13 +00:00
Chris Li
7ff46d7137 Merge "DisplayContent rotateBounds not keeping same physical position for 180" into sc-dev 2021-02-25 02:40:34 +00:00
Jerry Chang
3ea9673b74 Merge "Make stage split divider non-interactive while showing IME" into sc-dev 2021-02-25 00:51:14 +00:00
James O'Leary
7edf52d602 Merge "Revert^2 "[framework] Integrate new quantizers"" into sc-dev 2021-02-24 21:59:47 +00:00
Lyn Han
5b449f56d0 Fix bubble flyout alignment for right-side stack
Fixes: 172490423
Test: send updates on left/right side in portrait/landscape
     => see that flyout is positioned correctly
Change-Id: I3dd84f467f17e8429a0ba2cc23f45e8c89474557
2021-02-24 13:04:00 -06:00
Bob Badour
745e7ee830 Merge "[LSC] Add LOCAL_LICENSE_KINDS to frameworks/base" into sc-dev 2021-02-24 18:43:29 +00:00
Lyn Han
26e6b76d99 Merge "Reorder bubbles without animations on collapse" into sc-dev 2021-02-24 18:38:37 +00:00
Lyn Han
95089b6d65 Reorder bubbles without animations on collapse
Fixes: 180045233
Test: select different bubble while expanded, collapse stack
     => see that newly selected bubble is on top of stack
     => no weird animations like in b/178499353
Change-Id: I6d95763a4dd08fd8d1e30dd93131ff27b4fd7c2c
2021-02-24 18:38:13 +00:00
Jerry Chang
d331097396 Make stage split divider non-interactive while showing IME
Redirect IME inset control to wm shell during multi-window split. And
register IME position listener to make divider bar non-interactive while
IME showing.

Bug: 179262787
Test: manual check
Test: atest WMShellUnitTests
Change-Id: Ia83a29c823962221aedb1cc317928f6b4b7ddcae
2021-02-25 02:27:27 +08:00
Hongwei Wang
c241580de5 Fixes autoEnterPip transition from landscape
Fixes included in this change
- PiP bounces back to fullscreen. The animation direction is not cleaned
  up after animation finishes and when display rotation callback
  happens and calls into PipTaskOrganizer#onMovementBoundsChanged, it
  accidentally invokes the onTaskVanished. Therefore, this does not
  happen on the first try but following attempts.
- PiP window offsets to the bottom caused by duplicated display changed
  callbacks, bail early if we know for sure the DisplayLayout objects
  are identical. Also, when display rotation callback happens, the
  PipBoundsState#getNormalBounds is still in landscape though the
  internal rotation has been set in PipController#startSwipePipToHome.

Known issue
- PiP window flickers at the end of the transition, will track in
  different bug.

Video: http://rcll/aaaaaabFQoRHlzixHdtY/hAdwMhKMaYTylRcnW24Utg
Bug: 179721427
Bug: 179718773
Test: repeatedly enter PiP from landscape with autoEnterPip, see video
Change-Id: I77c6f441563bc54720b9ef2952526691c495a777
2021-02-24 10:10:12 -08:00
James O'Leary
9d3ad10eb9 Revert^2 "[framework] Integrate new quantizers"
96169052c4

Change-Id: Idefcf279b9fedeeaa29f75e705adfb60f0ad5c8a
2021-02-24 17:09:06 +00:00
Nataniel Borges
6fa330e7fd Updates flicker documentation and improve naming
- Updates documentation to all subject methods.
- Standardize names between Layers and WindowStates subjects.

Bug: 162923992
Test: atest FlickerTests
Change-Id: I24ba3faa014cec1c4ee7ed42aa06044616890a53
2021-02-24 17:21:54 +01:00