We were logging "isDesktopModeActive" each time it was called, spamming
logs. Removed it.
Each time visible task info was updated, we logged that an active task
was added, even if the task was already marked as active. Updated
logging to only log when task is first time added to active. Same with
removing from active tasks. Only logging when it is actually removed
from active tasks.
Bug: 244348395
Test: manual, updating logging, verified that the logs are printed
Change-Id: I55075c222763c6cb08f2d0e6770aed831b78a369
This is needed for android-auto where shell is actually in launcher
vs systemui.
Also have TaskViewTransitions use this information instead of checking
the flag so that it doesn't do anything in the process where it isn't
registered.
Bug: 255631687
Test: everything still works as expected
Change-Id: I61ad21575850f15fd821cc5c8239bf7246549936
There are cases not having enough task changes to enter split screen.
Update to support canceling the enter-transition by reparenting tasks
back to display.
Fix: 237635859
Bug: 250853925
Test: atest WMShellFlickerTests
Test: enable shell transition and verify the following behaviors
1. drag and drop Phone to enter split while Phone in front
2. select "split right" on Phone icon and Phone thumbnail in
recents to enter split
Change-Id: I0fe8dfc0c46a8b1f5ee70d85359d2078c263ac80
When switching between horizontal split and vertical split, it will
leave part of the screen empty. Show background color to cover that.
Also fix the leash start position.
Bug: 241043533
Bug: 254090083
Test: atest WmTests:TransitionTests#testChangeSetBackgroundColor
Test: verify with horizontal demo app
Change-Id: I125db07a631b19bd33bcff9935fe39f263cbb263
Remove the update listener once the animation has ended or has been
canceled to prevent further updates from trying to animate a surface
that has already been released.
This scenario can happend when mergeAnimation() manually runs end() on
animations that already finished but had not been removed yet. This may
happen because the removal of the animation is posted from the shell
anim thread to the shell main thread, so mergeAnimation() may win a race
and schedule another end() before the first end() removes the
animations.
Bug: 252872225
Test: boot, no shell.anim crash
Change-Id: I442f1152fba97c30ce425b08f1aa65bb94fb3bb4
Merged-In: I442f1152fba97c30ce425b08f1aa65bb94fb3bb4
When shell transitions were enabled, we were not exeucting the WCT that
brings desktop apps to front.
Ensure that this is called when shell transitions are enabled.
Bug: 254738174
Test: atest DesktopModeControllerTest
Change-Id: Ie8391867a1d89ecdab7cbd5afd8cd80ecdc5b78c
This CL introduces BackProgressAnimator which runs in app's main thread.
It receives target progress values from SysUI and drives the actual
progress value passed to the app with a high stiffness, no bounce
spring.
Bug: 238475284
Test: atest WindowOnBackDispatcherTest
Test: atest BackAnimationControllerTest
Test: atest TouchTrackerTest
Change-Id: Ib0d3ebe43929c405b10681000fb4e7ef8bccce34
- Adds DesktopModeTaskRepository to FreeformTaskListener to track
visible freeform tasks
- Adds a listener on DesktopModeController to allow sysui to find
out about freeform tasks becoming visible
- Adds a sysui state flag for freeform tasks being visible
Bug: 245569277
Test: manual - add freeform task => launcher contents are gone
- remove freeform task => launcher contents are visible
Test: WMShellTest DesktopModeTaskRepositoryTest
Change-Id: I2d717052678bc35a4c59b0bc03e0c4d22e6b103d
This CL does the following:
1. Fix misuses of mTaskInfo in CaptionWindowDecoration because it's the
old value at that time.
2. Reset RelayoutParams before using it so we don't pass old values.
3. Restore the test values by using the resources in test package so
that we don't need to change the test every time we change the
resources in prod.
4. Change loadResource() to loadDimension() and loadDimensionPixelSize()
to avoid confusion with other type of resources. Also make them
static just in case we need similar logic on other instances of
Resources.
5. Moved RelayoutParams closer to RelayoutResult.
It also cleans up some commented out code.
Bug: 254658472
Test: atest WindowDecorationTests
Change-Id: I6fa1b06351c388e3ca6985e76c889f4ec5506c38
When freeform tasks are visible and user attempts to go home, it
triggers a TRANSIT_OPEN transition with target as home screen.
Our current logic checks for TRANSIT_OPEN and brings all freeform apps
to front when this is detected.
Limit bringing freeform apps to front only if a freeform task launches.
Otherwise skip.
Bug: 254736507
Test: atest DesktopModeControllerTest
Change-Id: Ib1ec6449e5236d6e34efdad277fb35bfda7bd068
* Created TODO(b/254378592) to consolidate different
SplitBounds classes
Fixes: 250817893
Test: Checked phone/tablet swiping quickswitching
portrait and landscape
Change-Id: If5c55d10a0d21b7984442d01f306c2016eba3701
Add rounded corners to the caption bar and center back, handle and close
button images.
Test: visually verify the styling
Bug: 253705823
Change-Id: I5e0a4f03e9fb7b4ea079fcae3ce27ba33165eacc
- Remove some old code around bubbles in taskbar that is not currently
relevant
- Update some of that code to work for the prototype, namely set
a pinned location while the prototype is running and modify touch
handling behavior so that the stack remains pinned
Test: manual - turn on the flag and add a bubble on tablet
=> bubble is above the taskbar on the bottom right
=> dragging and releasing the bubble returns it back
to the same position
=> you can drag to dismiss when collapsed or expanded
Bug: 253318833
Bug: 173386799
Change-Id: I1a9530f98d908e19c5e65ffee9a87459a3e51c8c
Refactor the edge extension logic from DefaultTransitionHandler to the
helper class so that we can reuse it for ActivityEmbedding.
Bug: 207070762
Test: manually verify with Settings.
Merged-In: I6a89b549e7b117caae75ceba6df8f41f5c4d4a15
Change-Id: I6a89b549e7b117caae75ceba6df8f41f5c4d4a15
The collected WindowToken's (e.g. status bar, navigation bar)
isVisibleRequested may be changed according to its WindowState's
visibility policy or the visibility of who is controlling the insets.
They are not aware of the WindowToken surface visibility, so keep
them untouched unless shell transition supports general window
animation or even insets animation.
Bug: 251214841
Test: atest FlickerTests:CloseImeAutoOpenWindowToAppTest
Test: Launch an activity that requests to hide system bars.
And use shell command to change display size at the same time.
After the launch transition is finished, the system bars
can still be visible when swiping from bottom or top.
Change-Id: I2403e2dcbc6684774c9c3b74768a32c7b7a3b8ae
1. When moveActivityToPinnedRootTask with creating a new Task for PiP,
make sure the Task's initial bounds is the same as the activity
parent TaskFragment so the animation starts from the correct bounds.
2. When exit PiP to previous Task, make sure we are animating the
correct window surface. For the previous implementation. there can
also be TRANSIT_CHANGE change for entering ActivityEmbedding split
(from PiP) in the same transition.
Bug: 207070762
Test: atest WmTests:RootWindowContainerTests
Test: atest WmTests:TransitionTests
Merged-In: Ifba090ad9ac9fb7033d343eab1c87c1a67bb9c11
Change-Id: Ifba090ad9ac9fb7033d343eab1c87c1a67bb9c11
If folding or unfolding makes the pip window size either larger
than maximum size or smaller than minimum size, then user-resize
to normal bounds.
Test: manually reproduced steps in the bug listed
Test: atest WMShellUnitTests:PipResizeGestureHandlerTest
Bug: 198679951
Bug: 198645990
Change-Id: I4a8c0a3a0fa75ab3d51d30e75bc85a53e4801086
This is the first CL towards implementing the bar type caption which
will have a back button, a handle, and a close button. The caption will
also disappear when the attached task is not in focus.
Still to be implemented:
1: Windowing options appearing on handle click
2: Drag down in fullscreen to enter desktop mode
3: Caption display via hovering when cursor available
Bug: 239960071
Test: Manual: confirm new caption displays with the correct buttons/layout.
Confirm buttons work and focus change works with multiple tasks.
Test: Atest WindowDecorationTests
Change-Id: I2ebed76b803d1f337edc3e7340966909f63eaf40