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
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
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
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
This fixes an issue in gesture nav, when the swipe would not be properly recognized.
Test: atest WMShellFlickerTests:EnterPipOnUserLeaveHintTest
Bug: 234848637
Change-Id: I011cd3a83531f48939d4ac4d7686e0f142b2766b
Adds real unfold animation for split-screen tasks when
doing the Shell unfold transition.
The approach is similar to full-screen tasks:
we animate the surfaces using shell transition
only when unfolding, when folding we are doing
it in the old way (by directly accessing
the surfaces from TaskOrganizer).
Refactored the previous fullscreen/splitscreen unfold
controllers flow to have one controller where we can
register diferrent 'animators'. This controller listens
to all task events in the shell task organizer.
Bug: 204925795
Test: folding/unfolding, rotating with a split layout
when Shell transitions enabled/disabled,
rotating display when folded/unfolded
Change-Id: Iff608bc8ab2390a57b01de8f07bad681c979be49
Revert "Update TaskListener constructors to match the upstream"
Revert submission 18628270-unfold-shell-p3
Reason for revert: b/235090315
Reverted Changes:
Ibe684471a:Migrate unfold animation to Shell transitions [Par...
I7bd398c96:Update TaskListener constructors to match the upst...
I7bd398c96:Migrate unfold animation to Shell transitions [Par...
Bug: 235090315
Change-Id: I8639d618131c09f7a5f0c776fb02c426b78b1fdd
Add setBackgroundAlpha and use that to change the alpha of the
expanded view background and pointer.
Test: manual - have a bunch of bubbles, expand them, dismiss the
selected one
=> verify that the arrow is visible for the next bubble
- turn on home animation, swipe up to collapse a bubble
=> verify pointer looks fine
Bug: 234739591
Change-Id: If5823840d148e2031312c54eba9c0132b8aa3a4c
There are apps using alias activity name, result to wm-shell not able to
determine whether it's launching the same component or not. Update to
check the component name in the intent that created the task instead to
prevent affected by alias component name.
Fix: 224901460
Fix: 234304765
Fix: 233922245
Fix: 233174334
Fix: 232034346
Test: atest WMShellUnitTests
Test: manual check drag to launch multi-instance or drag to switch
split position with reported apps work
Change-Id: I924120134bb3ce6abe582251e3afdc7a0825a6a5
Because ag/18529596 change the drop position, the test need to modify
the expected position of the app.
Bug: 232878493
Test: atest EnterSplitScreenByDragFromAllApps
Change-Id: Ib4823a899aa42ab2c0b23f9e654cbf13becb02bd
Adds real unfold animation for split-screen tasks when
doing the Shell unfold transition.
The approach is similar to full-screen tasks:
we animate the surfaces using shell transition
only when unfolding, when folding we are doing
it in the old way (by directly accessing
the surfaces from TaskOrganizer).
Refactored the previous fullscreen/splitscreen unfold
controllers flow to have one controller where we can
register diferrent 'animators'. This controller listens
to all task events in the shell task organizer.
Bug: 204925795
Test: folding/unfolding, rotating with a split layout
when Shell transitions enabled/disabled,
rotating display when folded/unfolded
Change-Id: I7bd398c963125ceb7c8f8e3786a274853366feb3
The algorithm computes a new position for PiP based on the registered
keep clear areas within the system. If no occlusion happens the original
position is being returned. Otherwise, the bounds are moved in one of the
available directions so that none of the keep clear areas are occluded
while keeping PiP within the display bounds.
Test: atest PipKeepClearAlgorithmTest
Bug: 183746978
Change-Id: Ic2d11861329a46e2da0448f90283f67f6e7125d7
Add more assertions for layers become visible.
Bug: 232878493
Test: atest EnterSplitScreenByDragFromAllApps
Change-Id: Ida948525b618b800915813cf2927523600e23724
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
Create the base split screen flicker test and the CUJ of entering split
by dragging from all apps.
Bug: 231399426
Bug: 232878493
Test: atest EnterSplitScreenByDragFromAllApps
Change-Id: Ic684474457f5da28554ff801f3e03d585e8db9fb
- I had accidentally swapped the values in removeBubblesForUser
in one place which could lead to a crash, it's actually simpler
to just do the removal there since it's the parentUser that was
removed so we can remove all of those entries.
- In other places I've added a null check before performing the
removeIf to be safe
- Added a test checking bad input
Bug: 232847471
Test: atest BubbleVolatileRepositoryTest
Change-Id: I10f5b24e591db62edbb63ad40e588ba19ab621c1
- Update the NotificationLockscreenUserManager code to listen for
account removals and notify the new listener method onUserRemoved
- Use this to trigger removals in the bubble data repository / UI
Some users may have a parent user (e.g. work profile can belong to
a parent user). We store persisted bubbles under the parent user and
have a separate field for the specific bubble user. To support this,
I pass the parent of the removed user.
Test: atest BubbleVolatileRepositoryTest BubbleDataTest
Bug: 218525763
Change-Id: Ia147cbac15ebce70bbbcc52926089f33901a99dc
Merged-In: Ia147cbac15ebce70bbbcc52926089f33901a99dc
* Remove existing coloured background.
* Add a background with a layout that includes a
badged icon of the app being opened.
Manual testing steps:
* Set up device with a work profile using TestDPC
* Set a fingerprint in the work profile
* Open a work app
* Lock the device
* Verify the background protection is shown behind
the biometric prompt
Screenshots:
* Dark mode: https://screenshot.googleplex.com/3SwGWrBREYoZFaH
* Light mode: https://screenshot.googleplex.com/8bzX9wLoFGJ2ado
Bug: 206761107
Test: Manual testing
WorkLockActivityControllerTest
TaskStackListenerImplTest
Change-Id: I90d117a97d7457a3186953c16db8bd0bbac048ed
The bug is caused by allowing a second swipe to restart animation in
BackAnimationController. This CL adds a flag to reject incoming gestures
when an uninterruptable transition (e.g. commit transition, cancel
transition) is already in progress.
To prevent an unfinished transition from failing all future swipes, this CL also introduces a timeout mechanism to start accepting gesture again after a fixed period.
Bug: 221394367
Test: Do two quick consecutive swipes and observe the back to home
animation.
Merged-In: Ib969afb72cc15bd268613546f3495008b6bc9125
Change-Id: Ib969afb72cc15bd268613546f3495008b6bc9125
If there was a deferred info, that means PiP params was saved but not
applied earlier. Force apply it.
Bug: 232104080
Test: Double tap on YouTube after exiting earlier Map PiP, aspect ratio
is correct
Change-Id: I52e9f38d4a923fdfee06e7ff37eb61a599caba04