Commit Graph

4216 Commits

Author SHA1 Message Date
Treehugger Robot
5e6588a9d7 Merge "Add xutan@ to WM shell owner" am: 584338ea98
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2162828

Change-Id: I20464ffc59deca0f0a3d6657703432a23b75e2ce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-22 00:55:49 +00:00
Garfield Tan
e8cc6e7197 Add xutan@ to WM shell owner
Also move the resource owners to the new OWNERS file from the OWNERS
file one level of folder above.

Bug: None
Test: None
Change-Id: I81b3eeff0cf565482772023243652a949cfbcd1f
2022-07-21 14:46:27 -07:00
Issei Suzuki
a49c0207fa Pass keyguard occluded status in onAnimationCancelled.
Test: No visible changes yet. Pass existing tests.
Bug: 235463625
Change-Id: Iabee71bc76e19f20702f8a2739f565aa915f9b52
Merged-In: Iabee71bc76e19f20702f8a2739f565aa915f9b52
(cherry picked from commit c77d9bda04)
Merged-In: Iabee71bc76e19f20702f8a2739f565aa915f9b52
2022-06-30 02:24:07 +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
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
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
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
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
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
Shan Huang
a671783048 Merge "Fix NPE from BackAnimationController#setBackToLauncherCallback." into tm-dev 2022-06-08 16:00:26 +00:00
Shan Huang
9c0996d3c1 Fix NPE from BackAnimationController#setBackToLauncherCallback.
Bug: 235198537
Test: atest BackAnimationControllerTest
Change-Id: Ibb0e85ab3cb62cc4d1ab1a2da5e6f4b2a5d9e90f
2022-06-07 19:07:47 -07:00
TreeHugger Robot
72881bc3c3 Merge "Import translations. DO NOT MERGE ANYWHERE" into stage-aosp-master 2022-06-06 18:41:56 +00:00
Bill Yi
49a11012ca Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I8201298e6ba3845462fca53c134c749ab1440def
2022-06-05 18:25:40 -07:00
Bill Yi
42f9b8648d Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ifb9295bcf48fd1ae9e83f1786b74152f958161f4
2022-06-05 18:24:11 -07:00
Hongwei Wang
6683426dbf Remove conflict window crop
We actually do not need to crop the snapshot re-parented to the leash
since it's bound to the Task's bounds.

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/eh7phISItWvnhSoZz8GKh8
Bug: 234642410
Test: Enter content-pip from content away from the top, see video
Change-Id: I43c1ed6088d1be15b87326fb4f0cf459956a7c00
2022-06-02 19:19:07 +00:00
TreeHugger Robot
0d76e95c65 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-dev 2022-06-02 06:41:59 +00:00
Chavi Weingarten
d72491683d Merge "Release SC when RootTaskDA is no longer organized" into tm-dev 2022-06-01 14:48:21 +00:00
chaviw
08a48506b0 Release SC when RootTaskDA is no longer organized
WM Shell receives a leash for the DA that it wants to organize. However,
it's not releasing the SC when it receives a vanished callback. This
causes the SC to leak every time a new RootTaskDA is organized and then
vanishes.

Test: Add and remove simulated displays. Ensure no leaks
Bug: 231752353
Change-Id: I181695f4bae65ccc0cd25e1b5480e33307e7834d
2022-05-31 16:48:31 -05:00
Bill Yi
e09c246286 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I90cc45d81a2f903bfe2b6e933ed47bd94a1b3aa4
2022-05-31 14:10:12 -07:00
Hongwei Wang
eb700c0090 Merge "Validate content overlay before removal" into tm-dev 2022-05-31 19:24:48 +00:00
Mady Mellor
91d28d1b21 Merge "Fix the pointer position when displayed in RTL" into tm-dev 2022-05-31 15:10:09 +00:00
Hongwei Wang
4c4b7ef959 Validate content overlay before removal
Bug: 234158920
Test: atest --iteration 20 --no-bazel-mode \
        PinnedStackTests#testLaunchTaskByAffinityMatchSingleTask
Change-Id: I1ed848fcd742443a23ecaa17ba6b4fb8cdb061e2
2022-05-31 10:40:53 +00:00
Hongwei Wang
83979ad7b7 Merge "Fix the animation position when launch into PiP" into tm-dev 2022-05-28 06:14:33 +00:00
Hongwei Wang
15d8ea3a9b Fix the animation position when launch into PiP
When attach the task snapshot to the leash of newly created Task, move
its position to the new Task's coordinates and apply the crop with scale
in mind (snapshot is scaled to its task size).

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/d72OCvyYh0G0Z6YrEwyXMp
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/eacts7tgSeN28R3BWpXAem
Bug: 232984253
Test: launch into PiP with source rect hint middle of screen, \
      see also the video
Change-Id: Ib79e75d7e6f6f667e50db197d5377b87cffc714d
2022-05-27 13:55:19 -07:00
TreeHugger Robot
e4f90a01f3 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-dev 2022-05-27 16:45:14 +00:00
Bill Yi
fcea095afe Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ic7aca29d4541865b6459ab3cbe2e4f9a0709b156
2022-05-26 20:04:30 -07:00
Mady Mellor
fed87296db Fix the pointer position when displayed in RTL
When displaying in RTL, the pointer translates from the opposite
side of the screen than the code assumes. This CL changes the math
for the pointer position when displaying in RTL.

Test: manual - test landscape / portrait on tablet / phone in LTR
               and RTL: have a couple of bubbles, expand the stack
               and select each bubble ensuring that the pointer is
               centered on the selection.
Bug: 230579507
Bug: 233950592
Change-Id: I71a6f64a43c1b7bb5e0a30773d4cc5ae55c63b6a
Merged-In: I71a6f64a43c1b7bb5e0a30773d4cc5ae55c63b6a
2022-05-27 00:43:58 +00:00
Hongwei Wang
aaf3915bfd Ensure content-overlay is removed on app re-launch
When app is re-launched, WM shell enters the exitPip process and within
which we should ensure any content-overlay attached to the on-going
animator is removed.

Bug: 232439933
Test: re-launch app immediately after app explictly calls enterPip
Change-Id: I17a204378c75d2442db588a1fa8cc2917f00b3f4
2022-05-26 10:53:38 -07:00
TreeHugger Robot
442dbd14ff Merge "Remove lingering content overlays in onTaskVanished" into tm-dev 2022-05-26 13:19:31 +00:00
Jorge Gil
15adfe3917 Merge "Allow overridding the exitPip destination bounds" into tm-dev 2022-05-26 06:47:25 +00:00
Hongwei Wang
a143492a2b Merge "Use snapshot in enter content-pip animation" into tm-dev 2022-05-26 06:26:34 +00:00
jorgegil@google.com
27e49907f9 Allow overridding the exitPip destination bounds
Allows vendors to choose to restore to bounds other than the display
bounds on exit PIP. This is specially useful in freeform enabled
desktops where the previous windowing mode was freeform and PIP should
return to its original freeform bounds.

Bug: 225294296
Test: atest PinnedStackTests
Merged-In: Id25906c4b11e5f3c8351ba96cff80c63a6a5cf4e
Change-Id: Id25906c4b11e5f3c8351ba96cff80c63a6a5cf4e
(cherry picked from commit 2a68fc0b1a)
2022-05-25 22:53:43 +00:00
jorgegil@google.com
8a35943e5f Remove lingering content overlays in onTaskVanished
onTaskVanished already attempted to do some last resort overlay
cleanup, but because onExitPipFinished was called right above it, and
it internally set the state=UNDEFINED, the overlay removal in
onTaskVanished was always a no-op.
This change changes the order of onExitPipFinished and the animator
cancelling/overlay removal so that there is always an attempt to do
the removal in on vanish.
There should be no risk with this change that the removal is done twice
since even if the overlay is removed by an animator in onAnimationEnd,
the removal in onTaskVanished first checks that an animator exists and
that a content overlay exists, and one or both of those should cause
it to no-op if someone else removed the content overlay earlier.

Bug: 230561935
Test: enter MS teams call, swipe edge to go back, verify there's no
fullscreen overlay lingering.
Test: atest --iteration 5 \
      ActivityThreadTest#testHandlePictureInPictureRequested_overriddenToEnter \
      ScreenshotTests#testScreenshotSecureLayers \
      TaskStackChangedListenerTest#testTaskChangeCallBacks

Change-Id: If8639ce78148c5ba1b247bb8afeee76e20863dc5
2022-05-25 15:15:00 -07:00
Hongwei Wang
fe5078f026 Use snapshot in enter content-pip animation
When entering content-pip
- We take a snapshot for the host task within the
  ActivityStarter#startActivityInner function, this is to make sure that
  the snapshot is taken before an app switches to the placeholder content
- We retrieve the snapshot in WM Shell when animating the newly created
  content-pip task, and use that snapshot during the animation
- This works similar to the solid color content overlay when app enters
  PiP without specifying a valid source rect hint. Therefore, we
  abstract the functionality to a dedicated PipContentOverlay class

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dRSTf7prHc0krPhTKZ0kXx
Bug: 220191201
Test: enter content-pip from ApiDemos app, see also Video
Change-Id: I2420402341a910b44bd8f64e3ad518ebef41bc19
2022-05-25 14:35:25 -07:00
Bill Yi
112906ba38 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-dev 2022-05-25 18:43:37 +00:00
Mateusz Cicheński
1f9afd727a Merge "Check for null mLeash before setting alpha." into tm-dev 2022-05-25 16:35:38 +00:00
Tony Huang
a876e7b2d0 Merge "Fix NPE if draging again while animating" into tm-dev 2022-05-25 06:53:54 +00:00
Bill Yi
24b4bb88a2 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I610113ca759dd1aad53e80caef580e110460b5df
2022-05-24 15:38:44 -07:00
Mateusz Cicheński
52fe8ddf2e Check for null mLeash before setting alpha.
There were few reports in the bug for this to not always be set.
Based on the stack trace it is related to Keyguard showing/hiding,
but I was unable to repro locally the issue.

Adding a safety check to prevent this from occuring with proto log if it happens.

Bug: 233129957
Test: n/a, unable to repro, fix based on the stack trace
Change-Id: Ie45e557601fe52da6003790446b18aad2db681e5
2022-05-24 19:33:40 +00:00
Mady Mellor
772f09fe07 Merge changes I282ed7eb,I4e9ca9ed into tm-dev
* changes:
  Fix a padding issue for bubble user education in RTL
  Fix position of bubble education views on large screen in RTL
2022-05-24 15:14:43 +00:00
Tony Huang
2641f715ce Fix NPE if draging again while animating
The animator cancel calling might cause surfaces released by our
implementation. Moving the cancel call before we make sure surface
is not null.

Fix: 230686609
Fix: 233159027
Test: Open animation scale setting and try drop then drag again
      divider quickly
Test: pass exising tests
Change-Id: I2e94f3ece3f211ceb15f380e4ee9322b8c27f8ac
Merged-In: I2e94f3ece3f211ceb15f380e4ee9322b8c27f8ac
(cherry picked from commit 99866c56ad)
2022-05-24 08:08:53 +00:00
Shawn Lin
15cb562bcd Merge "Replace DisplayManager.getStableDisplaySize with max Display.Mode" into tm-dev 2022-05-24 02:30:28 +00:00
Mady Mellor
68559c1680 Merge "Fix an issue where the start position of the stack is wrong in RTL" into tm-dev 2022-05-24 00:29:34 +00:00
Mady Mellor
3b27222780 Fix a padding issue for bubble user education in RTL
The education view is placed on the right hand side of the screen
so the padding calculation to align the manage button in the education
view with the real manage button is slightly different.

Bug: 230579507
Test: manual - force education for bubbles to show, set RTL language,
               open up stack and look at manage button education
Change-Id: I282ed7eb2014d5d1a6d2b428572e495ce0d77c78
2022-05-23 20:01:27 +00:00
Mady Mellor
d3f19bcb77 Fix position of bubble education views on large screen in RTL
In large screen or landscape, the width of the education view is not
full width, so we need to position it on the edge of the screen
when in RTL. It naturally does this in LTR.

Bug: 233408508
Test: force user education to show for bubbles, check how it appears
     in RTL & LTR on: large screen portrait & landscape, and portait
     and landscape on phone.
Change-Id: I4e9ca9ed3d59ecaab3d6522961acf190f6a54850
2022-05-23 20:01:18 +00:00
Vadim Caen
451dc8a3d3 Merge "DO NOT MERGE Only rely on developer option for back animation" into tm-dev 2022-05-23 19:05:48 +00:00
Treehugger Robot
4703c2895f Merge "Add a config to control split-screen task dimming" am: f012e83299
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2062848

Change-Id: I307cdd5926e98bf3ad8e56eb67e2c00b3a95af7c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 12:05:08 +00:00
Vadim Caen
ab58191c7f DO NOT MERGE Only rely on developer option for back animation
BackNavigationController was still relying on a debug setting. Now the
animation request is handled via a boolean parameter passed by sysui,
which has access to the developer option.

Test: Existing test modified
Bug: 231502692
Change-Id: Icda4692e05396407d961610de0ce709492adadc1
Merged-In: Icda4692e05396407d961610de0ce709492adadc1
2022-05-23 10:43:04 +00:00