Commit Graph

1761 Commits

Author SHA1 Message Date
Jerry Chang
f371b68af1 Merge "Consolidate entering split screen behavior" into tm-qpr-dev am: b60de628ba am: 4d9b900e56
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20575007

Change-Id: I30f6b85970448c39ac75dd4c46dbc8f1a9d0f85c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-05 04:20:51 +00:00
Jerry Chang
b60de628ba Merge "Consolidate entering split screen behavior" into tm-qpr-dev 2022-12-05 03:30:34 +00:00
Wei Sheng Shih
941c58dee9 Merge "Extract the drawing logic from StartingSurfaceDrawer." 2022-12-05 03:11:23 +00:00
Merissa Mitchell
45f061a432 Merge "Set caption to full width in WindowDecoration if no width is defined." into tm-qpr-dev am: 88490035c5 am: 2b33756547
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20600974

Change-Id: I8b7735c23169dafb4f332e23d61294d4e3ed2f9c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 18:24:03 +00:00
Merissa Mitchell
88490035c5 Merge "Set caption to full width in WindowDecoration if no width is defined." into tm-qpr-dev 2022-12-02 18:09:31 +00:00
wilsonshih
f8801f5069 Extract the drawing logic from StartingSurfaceDrawer.
Prepare for windowless starting surface. Attemp to decouple the drawing
methods from window related handling.
Move most of snapshot drawing method together to a utility class
SnapshotDrawerUtils, so SystemBarBackgroundPainter now can shared for
shell and core.

Bug: 131727607
Bug: 257857570
Test: atest SnapshotDrawerUtilsTest StartingSurfaceDrawerTests
Test: hot launch an app, and verify snapshot starting window show up
without issue.
Test: cold launch app, verify icon style splash screen can show.

Change-Id: I4d2c04e41d375cf6c8711a60977b8f24dddd41c0
2022-12-02 12:11:30 +00:00
Maryam Dehaini
ea4e24dd0f Merge "Rename WindowDecorModelView to reflect purposes" into tm-qpr-dev am: 9fcbcb0762 am: 08752d9141
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20534843

Change-Id: Ie1d02ca61c52914b28cf0f5171fcc02407eaa161
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 03:13:34 +00:00
Merissa Tan
8cdd2cd068 Set caption to full width in WindowDecoration if no width is defined.
This CL sets the caption width to match the task bounds width if no
fixed width is defined.

Bug: None
Test: atest WMShellUnitTests:WindowDecorationTests
Change-Id: I033d0564f21974f5fdc982fba823ae42bdd9f37c
2022-12-01 11:50:54 -08:00
maryam
b977f682d8 Rename WindowDecorModelView to reflect purposes
Changed method names in WindowDecorModel Interface to better reflect
their purposes and made onTaskChanging (Previously
setupWindowDecorationForTransition) to handle captionCreation if needed.

Test: Manual Testing and created CaptionWindowDecorViewModelTests
Bug: 257288823
Change-Id: I43672fa37accba97b4ea330e01082d00137a4b01
2022-11-30 11:09:06 -08:00
Arthur Hung
3a55579cf2 Intruduce Cross Activity Animator
Add a new animator to support `TYPE_CROSS_ACTIVITY` when starting a back
navigation and it will return to another activity.

This also introduces the background controller that could show the
animation background surface attached to the display area.

Bug: 236759828
Bug: 238474994
Test: atest BackAnimationControllerTest BackNavigationControllerTests
Change-Id: I6574b6ce969cb905ba8b4a797560216aed2ee3cb
2022-11-29 08:15:01 +00:00
Sam Dubey
4c5e83206c Merge "Revert "Fix IME not shown from recents to split-screen task"" 2022-11-28 08:19:05 +00:00
Jerry Chang
b78b1dfd7c Consolidate entering split screen behavior
Add a fallback logic for entering split screen by verifying it contances
opening task to the indicated side to prevent leaving one side of the
split empty. Fix checking the wrong running task when entering split
screen by checking the top running task instead of checking reported
focusing task since the focusing task is not matching with the leaf task
running on top always.

Fix: 246689775
Fix: 260389099
Test: atest WMShellUnitTests
Test: drag and drop Calender to enter split while Calender on top won't
      leave empty side split.
Test: drag and drop Chrome to enter split while Chrome on top won't pup
      up not supported toast.
Change-Id: Ic7ea239b10ce41d956a85dbd6d04e007babd0743
2022-11-28 07:05:33 +00:00
Timothy Wang
0728069542 Revert "Fix IME not shown from recents to split-screen task"
This reverts commit a210826fe5.

Reason for revert: DroidMonitor: Potential culprit for Bug b/260534444 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: Id88fe6e3a4f9eea08aa812feaae92067be40950f
2022-11-28 05:50:07 +00:00
Wilson Wu
c9d48ffda4 Merge "Fix IME not shown from recents to split-screen task" 2022-11-28 02:46:44 +00:00
Wilson Wu
a210826fe5 Fix IME not shown from recents to split-screen task
DislplayImeController only update the ImeSurfaceControl
for a non-null control. So it still keep a stale control
even the control has lost.

The ImeSurfaceControl should be updated to avoid using a
stale control to start animation.

Bug: 258814082
Test: Manual test with bug steps
Test: atest DisplayImeControllerTest
Change-Id: Id7ac6de6a9e8e5f0e620254c39d104272175b3a1
2022-11-23 20:42:42 +08:00
Chilun Huang
ab6ce5741b Merge "Move stable tests to presubmit" 2022-11-19 07:14:02 +00:00
Chilun Huang
09484b811f Move stable tests to presubmit
Move stable tests of EnterSplitScreenByDragFromShortcut and
SwitchBetweenSplitPairs to presubmit.

Bug: 247997619
Bug: 247095572
Test: atest WMShellFlickerTests
Change-Id: Ia88cacc6e315033ef30960fe6514b36c8fd3aac5
2022-11-18 17:06:14 +08:00
Arthur Hung
104cb59497 Use IS_U_ANIMATION_ENABLED to enable animators for U
Use `IS_U_ANIMATION_ENABLED` to control the new animatiors for U
except `TYPE_RETURN_TO_HOME` that already enabled in previous version.

Bug: 131727607
Test: atest BackAnimationControllerTest
Change-Id: I612d4e8ce312be6dee36776b63cee33e72875908
2022-11-16 03:02:16 +00:00
Evan Rosky
29a0ffe150 Merge "Revert^5 "Enable Shell Transitions"" 2022-11-15 19:50:23 +00:00
Evan Rosky
ece17fbd88 Revert^5 "Enable Shell Transitions"
cc23c1824d

Change-Id: Ica517303319e01a8a6b942e30606fd8135a48926
2022-11-15 18:08:16 +00:00
TreeHugger Robot
8decff095c Merge "Revert "Attach the background-panel to DisplayContent."" 2022-11-15 12:41:04 +00:00
Jorge Gil
bc425d503d Merge "Add WCT#setDragResizing to optimize fluid resizing" into tm-qpr-dev am: 1f17bf7eba am: f28339c869
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20378671

Change-Id: I3cdea614c657c696c551d31672b215cb80eeb789
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-14 22:24:21 +00:00
Jorge Gil
1f17bf7eba Merge "Add WCT#setDragResizing to optimize fluid resizing" into tm-qpr-dev 2022-11-14 21:09:24 +00:00
TreeHugger Robot
69e66c663d Merge "Reland "Extand the long press duration"" 2022-11-14 19:33:40 +00:00
Ats Jenk
0942d7786b Merge changes I1d593900,I179c69c1 into tm-qpr-dev am: 2d7fb7b2b5 am: 83ec5817f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20428903

Change-Id: I77c8b2c4ecba4408c88cae5e5c4e91524aefe783
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-14 18:43:23 +00:00
Ats Jenk
2d7fb7b2b5 Merge changes I1d593900,I179c69c1 into tm-qpr-dev
* changes:
  Move home task behind visible task
  Move desktop mode logic out of ShellTaskOrganizer
2022-11-14 18:27:15 +00:00
Sam Dubey
10904780f2 Merge "Disable inernal app before running tests" 2022-11-14 16:42:27 +00:00
Cosmin Băieș
fc03fbd025 Merge changes from topic "revert-20437706-revert-20313761-IME tracking - hide-HZXGDCCPOZ-XOCVITMXNR"
* changes:
  Revert^2 "Input latency & reliability tracking - hide flow"
  Revert^2 "Input latency & reliability tracking"
2022-11-14 14:36:36 +00:00
Jerry Chang
026d936ec3 Merge "Make multi-instances split opt-in based" into tm-qpr-dev am: 1e20bf871c am: 018d33893a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20295364

Change-Id: I16be9c0ce748743b4e90ed4d1c69c735439d4b24
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-14 14:23:46 +00:00
Sam Dubey
261cc40187 Disable inernal app before running tests
Debuggable reamdump data collection dialog is triggering up while
running tests. These are causing flakes. While a better fix would be
figuring out why these are triaggered, the wm tests should be
independent of internal apps which an end user of Android won't see.

Test: Forrest
Bug: 258578781
Bug: 239384214
Change-Id: Ia4c0c670fe3e35f84640787cb8fce70e74edb264
2022-11-14 13:34:59 +00:00
Jerry Chang
1e20bf871c Merge "Make multi-instances split opt-in based" into tm-qpr-dev 2022-11-14 13:29:46 +00:00
Chilun Huang
2c85bb7cd6 Reland "Extand the long press duration"
This relands commit 8dc06e5335

The Different from the original patch:
Ignore the layers of popup windows.

The original CL description:
Align the long press duration to AutomationUtils.

Bug: 257099231
Bug: 258787797
Test: atest WMShellFlickerTests:CopyContentInSplit
Change-Id: I391e0e4e71aa0ae13221ecd571e187e1c10f7c96
2022-11-14 20:31:35 +08:00
TreeHugger Robot
5b48b2839c Merge "Revert "Extand the long press duration"" 2022-11-14 12:11:28 +00:00
Arthur Hung
f322cbd5cc Rephrase BackAnimationController and BackAnimationRunner
This CL did some refactors include:
- Make the back animation will follow these two phases to better
  understand.
  1. Phase 1 animation will start from gesture start, and end when
     gesture released.
  2. Phase 2 animation aka post commit animation will start after gesture
     released.
  3. When the animation is finished, make sure we could trigger the real
     back behavior and notify the core.

Bug: 238475694
Test: atest BackAnimationControllerTest
Change-Id: I251b9674a4aa9965c338ccf592efaeabdcecd5e8
2022-11-14 02:45:29 +00:00
Evan Rosky
d13c6637cc Merge "Revert^4 "Enable Shell Transitions"" 2022-11-11 23:31:28 +00:00
Victor Chang
db82b37998 Revert "Extand the long press duration"
This reverts commit 8dc06e5335.

Reason for revert: b/258787797

Bug: 258787797
Change-Id: I417939d7d9f0344e4f260703cac9929d1e0633d1
2022-11-11 14:54:07 +00:00
Cosmin Băieș
44ff0dd9eb Revert^2 "Input latency & reliability tracking - hide flow"
d638a60aae

Test: atest CtsSystemApiSignatureTestCases:android.signature.cts.api.system.SignatureTest#testRuntimeCompatibilityWithCurrentApi
Change-Id: I1ee7224b40fa3f4b744311eb4145fa13a87d835a
2022-11-11 12:22:55 +01:00
Chilun Huang
518b394962 Merge "Extand the long press duration" 2022-11-11 09:11:45 +00:00
Wei Sheng Shih
827093037e Merge "Generalize back animation and transition sequence..." 2022-11-11 06:42:49 +00:00
wilsonshih
da90308633 Generalize back animation and transition sequence...
for both shell and legacy transition system.

The general sequence will be:
1. Create animation leash in core, pass to remote animation runner.
2. Remote animation finish, collect finish transaction before
transition happen. Apply finish transaction here if back event won't
trigger.
3. Check whether next transition is triggered from back gesture via
checking the open/close targets.

The 3rd step introduce another change, which to let the back transition
happen. Instead of consume next transition, we should try to find out
whether the participant was the animation target, because we cannot
assume what the opening target will do in resume stage. For example,
the opening activity could finish itself, or start another activity at
onResume, so in either case, the opening activity will become closing
activity. We can only ensure that activity will participant in next
transition.
So the more robust way should be, find out those targets which were
animated. For shell transition, and add a flag to the corresponding
change, then the transition handler can determine what to do based on
the targets. For legacy transition, ignore those targets when estimate
the transition type in AppTransitionController#getTransitCompatType.

Bug: 238474994
Bug: 131727607
Test: varify transition can be handled for some unexpected scenario:
  1. launch new activity when close app.
  2. launch singleInstance activity when close app.
Test: do back gesture on both shell/legacy transiton system, verify
no flicker happen whenever the back is triggered.

Change-Id: I9364be25c608f7b5797577d26b57bc7d6f2dde9c
2022-11-11 03:11:22 +00:00
Jorge Gil
5a95db047e Add WCT#setDragResizing to optimize fluid resizing
Allows WM Shell to indicate the start/end of drag resizing, which
core can use as a signal to reuse a single (larger) surface size
for the entire drag resize operation to avoid continuous buffer
allocations after each size change.

Bug: 249808500
Test: drag resize a freeform window, verify WindowLayout requests
a fullscreen sized surface; atest TaskPositionerTest

Change-Id: I27e2b44270d7ea4f701fa8037f93b20dc691284b
2022-11-11 00:48:49 +00:00
Evan Rosky
cc23c1824d Revert^4 "Enable Shell Transitions"
324b674209

Change-Id: Iff47a8ee6bc971435dbc7acad0dbf790ef9b822a
2022-11-10 21:14:48 +00:00
Cosmin Băieș
1619482379 Revert^2 "Input latency & reliability tracking"
1f4fd2d21e

Change-Id: I096456e9cd7449836b373ff392f2e9df58b3e661
2022-11-10 17:53:07 +01:00
Pascal Mütschard
581fdec050 Merge changes from topic "revert-20313761-IME tracking - hide-HZXGDCCPOZ"
* changes:
  Revert "Input latency & reliability tracking"
  Revert "Input latency & reliability tracking - hide flow"
2022-11-10 13:22:35 +00:00
Pascal Mütschard
1f4fd2d21e Revert "Input latency & reliability tracking"
Revert submission 20313761-IME tracking - hide

Bug: b/258637227
Reason for revert: Breaks CtsSystemApiSignatureTestCases android.signature.cts.api.system.SignatureTest#testRuntimeCompatibilityWithCurrentApi
Reverted Changes:
Icf9ab3fc0:Input latency & reliability tracking - hide flow
I1096564d5:Input latency & reliability tracking - hide flow
I14e009250:Input latency & reliability tracking - hide flow
Ic32e36b2d:Input latency & reliability tracking
I56f96dc6b:Input latency & reliability tracking
I73dec2e9e:Input latency & reliability tracking

Change-Id: Ia376a1624fb6abf937eb2a335aa75cb3ca9831d8
2022-11-10 13:11:27 +00:00
Pascal Mütschard
d638a60aae Revert "Input latency & reliability tracking - hide flow"
Revert submission 20313761-IME tracking - hide

Bug: b/258637227
Reason for revert: Breaks CtsSystemApiSignatureTestCases android.signature.cts.api.system.SignatureTest#testRuntimeCompatibilityWithCurrentApi
Reverted Changes:
Icf9ab3fc0:Input latency & reliability tracking - hide flow
I1096564d5:Input latency & reliability tracking - hide flow
I14e009250:Input latency & reliability tracking - hide flow
Ic32e36b2d:Input latency & reliability tracking
I56f96dc6b:Input latency & reliability tracking
I73dec2e9e:Input latency & reliability tracking

Change-Id: I0d0ce41e3a4f0d19ff482c2f5ab4884b5f758134
2022-11-10 13:11:27 +00:00
Cosmin Băieș
36d3884041 Merge changes from topics "IME tracking - hide", "IME tracking"
* changes:
  Input latency & reliability tracking - hide flow
  Input latency & reliability tracking
2022-11-10 10:19:00 +00:00
Chilun Huang
8dc06e5335 Extand the long press duration
Align the long press duration to AutomationUtils.

Bug: 257099231
Test: atest WMShellFlickerTests:CopyContentInSplit
Change-Id: Ic54df7aa6b0d9236728285dffea7012487ac33df
2022-11-10 16:26:56 +08:00
Ats Jenk
4383e8e45a Move home task behind visible task
When switching to desktop mode, move home task behind visible task(s).
This ensures that only the visible task is shown at first on the
desktop.

Bug: 258282673
Test: atest DesktopModeControllerTest
Change-Id: I1d593900789846d8389decaddbaf92eb4a1d6e87
2022-11-09 17:00:12 -08:00
Ats Jenk
fc55874607 Move desktop mode logic out of ShellTaskOrganizer
Expose list of running tasks per display from ShellTaskOrganizer.
This allows us to move desktop mode related logic out from
ShellTaskOrganizer and to DesktopModeController.

Bug: 258282673
Test: atest DesktopModeControllerTest ShellTaskOrganizerTests
Change-Id: I179c69c185153a07de3602627ed18734420abda2
2022-11-09 16:33:49 -08:00