Commit Graph

4962 Commits

Author SHA1 Message Date
Ats Jenk
fac53656ed Merge "Clean up desktop mode logging" into tm-qpr-dev 2022-10-27 16:27:57 +00:00
Jerry Chang
b8a27eb601 Merge "Add fallback logic to cancel entering split screen" into tm-qpr-dev 2022-10-27 03:55:19 +00:00
Hongwei Wang
571b988b5a Merge "Fix the scale for entering PiP animation" into tm-qpr-dev 2022-10-27 01:53:47 +00:00
Ats Jenk
ed7fd79631 Clean up desktop mode logging
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
2022-10-26 14:12:41 -07:00
Evan Rosky
8275328013 Add a config to disable registering Shell Transitions in dagger
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
2022-10-26 19:04:34 +00:00
Hongwei Wang
8be07d9105 Fix the scale for entering PiP animation
The entering PiP animation used to overscale when entered from large
screen landscape mode.

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/hMdoi9O3JEDSMvB9qqFNrc
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/jpZQhYk17hPEnWnWtjeRR
Bug: 201824622
Test: Entering PiP from large screen, landscape and portrait, in both \
      button and gesture navigation mode. See also the video
Change-Id: Ic4a4c2a8e83f794a999d8a91c6ebdb03537011f3
2022-10-26 05:22:55 +00:00
Jerry Chang
abd653a6a0 Add fallback logic to cancel entering split screen
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
2022-10-26 04:54:52 +00:00
Chris Li
96e8a788ef Merge "Show bg color during ActivityEmbedding change anim with Shell transition" into tm-qpr-dev 2022-10-26 01:45:56 +00:00
Chris Li
4659d8a49c Show bg color during ActivityEmbedding change anim with Shell transition
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
2022-10-25 09:55:54 +00:00
Jorge Gil
06502521d4 Prevent animation update callbacks after it has finished
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
2022-10-25 00:49:10 +00:00
Ats Jenk
20d8290797 Merge "Execute WCT when showDesktopApps is called" into tm-qpr-dev 2022-10-24 20:57:25 +00:00
Ats Jenk
da0d26e567 Merge "Limit freeform to front for freeform task launches" into tm-qpr-dev 2022-10-24 16:58:08 +00:00
Ats Jenk
53a1493396 Execute WCT when showDesktopApps is called
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
2022-10-24 09:19:06 -07:00
Mady Mellor
731095e5cf Merge "Track visible tasks in DesktopModeController and add a listener" into tm-qpr-dev 2022-10-24 16:04:59 +00:00
Mateusz Cicheński
00c35a0533 Merge "Make fling-to-dismiss disabled by default for PiP." into tm-qpr-dev 2022-10-23 17:49:59 +00:00
Shan Huang
92d7e3329f Merge "DO NOT MERGE Spring controlled back progress API" into tm-qpr-dev 2022-10-21 23:54:12 +00:00
Shan Huang
188dee2b3b DO NOT MERGE Spring controlled back progress API
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
2022-10-21 22:12:53 +00:00
Sunny Goyal
1cc345ab19 Merge "Updating icon loader method calls as per signature change" into tm-qpr-dev 2022-10-21 18:27:47 +00:00
Mateusz Cicheński
89503520b5 Make fling-to-dismiss disabled by default for PiP.
Bug: 214264312
Change-Id: I3a99324dc595a7c6aff76ae232d23d4c2db1c42c
Test: manually
2022-10-21 17:19:12 +00:00
Garfield Tan
639a4a914a Merge "Fix a few issues in WindowDecor" into tm-qpr-dev 2022-10-21 15:19:23 +00:00
TreeHugger Robot
a40a55db5c Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-qpr-dev 2022-10-21 07:30:45 +00:00
Mady Mellor
457d8317f1 Track visible tasks in DesktopModeController and add a listener
- 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
2022-10-20 17:25:11 -07:00
Bill Yi
9384405e76 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I3e533428db45e2be3db2cfb6ae9b4aceaae12f35
2022-10-20 17:21:42 -07:00
Garfield Tan
2bbcd6ada5 Fix a few issues in WindowDecor
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
2022-10-20 17:11:10 -07:00
Ats Jenk
40828e9713 Limit freeform to front for freeform task launches
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
2022-10-20 17:10:11 -07:00
Vinit Nayak
e3d56e6994 Merge "Scale screenWidth for split proportionally for thumbnail matrix" into tm-qpr-dev 2022-10-20 22:49:54 +00:00
Vinit Nayak
fa05cb2209 Scale screenWidth for split proportionally for thumbnail matrix
* Created TODO(b/254378592) to consolidate different
SplitBounds classes

Fixes: 250817893
Test: Checked phone/tablet swiping quickswitching
portrait and landscape

Change-Id: If5c55d10a0d21b7984442d01f306c2016eba3701
2022-10-19 17:57:06 -07:00
Maryam Dehaini
74e9e231c2 Merge "Move caption view constants to resources" into tm-qpr-dev 2022-10-19 16:21:35 +00:00
Maryam
222289603a Move caption view constants to resources
Test: Manual Testing
Bug: 251908245
Change-Id: I4133afe8bd82da125b9c374621a285ed72adce04
2022-10-18 16:47:59 -07:00
TreeHugger Robot
5be30d7d29 Merge "Import ActivityManager inner classes directly" into tm-qpr-dev 2022-10-18 18:51:19 +00:00
TreeHugger Robot
b35a781088 Merge "Show toast if app doesn't support split" into tm-qpr-dev 2022-10-18 02:04:07 +00:00
Ats Jenk
1de186f84a Merge "Improve caption layout" into tm-qpr-dev 2022-10-17 19:39:17 +00:00
Mady Mellor
938281a014 Merge "Pin bubbles to the bottom right on tablets for the prototype" into tm-qpr-dev 2022-10-17 16:55:24 +00:00
Bill Yi
1d7bd509d9 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I22eaa78a3044474af702790265f98e66c6db5641
2022-10-15 12:16:18 -07:00
Ats Jenk
2b6902c91c Improve caption layout
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
2022-10-14 19:05:47 -07:00
Mady Mellor
a8057d4751 Pin bubbles to the bottom right on tablets for the prototype
- 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
2022-10-14 13:10:58 -07:00
TreeHugger Robot
9baf3ce919 Merge "Add edge extension for ActivityEmbedding Shell transition animation" into tm-qpr-dev 2022-10-14 11:48:05 +00:00
Jeff Chang
ccfed74e82 Show toast if app doesn't support split
Presents an "unsupported split" message for EXIT_REASON_UNKNOWN.

Bug: 244208843
Test: atest WMShellFlickerTests
Change-Id: I4870590501e229dc14058c089038e360a4861292
2022-10-14 15:45:21 +08:00
Chris Li
fcc0747278 Add edge extension for ActivityEmbedding Shell transition animation
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
2022-10-14 14:28:31 +08:00
Ikram Gabiyev
8664c9501c Merge "User-resize pip to normal bounds when (un)folding" into tm-qpr-dev 2022-10-13 21:03:24 +00:00
Riddle Hsu
1689d780d3 Do not change surface of system window token for transition
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
2022-10-13 17:24:43 +08:00
Chris Li
9e3020b233 Merge "Polish ActivityEmbedding enter/exit PiP (1/n)" into tm-qpr-dev 2022-10-13 08:51:48 +00:00
Chris Li
84ec824a33 Polish ActivityEmbedding enter/exit PiP (1/n)
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
2022-10-13 09:02:27 +08:00
Ikram Gabiyev
862c902a5c User-resize pip to normal bounds when (un)folding
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
2022-10-12 22:29:21 +00:00
Pat Manning
934606c0e8 Merge "Refactor SplashScreenAnimation so it can be reused in other parts of the code." into tm-qpr-dev 2022-10-12 11:34:34 +00:00
TreeHugger Robot
14bc57382c Merge "Update split context when display size changed" into tm-qpr-dev 2022-10-12 03:14:15 +00:00
Matt Sziklay
a5285231c8 Merge "Add bar type window caption." into tm-qpr-dev 2022-10-11 00:37:41 +00:00
Bill Yi
40bdde2a1e Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-qpr-dev 2022-10-10 22:23:11 +00:00
mattsziklay
bd839dbdd1 Add bar type window caption.
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
2022-10-10 12:02:44 -07:00
Ats Jenk
78b3719017 Merge "Resize tasks from corners when in touch mode" into tm-qpr-dev 2022-10-10 19:02:17 +00:00