Commit Graph

4487 Commits

Author SHA1 Message Date
Issei Suzuki
d5fec58feb Merge "Pass keyguard occluded status in onAnimationCancelled." into tm-qpr-dev 2022-06-28 17:24:33 +00:00
Hongwei Wang
955ef1849f Merge "Polish enter PiP animation on back pressed" into tm-qpr-dev 2022-06-28 16:40:20 +00:00
Evan Rosky
513bde42a0 Fix issues with early-finish
There were a couple of situations where both cancel and finish
collided. In those cases make sure only one is called.

Somewhat related, launcher actually continues to use leashes
even after calling the finishCallback. Since we make leashes
for launcher anyways, just use launcher's existing leash
clean-up logic.

Bug: 235616350
Test: run/monitor wm presubmits.
      Try launching and closing apps in rapid succession.
Change-Id: I7553ba9f9bbad052632a4d8d5a7225ab6c3dbce5
2022-06-27 16:23:01 -07:00
Hongwei Wang
ab392150d4 Polish enter PiP animation on back pressed
The PipTransitionAnimation#ofBounds is used when entering PiP on back pressed.
- Adjust the scale based on current animation progress
- Alter the auto-enter-pip animation running in Launcher to use the same
  mechanism
- Update the ofBounds animation to ignore small source rect hint,
  similar to what's in auto-enter-pip animation running in Launcher

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dv35ov6nK2Mrr98DGkLNaE
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/gm8Kl7N3NPIoWoDKyDfd5s
Bug: 235268241
Test: Verify enter PiP animation on back pressed with YouTube in \
      both folded and unfolded state. See also videos.
Change-Id: I6043cff31eed7b63087ea03b17ced7549c89e4fb
2022-06-27 15:47:56 -07:00
Evan Rosky
633202b4e1 Merge "Post view-drawing so that it happens after applying start transaction" into tm-qpr-dev 2022-06-27 14:58:14 +00:00
Galia Peycheva
34188c83d2 Merge "Remove SplashScreen animations on TV" into tm-dev am: 07943a5b9b am: d7f43c22b9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18601924

Change-Id: I1436e2e268efb7f0f17b5d9fd50ee57f6e63c606
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-27 12:50:26 +00:00
Galia Peycheva
d7f43c22b9 Merge "Remove SplashScreen animations on TV" into tm-dev am: 07943a5b9b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18601924

Change-Id: I5aeffda29e08f4dfa88ea7a27b5cb0a7b2755efa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-27 12:34:20 +00:00
Galia Peycheva
07943a5b9b Merge "Remove SplashScreen animations on TV" into tm-dev 2022-06-27 12:19:51 +00:00
Issei Suzuki
a60723b1c8 Pass keyguard occluded status in onAnimationCancelled.
Test: No visible changes yet. Pass existing tests.
Bug: 235463625
Change-Id: Iabee71bc76e19f20702f8a2739f565aa915f9b52
Merged-In: Iabee71bc76e19f20702f8a2739f565aa915f9b52
2022-06-25 01:36:07 +00:00
Evan Rosky
c80650936a Post view-drawing so that it happens after applying start transaction
These views were drawing before the transition startTransaction is
applied. This can cause deadlocks if there aren't enough buffers
and the view blocks the thread since applying the transaction is
what frees-up the buffers.

Bug: 233625646
Test: run tests and check for fewer ANRs
Change-Id: I7d592fe186695cdcde040d4ec315e656e05354e5
2022-06-24 10:40:57 -07:00
Massimo Carli
8a1e0cf16e Merge "Updates SCM restart button tooltip" into tm-qpr-dev 2022-06-24 11:32:00 +00:00
Tiger Huang
cf1e9e2682 Merge "Revert "Introduce updateVisibility and updateLayout"" into tm-qpr-dev 2022-06-24 03:23:21 +00:00
Massimo Carli
b049859794 Updates SCM restart button tooltip
Test: Manual test
Fix: 235469084

Change-Id: I05079bfe1f7015020d21fca1d6978743a954169a
2022-06-23 17:30:30 +00:00
Evan Rosky
dfbcd379bb Merge "End transitions when receiving merge request" into tm-qpr-dev 2022-06-23 16:59:27 +00:00
Tiger Huang
228988d5e7 Merge "Send the attached frame to the client" into tm-qpr-dev 2022-06-23 06:11:07 +00:00
Hongwei Wang
3d29930505 Merge "Get PiP state from Shell in EdgeBackGestureHandler" into tm-qpr-dev 2022-06-22 16:56:57 +00:00
Tiger Huang
20eb3c91db Revert "Introduce updateVisibility and updateLayout"
This reverts commit:
db407ef12d, and
d8aa7f7882.

Reason for revert:
The surface size would be reduced by mTranslator unexpectedly.

Fix: 233017734
Test: Open a legacy app which has CompatibilityInfo.SCALING_REQUIRED
      and see if the app is cropped.
Change-Id: If830866328a5709cf6856fe840a804b304052003
2022-06-22 21:41:18 +08:00
Hongwei Wang
e9e4ca3ecd Get PiP state from Shell in EdgeBackGestureHandler
We use to rely on the onActivityPinned and onActivityUnpinned callbacks
from Window Manager in EdgeBackGestureHandler to determine the current
PiP state and it will always be reset to false when
EdgeBackGestureHandler is being re-created, for instance, as a result of
folded state change.

Deprecated also the Pip#setPinnedStackAnimationListener interface method
since it's not in use and it may cause confusions over
IPip#setPinnedStackAnimationListener.

Bug: 174702196
Bug: 198651351
Test: stash in unfolded state -> fold -> drag to unstash \
      stash in folded state -> unfold -> drag to unstash
Test: atest WMShellUnitTests:PipControllerTest
Change-Id: Id874056415011ee8a55dadcd4ec6af6e1b568092
2022-06-21 18:19:10 -07:00
Evan Rosky
f0ff75fd24 End transitions when receiving merge request
The default behavior (if nothing is done) for a merge request
is to let the animation continue and queue up the incoming animation
to start once the current one has finished.

This is maybe the "smoothest" default; however, it is not
responsive for the user. So, instead, go through and, where
appropriate, make animations "jump-to-end" when they receive
a merge request. This way the user will see the new animation
start immediately after they perform an action. There is
technically a "jump" in the animation, but it seems like the
responsiveness is preferable and the jumps aren't super
noticable anyways. This is also how legacy transitions works
so it's not a behavior change.

Bug: 236309064
Test: interrupt animations with other transitions and observe.
      Example: launch an app and then go "back" before it finishes
      animating.
Change-Id: I4a76e7efe2c610b22f3fe97b0bd3ab692a01be08
2022-06-21 15:19:52 -07:00
Shan Huang
a79aed78d5 Merge "Pass the values of the MotionEvent instead of the event instance itself to BackAnimation." into tm-dev am: 1deb1af4a7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18963576

Change-Id: I24f8b034e3bfdc15493c8f2a2716985fddc4deab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-21 18:34:51 +00:00
Shan Huang
1deb1af4a7 Merge "Pass the values of the MotionEvent instead of the event instance itself to BackAnimation." into tm-dev 2022-06-21 18:13:38 +00:00
Shan Huang
1ab6263c4d Merge "Pass the values of the MotionEvent instead of the event instance itself to BackAnimation." into tm-qpr-dev 2022-06-21 15:54:21 +00:00
Tiger Huang
157514510f Send the attached frame to the client
The attached frame is the frame of the parent window that its child
attaches to, as long as the child is not
TYPE_APPLICATION_ATTACHED_DIALOG. It is a factor while computing the
window frame.

Previously, we let the child obtain the attached frame from its parent
view root. However, if the parent and the child are not in the same
process, it can be tricky.

This CL sends the attached frame from the server to the client via
ClientWindowFrames. In this way, the child can compute its window frame
without having to accessing the parent view root.

Bug: 161810301
Bug: 175861127
Test: atest ActivityRecordTests WindowLayoutTests
Change-Id: Ia844a4c927027e305a56114216eaee2bf7933b1f
2022-06-20 21:09:40 +08:00
Tony Huang
a7ce4cadfb Merge "Implement double tap switch animation" into tm-qpr-dev 2022-06-20 09:15:51 +00:00
Bill Yi
e341973241 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I73ec996407ce92fe58774b86520ebe5f5cac1440
2022-06-19 00:18:55 -07:00
Shan Huang
f89eb1e5b5 Pass the values of the MotionEvent instead of the event instance itself
to BackAnimation.

The original MotionEvent instance may have been recycled by the time BackAnimation processes it, since BackAnimation runs in a different thread. This could cause crashes from both Java side and native side, as described in b/233163975#comment11.

We work around this by passing the numerical values that BackAnimation
need instead of the MotionEvent itself.

Test: Swipe back in various scenarios. Make sure back can be triggered.
Try cancel. Make sure back can be cancelled.
Test: atest BackAnimationControllerTest
Bug: 233163975

Change-Id: I4792debc705536b49d1caafcc43e5466941c1d43
2022-06-18 03:39:53 +00:00
Shan Huang
db78c194d8 Pass the values of the MotionEvent instead of the event instance itself
to BackAnimation.

The original MotionEvent instance may have been recycled by the time BackAnimation processes it, since BackAnimation runs in a different thread. This could cause crashes from both Java side and native side, as described in b/233163975#comment11.

We work around this by passing the numerical values that BackAnimation
need instead of the MotionEvent itself.

Test: Swipe back in various scenarios. Make sure back can be triggered.
Try cancel. Make sure back can be cancelled.
Test: atest BackAnimationControllerTest
Bug: 233163975

Change-Id: I4792debc705536b49d1caafcc43e5466941c1d43
Merged-In: I4792debc705536b49d1caafcc43e5466941c1d43
2022-06-17 21:18:55 +00:00
Tony Huang
c77c19c4c6 Implement double tap switch animation
Bug: 231496272
Test: manual
Test: pass existing tests
Change-Id: Ib228378b623e7895b1a9d643ea32facfcbe3e56b
2022-06-16 15:43:42 +08:00
Jeff Chang
7a499f6ca7 Merge "Update context object if split bounds changed" into tm-d1-dev am: bceb4a9e7d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18881887

Change-Id: I5a49f69e880c025b324e8afc37f0fe40294ee823
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-16 05:51:39 +00:00
Hongwei Wang
d6579ac1b7 Merge "Avoid conflict surface reset on auto-enter-pip" into tm-qpr-dev 2022-06-15 16:55:41 +00:00
Sergey Serokurov
86d2469d1e Merge "Do not update pointer postion when stack is going to collapse" into tm-qpr-dev 2022-06-15 16:51:46 +00:00
Jeff Chang
7a9206a080 Update context object if split bounds changed
The RRS(runtime resolution switching) feature which supports users to
change resolution directly. Split-screen did not update the Context
object during the runtime resolution switching. That results in the
split layout can not get the proper resource in time.

This CL updates the new Context object whose resources are adjusted to
match the new given Configuration when the split bound is different
from existing. That’make sure to get the updated resources objects
when calculating the divider snap target for this case.

Bug: 235044746
Test: atest MultiWindowTests
Change-Id: I94d1a95c6b4aeb3bf1b75aed2e0b3008f036c968
2022-06-15 13:56:24 +08:00
Hongwei Wang
56dcce9893 Avoid conflict surface reset on auto-enter-pip
This fix was introduced in ag/16150706 and recently got overridden with
ag/18751998, UnfoldAnimationController#resetTask happens in between
RecentsAnimationController cleanup and PipTaskOrganizer#onTaskAppeared
may cause flicker at the end of auto-enter-pip transition.

Fix it by intentionally ignore resetSurface if the task's pinned.

Bug: 235737615
Test: auto enter pip repeatedly on foldable
Test: atest WMShellUnitTests:UnfoldAnimationControllerTest
Change-Id: I5de034f5c0d3f150dd77aadb97c0d2b3f9c64c15
2022-06-14 17:07:50 -07:00
Mady Mellor
0334b06238 Merge "Fix an issue where tasks moving to front would collapse the stack." into tm-dev am: 13a28fff81 am: 668dddcd4f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18876919

Change-Id: I4e1075eb5a8e68621d43042382e8d82e97b9c954
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-14 16:52:52 +00:00
Winson Chung
7f371fabc8 Merge "Clear snapshot buffer preemptively if unused" into tm-dev am: 87b7e43b14 am: 1945aedc41
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18800614

Change-Id: Ic0e23837c7e560a3623ff108266bb7cb05f2b538
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-14 16:52:30 +00:00
Mady Mellor
668dddcd4f Merge "Fix an issue where tasks moving to front would collapse the stack." into tm-dev am: 13a28fff81
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18876919

Change-Id: I16c17f6e7faaab38dfc47d5157a5095a252879ae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-14 16:15:16 +00:00
Mady Mellor
13a28fff81 Merge "Fix an issue where tasks moving to front would collapse the stack." into tm-dev 2022-06-14 16:07:39 +00:00
Winson Chung
1945aedc41 Merge "Clear snapshot buffer preemptively if unused" into tm-dev am: 87b7e43b14
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18800614

Change-Id: I666cc9688530619fa8b5f71d2e4aa9e2e7c51aca
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-14 16:06:45 +00:00
Winson Chung
87b7e43b14 Merge "Clear snapshot buffer preemptively if unused" into tm-dev 2022-06-14 13:56:10 +00:00
Winson Chung
91800b7efb Clear snapshot buffer preemptively if unused
Bug: 235273016
Change-Id: Ib5105ee45905f0452ade47f90d0c090b0a4f9a84
2022-06-14 03:40:27 +00:00
Tony Huang
a41398efa7 Merge "Fix drag notification to split" into tm-qpr-dev 2022-06-14 02:49:09 +00:00
Jerry Chang
f416c3f945 Merge "Reduce jittering while dragging divider bar" into tm-dev am: 19885f1c74 am: 95c7363730
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18867591

Change-Id: Ice1e4602592fbebd0ab50ba8ee925d60c13b155a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-14 02:24:50 +00:00
Jerry Chang
95c7363730 Merge "Reduce jittering while dragging divider bar" into tm-dev am: 19885f1c74
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18867591

Change-Id: I2f32f16f3cceff5e86d19cadc779e5207f8363cb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-14 02:02:04 +00:00
Jerry Chang
19885f1c74 Merge "Reduce jittering while dragging divider bar" into tm-dev 2022-06-14 01:53:35 +00:00
Mady Mellor
b967adf753 Fix an issue where tasks moving to front would collapse the stack.
ag/18759417 introduced a new call to onTaskMovedToFront which impacted
some bubbles behavior, basically while switching bubbles the
"background" app now appears to move to the front for a moment which
causes bubbles to be collapsed. The fix is to flip the flag for
bubbles switching a bit sooner than we already do.

Test: manual - have some bubbles, visit each of them once (i.e. have
               the activity launched), then visit them all again
             => verify all the bubbles can be visited both times and
               the stack doesn't collapse.
Bug: 235781358
Change-Id: Id0674cafd92d5aeb802a0da77a679996e7041b74
2022-06-13 16:16:46 -07:00
Sergey Serokurov
bccc4c2cac Do not update pointer postion when stack is going to collapse
Bug: 232293580
Test: atest SystemUITests
Test: video at https://drive.google.com/file/d/1Yjs7AzTeI_Zp764CPF9d6e7zI-XRvYX4/view?usp=sharing
Change-Id: I3131a8f32e088573e8e4e8401b6cc279e73bef87
2022-06-13 09:45:40 -07:00
Jerry Chang
81d0e61a04 Reduce jittering while dragging divider bar
Set vsync id to transactions moving divider bar surface, so those
transactions won't be committed together and result to empty frame while
dragging the divider bar.

Bug: 230050092
Test: manual dump and verified with perfetto trace
Change-Id: Id570e80a908a07113b8e4bd77f38c05e3eee1d0c
2022-06-13 11:21:25 +00:00
Bill Yi
098855cd68 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I1c159a9ba275baff6e70fcdeb93914915bcbc989
2022-06-11 03:47:26 -07:00
Garfield Tan
8aaccc88e5 Merge "Fix a bug in maximize buttons in legacy captions" into tm-qpr-dev 2022-06-10 21:53:56 +00:00
Mateusz Cicheński
8c21721c18 Use tapl instrumentation to go home.
This fixes an issue in gesture nav, when the swipe would not be properly recognized.

Test: atest WMShellFlickerTests:EnterPipOnUserLeaveHintTest
Bug: 234848637

Change-Id: I011cd3a83531f48939d4ac4d7686e0f142b2766b
2022-06-09 22:04:13 +00:00