Commit Graph

3963 Commits

Author SHA1 Message Date
Tony Wickham
89ef745d1c Update taskbar drag and drop treatment
- Disable the FastBitmapDrawable icon instead of setting it to invisible
- Suspend auto hide during drag and drop (moved to new TaskbarAutoHideSuspendController)

Test: Drag and drop from taskbar and ensure the original icon stays in place but desaturated
Test: Open immersive app, drag and drop from taskbar and ensure taskbar doesn't hide before drop
Fixes: 200816442
Change-Id: I4b895efd043be75e7e7034bd75e751ffdd2cfdd7
2021-10-28 11:43:49 -07:00
TreeHugger Robot
d238074c39 Merge "Update TaskView corner radius as RecentsView scale changes" into sc-v2-dev 2021-10-21 15:12:16 +00:00
Alex Chau
3c6795e355 Update TaskView corner radius as RecentsView scale changes
Fix: 192253697
Test: manual
Change-Id: I45825c955b759163792d704408e348c198830fc8
2021-10-21 14:23:11 +01:00
Nick Chameyev
8523412470 Merge "Do not animate statusbar unfold when in portrait orientation" into sc-v2-dev 2021-10-21 10:02:00 +00:00
TreeHugger Robot
6409130f29 Merge "Cache TISBinder for multiple onBind() calls" into sc-v2-dev 2021-10-20 23:34:49 +00:00
Vinit Nayak
45fbe5b563 Cache TISBinder for multiple onBind() calls
Bug: 202986128
Change-Id: I29a0963ff2880c9970859bc1437c7624bc7f0aea
2021-10-20 13:51:40 -07:00
Schneider Victor-tulias
e9bd364390 Merge "Generalize the icon popup menu types." into sc-v2-dev 2021-10-20 18:32:56 +00:00
Pat Manning
3c647ff30a Merge "Add new quickstep test for many tasks open at once." into sc-v2-dev 2021-10-20 15:20:26 +00:00
Pat Manning
ccec1de6ae Add new quickstep test for many tasks open at once.
This test is needed for testing overview-grid-related functionality.
- Opening non-focused tasks
- Dismissing a non-focused task from the grid
- Grid rows rebalancing after dismissal, which only happens when enough
apps are open to be off-screen.
- Grid tasks do not scroll after dismissal.

Test: TaplTestsQuickstep.java
Bug: 197630182
Change-Id: Ic907db4643cdc2eb9e4610dab917347e234e470c
2021-10-20 14:40:32 +01:00
Schneider Victor-tulias
16e04e29d2 Generalize the icon popup menu types.
Generalized popup menu types and logic to allow wider uses outside of launcher.

Bug: 198438631
Test: long pressed launcher icons and pressed menu options
Change-Id: Iadcbb1796496c0061dcee362784e426ff55dc94a
2021-10-19 16:06:16 -07:00
TreeHugger Robot
bc9dd92220 Merge "Delaying taskbar loading until user setup completed" into sc-v2-dev 2021-10-19 21:49:02 +00:00
Sunny Goyal
2a528a43c1 Delaying taskbar loading until user setup completed
> Also keeping it stashed while all-set activity is visible
> Creating a shared state (simiar to saved instance state) for taskbar
> Keeping taskbar stashed while all-set activity is visible

Bug: 194786060
Bug: 201782272
Test: Manual
Change-Id: Iab5e082243a206772266aece62d3028f5acb6400
2021-10-19 12:38:02 -07:00
Vinit Nayak
75465b2d7f Add log to RemoteTargetGluer to determine which array is empty.
Bug: 199658495
Change-Id: I069044d8ee0173fa3870f48d50374c634e0d58d7
2021-10-19 18:10:06 +00:00
Schneider Victor-tulias
b4307ff8aa Merge "Update gesture navigation tutorial with new specs for foldable devices." into sc-v2-dev 2021-10-19 17:59:31 +00:00
Tracy Zhou
fc0b21596f Merge "Track LauncherState for task bar stashing better" into sc-v2-dev 2021-10-19 07:06:14 +00:00
Vinit Nayak
6f6e97c653 Merge "Ensure RecentsView RemoteTargetHandle's are non-null" into sc-v2-dev 2021-10-18 23:19:21 +00:00
Mady Mellor
20c05fbd4c Merge "Add a scrim to taskbar for bubbles expanded state" into sc-v2-dev 2021-10-18 19:35:05 +00:00
Tracy Zhou
ae88197e5f Track LauncherState for task bar stashing better
- Animate in onStateTransitionStart
- Commit in onStateTransitionComplete

Fixes: 193938970
Fixes: 200765631
Fixes: 201644899
Test: Go home from overview; Go to all apps from home; Go to overview from home
Change-Id: I393022c86f09806fea29fb5bc7191304b473f231
2021-10-18 10:51:51 -07:00
Tony Wickham
e202a64e56 Merge "Fix taskbar layout issues in setup wizard" into sc-v2-dev 2021-10-18 16:01:38 +00:00
Vinit Nayak
30d46ef842 Merge "Handle race between creating and assigning RemoteTargetHandles" into sc-v2-dev 2021-10-16 05:39:24 +00:00
Vinit Nayak
15028e030b Handle race between creating and assigning RemoteTargetHandles
* Getting a callback from shell to inform when task is in split
and when it's been removed is asynchronous, and not
coordinated with launcher's swipe up gesture.
* There's a chance that user can quickswitch to single app
and start swipe up before shell could notify
LauncherSplitScreenListener, which would cause mismatched state.

Bug: 199658495
Change-Id: I722eeb26d83e99b2a2f77748984d0d7c390b5fec
2021-10-15 22:18:46 +00:00
Vinit Nayak
775fcb3fcf Ensure RecentsView RemoteTargetHandle's are non-null
Fixes: 201246959
Change-Id: Ifb8463e62765c92377db2a57ff7568e31da667aa
2021-10-15 15:16:20 -07:00
TreeHugger Robot
27e294a973 Merge "Removing overscroll pluging support" into sc-v2-dev 2021-10-15 19:27:25 +00:00
Vinit Nayak
2a7c0c4ed8 Merge "Align 3 button nav with hotseat" into sc-v2-dev 2021-10-15 15:25:16 +00:00
Nick Chameyev
ae818dfe42 Do not animate statusbar unfold when in portrait orientation
Disables unfold animation for statusbar when it is
perpendicular to the screen fold.
Moves ScopedUnfoldTransitionProgressProvider from launcher
to shared SysUI/Launcher code

Bug: 201518277
Test: manual
Test: atest com.android.systemui.unfold.util.NaturalRotationUnfoldProgressProviderTest
Change-Id: I1417ee89b132b541d5a3ed0e5ddcbc56d827da96
2021-10-15 14:06:42 +01:00
Tony Wickham
bb6e278f14 Fix taskbar layout issues in setup wizard
- Align nav buttons (only back is enabled) to start instead of end
- Don't animate from init()
- Provide 0 contentInsets.bottom
  - Auto-stash the taskbar during setup
  - Hide the stashed handle by adding an alpha channel for home disabled
  - Report 0 contentInsets when stashed if the handle isn't visible
- Tint nav buttons according to theme

Test: adb shell am start -a android.intent.action.MAIN -n com.google.android.setupwizard/.SetupWizardTestActivity
Bug: 194786060
Change-Id: I4a40501e8aad2a38ec00398efe9ea3dbfa7428cd
2021-10-14 21:50:03 -07:00
Vinit Nayak
74b25ca266 Align 3 button nav with hotseat
* Animate translationY alongside icons
* When device rotates on home, update
translationY
* Add padding to contextual buttons to center
it

Bug: 189807374
Change-Id: I149ef25df570fb1fd385f1da960c827105ff975d
2021-10-14 18:32:35 -07:00
Schneider Victor-tulias
97b85ee6cb Update gesture navigation tutorial with new specs for foldable devices.
- Added new layout files for mock screens.
- Added new mock hotseat

Bug: 198434693
Test: launched and completed tutorial on regular phone and foldable device.
Change-Id: I1ad04f9e8e3a012528d6fd8fbaa0366687c65d06
2021-10-14 12:37:34 -07:00
Vinit Nayak
22762d91cd Merge "Suspend auto-hiding taskbar when folder is open" into sc-v2-dev 2021-10-14 19:11:53 +00:00
TreeHugger Robot
5ec8046f6a Merge "Transform touch events in landscape mode now that app is on top" into sc-v2-dev 2021-10-11 23:01:31 +00:00
TreeHugger Robot
60c64adeed Merge "Sending Launcher resume event to app predictor" into sc-v2-dev 2021-10-11 21:22:50 +00:00
Tracy Zhou
a4a4002fa5 Transform touch events in landscape mode now that app is on top
Fixes: 193375232
Test: Swipe up from app in landscape mode, interact with Overview, and make sure it's interactive
Change-Id: Ib1838f02d537918b7a13d51a1fdcacbf3d02b99d
2021-10-11 14:04:51 -07:00
TreeHugger Robot
11579eea19 Merge "Fix split select scroll range when TaskView aren't shifting" into sc-v2-dev 2021-10-11 19:53:24 +00:00
TreeHugger Robot
1569754519 Merge "Add scroll logging to RecentsView behind DEBUG flag" into sc-v2-dev 2021-10-11 18:13:45 +00:00
Alex Chau
02150305f9 Fix split select scroll range when TaskView aren't shifting
- There is an edge case that when ClearAllButton is visible, no split translation is applied, the offset adjustment needs to be calculated differently in that case
- Also, apply the scrollOffset to the TaskViews / ClearAllButton instead of updating min/max scroll

Bug: 200537659
Test: Split right in grid, split left with clear all button, split left without clear all button
Change-Id: I869c448bbec6aec8fa070e47193a692be6f75e84
2021-10-11 19:02:28 +01:00
Sunny Goyal
1b6d43b13e Sending Launcher resume event to app predictor
Bug: 202535375
Test: Manual
Change-Id: I1618a5ed973b9d4f898442647e3e197ed4935aa4
2021-10-08 16:21:56 -07:00
Mady Mellor
5fdf2d08fc Add a scrim to taskbar for bubbles expanded state
When bubbles are expanded a scrim is shown on top of
everything. Taskbar is layered above bubbles but we still
need the scrim to show on top of it. This CL adds the
ability to show a scrim on taskbar.

The scrim is a view in the taskbar drag layer and is
placed between the taskbar and the nav buttons so that
it can block touches / scrim the taskbar but still allow
the nav buttons to be visible and touchable.

Add interpolators for alpha matching what bubbles is using.

Test: manual 1 - expand bubbles while taskbar is visible
                 => observe scrim
               - open manage menu
                 => observe darker scrim
             2 - check that taps on scrim collapse manage
                 menu or stack
             3 - check there isn't a scrim while taskbar is
                 stashed and bubbles / manage menu are open
             4 - check that three button nav works while
                 bubbles are expanded
Bug: 197139718
Change-Id: I94c4ecd07f81b2bad55c38525d60f493d3c1f9d8
2021-10-08 14:55:43 -07:00
Alex Chau
e95de31304 Add scroll logging to RecentsView behind DEBUG flag
Bug: 202514687
Test: manual
Change-Id: Iec022f2583baa794904242a44a2c8dca8ea4b1be
2021-10-08 16:26:08 +01:00
Tony Wickham
1bd4bf7ff1 When taskbar would be stashed in 3 button mode, hide icons instead
In 0 button mode, stashing morphs the icons into the home handle. In 3 button mode, that doesn't make sense, but we should still hide the icons (and just keep the 3 nav buttons). You still can't manually stash via long press in 3 button mode, but this will address other states where we automatically stash the taskbar when we want to hide the icons from users (e.g. when pinning an app).

Test: Pin an app from overview in 3 button mode, ensure the taskbar icons disappear until unpinning
Bug: 190192993
Change-Id: I499c59bd9d7871ff64696b67065cf9d4863222a5
2021-10-07 23:29:41 -07:00
Tony Wickham
db0c2f1b79 Add flags to stash taskbar for app pinning and empty hotseat
Test: pin an app from overview, watch taskbar stash automatically until unpinning
Test: turn off suggestions for hotseat, remove all items and watch taskbar stash automatically when opening an app
Fixes: 190192993
Fixes: 193937948
Change-Id: Ia7260c60a820af1a48c9e4a400a52753baf34d41
2021-10-07 23:29:41 -07:00
Tony Wickham
772732de9e Migrate mStashedInApp to FLAGS_STASHED_IN_APP
This is to prepare for different flags that could cause taskbar to be stashed in an app without the user explicitly long pressing to stash.

Test: run wwdebug and wwlogcat, ensure still get logs for long press stash events; other interactions like clipping tasks to above unstashed taskbar still work as before
Bug: 190192993
Bug: 193937948
Change-Id: I90846e650a438e03bdcfdf9c4bf919e19cc5abb3
2021-10-07 23:29:34 -07:00
Vinit Nayak
2a77ff74bd Suspend auto-hiding taskbar when folder is open
* Notify SystemUi to suspend autoHide behavior
until launcher notifies otherwise
* There's no exclusive lock for AutoHideController
behavior, so down the road another component can
choose to resume auto-hide behavior even if launcher
has requested otherwise (and vice versa),
something to keep in mind.

Fixes: 193938507
Test: Opened folder while in immersive video,
taskbar stayed open.

Change-Id: I12f4055911822893551683466cfd532c8108a3a0
2021-10-07 13:46:26 -07:00
Alex Chau
fe69980f90 Merge "Only adjust min/max scroll for split screen in landscape" into sc-v2-dev 2021-10-07 14:52:05 +00:00
Vinit Nayak
7c2b52e5cf Merge "Show split options when overview actions hidden for grid" into sc-v2-dev 2021-10-07 14:51:44 +00:00
Vinit Nayak
c5ae15b481 Merge "Move back to end of screen on keyguard" into sc-v2-dev 2021-10-07 14:49:47 +00:00
Vinit Nayak
a08e806e25 Move back to end of screen on keyguard
* Animate it back into position after user unlocks
* Re-create taskbar on layout direction change so
PropertyHolders are recreated to take into account
new values

Fixes: 199852418
Test: Tested w/ password + pin for gesture + 3 button
Change-Id: Ie7f16f737a8fc12328c05d7628d0e3ae09fc08ca
2021-10-06 18:09:15 -07:00
Sunny Goyal
0ecfb69596 Removing overscroll pluging support
Bug: 201677812
Test: Presubmit
Change-Id: Id8136e99746946ba840754ef8e71a4574f49938e
2021-10-06 11:23:46 -07:00
Tony Wickham
f9d2082cf3 Merge "Fix issues with starting new recents animation before previous onRecentsAnimationStart" into sc-v2-dev 2021-10-06 17:36:45 +00:00
Alex Chau
aea42dc43e Only adjust min/max scroll for split screen in landscape
- Portrait's split placeholder is at top/bottom and does not affect scroll

Bug: 200537659
Test: Split left and split right in portrait / landscape, check if min/max scroll is correct
Change-Id: Ib7eb09d3cc44c8e0d962920ad094c73abc5f0dbd
2021-10-06 12:31:10 +01:00
Tony Wickham
66ed0ff23e Fix issues with starting new recents animation before previous onRecentsAnimationStart
- Fix logic for canceling animation for continued quick switch, so that this case (starting a new gesture before onRecentsAnimationStart() of the previous gesture) instead goes to the STATE_FINISH_WITH_NO_END flow.
- Update the end target so that we go to that state instead of always overview state if swipe was past the halfway threshold when we call endLauncherTransitionController(). This is specifically so we don't use OverviewInputConsumer on the second gesture, given the first one was canceled and didn't actually go to overview.
- GestureState#isRecentsAnimationRunning() now checks for STATE_RECENTS_ANIMATION_STARTED rather than _INITIALIZED, to be consistent with its javadoc and TaskAnimationManager#isRecentsAnimationRunning(). This also ensures we can correctly calculate continued quick switch (see above).
- Call cleanUpRecentsAnimation() before creating a new one in TaskAnimationManager. This ensures that the previous listener doesn't immediately cleanup the new gesture when it gets onRecentsAnimationCanceled() due to the new recents animation starting.

Test: swipe to home twice from the app, locally ignoring the onRecentsAnimationStart() from the first one, and ensure the second one responds normally
Bug: 193851085
Change-Id: I76e27c96b54293805546c0d6c82e77f975c69d7a
2021-10-05 18:14:51 -07:00