Commit Graph

4394 Commits

Author SHA1 Message Date
Hongwei Wang
df15d102f2 Merge "Remove conflict window crop" into tm-dev am: 3fa5b5332b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18717099

Change-Id: I1d8134349a56734765c59a82fd28ed642f45e319
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-03 03:14:45 +00: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
a073b9e7db Merge "Release SC when RootTaskDA is no longer organized" into tm-dev am: d72491683d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18681872

Change-Id: I1fd558173465e9505030680c5adccc9f370d0482
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 15:17:36 +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
692d578972 Merge "Validate content overlay before removal" into tm-dev am: eb700c0090
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18656364

Change-Id: I382ae78b519714df9e6adacebf2301dd4485ec27
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-31 19:50:13 +00:00
Hongwei Wang
eb700c0090 Merge "Validate content overlay before removal" into tm-dev 2022-05-31 19:24:48 +00:00
Mady Mellor
4d72d27c5c Merge "Fix the pointer position when displayed in RTL" into tm-dev am: 91d28d1b21
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18620988

Change-Id: Ia106d674a13276925cd00e655c6da83df3cdad98
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-31 15:14:23 +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
9736081c02 Merge "Fix the animation position when launch into PiP" into tm-dev am: 83979ad7b7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18637060

Change-Id: Id45105e8297a410e1bb0a9396478e78e016fa1ab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-28 06:39:58 +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
607b0e6ddb Merge "Ensure content-overlay is removed on app re-launch" into tm-dev am: 999a0666ac
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18618656

Change-Id: If8e1a967853cff6603bd69a61851a426bac9de43
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 22:33:13 +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
7f2efe4b55 Merge "Remove lingering content overlays in onTaskVanished" into tm-dev am: 442dbd14ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18604863

Change-Id: Ibc87b2654c588cb123126905d2171f0427a541a2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 15:09:40 +00:00
TreeHugger Robot
442dbd14ff Merge "Remove lingering content overlays in onTaskVanished" into tm-dev 2022-05-26 13:19:31 +00:00
Jorge Gil
26bc7abf5b Merge "Allow overridding the exitPip destination bounds" into tm-dev am: 15adfe3917
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18606671

Change-Id: I05bd8aa70d0bfe1480a57bfcceb33abaa235c386
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 07:36:09 +00:00
Hongwei Wang
f8c9684463 Merge "Use snapshot in enter content-pip animation" into tm-dev am: a143492a2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18501932

Change-Id: Ic0f5d56798a58a0d86594b534c8a69291e014d32
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 07:35:13 +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
dcd8c0e53e Merge "Check for null mLeash before setting alpha." into tm-dev am: 1f9afd727a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18585595

Change-Id: I52a1ced5b241c4b5236307333453b01591985b62
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 17:01:39 +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
199d05c914 Merge "Fix NPE if draging again while animating" into tm-dev am: a876e7b2d0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18570244

Change-Id: Id0d81889438bcf44e34184f074ca2749dc613c16
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 07:08:54 +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
04621462a3 Merge changes I282ed7eb,I4e9ca9ed into tm-dev am: 772f09fe07
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18563479

Change-Id: Ib8235836da91a35c23a1089d3b8b660914043ecc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 15:38:24 +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
f18a9fece2 Merge "Replace DisplayManager.getStableDisplaySize with max Display.Mode" into tm-dev am: 15cb562bcd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18485561

Change-Id: Ie42fd58945ef2b4d0490661a72db88c954fb1cb2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 02:49:04 +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
8fd36f4bd9 Merge "Fix an issue where the start position of the stack is wrong in RTL" into tm-dev am: 68559c1680
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18528569

Change-Id: I3770d2fa954f9c08b3b65e8ba8aa7012f03f6a99
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 00:58:37 +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
431e9f2f85 DO NOT MERGE Only rely on developer option for back animation am: ab58191c7f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18310267

Change-Id: Ida50d640b659dfbaa62fa68867faa15e9a17488a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 19:30:48 +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
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
Jacqueline Bronger
2063febed4 Merge "Add strings for TV PiP accessibility." into tm-dev am: 4a4c8c38a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18488305

Change-Id: Id82c6ba8030794233327922b5de04b66f8910b74
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-22 11:43:51 +00:00
Jacqueline Bronger
4a4c8c38a0 Merge "Add strings for TV PiP accessibility." into tm-dev 2022-05-22 11:30:16 +00:00